AgentSkillsCN

code-review

采用务实质量框架对 PR 进行全面代码审查。该功能可与 Jira 集成,验证实现是否完全符合工单需求。适用于审查拉取请求或提供 PR 反馈时使用。

SKILL.md
--- frontmatter
name: code-review
description: Perform thorough code review on a PR using the Pragmatic Quality framework. Integrates with Jira to validate implementation matches ticket requirements. Use when reviewing pull requests or providing PR feedback.
context: fork
agent: pragmatic-code-review
allowed-tools: Bash(git:*), Bash(gh:*), Grep, Glob, LS, Read, WebFetch, TodoWrite

Code Review

Conduct a comprehensive code review of the pending changes using the Pragmatic Quality framework.

Context

GIT STATUS:

code
!`git status`

PR METADATA:

code
!`gh pr view --json title,body,author,files,additions,deletions,headRefName,state 2>/dev/null || echo "No PR context - reviewing local branch"`

FILES MODIFIED:

code
!`gh pr diff --name-only 2>/dev/null || git diff --name-only origin/HEAD...`

COMMITS:

code
!`gh pr view --json commits --jq '.commits[].messageHeadline' 2>/dev/null || git log --oneline origin/HEAD...`

DIFF CONTENT:

code
!`gh pr diff 2>/dev/null || git diff --merge-base origin/HEAD`

Jira Integration

If Atlassian MCP is connected, fetch linked ticket details and validate implementation against acceptance criteria.

Objective

Use the pragmatic-code-review agent to comprehensively review the complete diff above. Your final reply must contain the markdown report.

Scripts

bash
scripts/pr-context.sh 123              # Fetch PR metadata via gh
scripts/extract-ticket-ids.sh 123      # Extract Jira IDs from PR
python scripts/diff-analysis.py --staged  # Analyze diff patterns

References

  • references/REVIEW_CHECKLIST.md — Detailed checklist
  • assets/feedback-templates.md — Common feedback patterns