Agent SkillsNeverSight/learn-skills.dev › cc-pr-review-ci

cc-pr-review-ci

GitHub

用于对TypeScript/React代码进行PR审查的CI安全技能。按10个领域顺序分析变更,生成结构化review.json供脚本发布GitHub评论。支持加载历史驳回以避免重复反馈,并具备代码变更时的重新评估机制。

data/skills-md/adrianbrowning/agent-skills/cc-pr-review-ci/SKILL.md NeverSight/learn-skills.dev

触发场景

需要审查Pull Request的代码变更 无PR号时对比origin/main的主干差异

安装

npx skills add NeverSight/learn-skills.dev --skill cc-pr-review-ci -g -y
更多选项

非标准路径

npx skills add https://github.com/NeverSight/learn-skills.dev/tree/main/data/skills-md/adrianbrowning/agent-skills/cc-pr-review-ci -g -y

不安装直接使用

npx skills use NeverSight/learn-skills.dev@cc-pr-review-ci

指定 Agent (Claude Code)

npx skills add NeverSight/learn-skills.dev --skill cc-pr-review-ci -a claude-code -g -y

安装 repo 全部 skill

npx skills add NeverSight/learn-skills.dev --all -g -y

预览 repo 内 skill

npx skills add NeverSight/learn-skills.dev --list

SKILL.md

Frontmatter
{
    "name": "cc-pr-review-ci",
    "description": "Comprehensive TypeScript\/React PR review. Outputs structured review.json consumed by a posting script that creates a GitHub Review with inline comments. Agent runs read-only; the workflow script holds write permissions."
}

PR Review (single-agent, CI-safe)

Review a PR across 10 domains sequentially, then write review.json. A separate posting script turns the JSON into GitHub inline review comments.

If no PR number provided, diff against origin/main and print JSON to stdout.


Step 0 — Load prior dismissals (PR runs only)

Skip if no PR number provided.

Fetch all existing bot reviews on this PR:

gh api repos/{owner}/{repo}/pulls/$PR_NUMBER/reviews \
  --jq '[.[] | select(.body | test("<!-- cc-pr-review -->";  "i")) | {id: .id, submitted_at: .submitted_at}]'

For each bot review found, fetch its inline comments:

gh api repos/{owner}/{repo}/pulls/$PR_NUMBER/reviews/$REVIEW_ID/comments \
  --jq '[.[] | {id: .id, body: .body, path: .path, line: .line, reactions: .reactions}]'

Also fetch any reply threads on those inline comments:

gh api repos/{owner}/{repo}/pulls/$PR_NUMBER/comments \
  --jq '[.[] | select(.in_reply_to_id != null) | {id: .id, in_reply_to_id: .in_reply_to_id, body: .body}]'

Build SUPPRESSED_FINDINGS: a list of finding id values to skip this run.

A finding is suppressed if its prior inline comment has:

  • A 👎 reaction (.reactions["-1"] > 0), or
  • A human reply containing dismissal language: "intentional", "by design", "won't fix", "false positive", "ignore", "not applicable", "expected"

Extract the finding id from the prior comment body — each inline comment posted by the script contains an HTML comment <!-- id: {finding-id} --> in the first line.

Escape hatch: if the file + surrounding lines for a suppressed finding appear in the current diff (i.e. the code actually changed), remove it from SUPPRESSED_FINDINGS — the finding must be re-evaluated.

If no prior reviews or no dismissals: SUPPRESSED_FINDINGS is empty.


Step 1 — Get the diff

  • PR number given → gh pr diff $PR_NUMBER
  • No PR number → git diff origin/main

Step 2 — Run 10 domain reviews sequentially

Read the reference file for each domain, then analyze the diff. Record findings with their exact file path and line number.

Before recording any finding: check if its computed id ({domain}-{kebab-title}) is in SUPPRESSED_FINDINGS AND the relevant code lines have not changed in the current diff. If both conditions hold → skip silently.

  1. SecurityRead .claude/skills/cc-pr-review-ci/references/security.md
  2. PerformanceRead .claude/skills/cc-pr-review-ci/references/performance.md
  3. React/TypeScriptRead .claude/skills/cc-pr-review-ci/references/react-ts.md
  4. TestingRead .claude/skills/cc-pr-review-ci/references/testing.md
  5. DevOps/CIRead .claude/skills/cc-pr-review-ci/references/devops.md
  6. HolisticRead .claude/skills/cc-pr-review-ci/references/holistic.md
  7. DuplicationRead .claude/skills/cc-pr-review-ci/references/duplication.md
  8. Bug HuntingRead .claude/skills/cc-pr-review-ci/references/bug.md
  9. Scope/HygieneRead .claude/skills/cc-pr-review-ci/references/scope.md
  10. MaintainabilityRead .claude/skills/cc-pr-review-ci/references/thermo.md

Step 3 — Write review.json

  1. Read Read .claude/skills/cc-pr-review-ci/references/format.md for the exact schema.

  2. Merge all domain findings into a single findings array. Assign each finding a stable id following the {domain}-{kebab-title} convention.

  3. Determine verdict:

    • Any criticalCHANGES_REQUESTED
    • high only → APPROVED_WITH_SUGGESTIONS
    • observations only or none → APPROVED
  4. Write the JSON:

    • PR run: write to $REVIEW_OUTPUT_PATH (default /tmp/review.json)
    • Local run (no PR number): print to stdout

Do not call gh to post anything. The workflow's post-review.js step handles all GitHub writes.

版本历史

  • c3c0a1e 当前 2026-07-23 11:01

同 Skill 集合

data/skills-md/00prabalk00/claude-skills/knowledge-base-gap-finder/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-agile/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-auth/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-issues/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-project-management/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-projects/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-safe/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-search/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-spaces/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-transitions/SKILL.md
data/skills-md/0731coderlee-sudo/wechat-publisher/wechat-publisher/SKILL.md
data/skills-md/0froq/skills/conventionalcommits/SKILL.md
data/skills-md/0froq/skills/nuxt/SKILL.md
data/skills-md/0froq/skills/oq/SKILL.md
data/skills-md/0froq/skills/pinia/SKILL.md
data/skills-md/0froq/skills/pnpm/SKILL.md
data/skills-md/0froq/skills/slidev/SKILL.md
data/skills-md/0froq/skills/tsdown/SKILL.md
data/skills-md/0froq/skills/turborepo/SKILL.md
data/skills-md/0froq/skills/unocss/SKILL.md
data/skills-md/0froq/skills/vitepress/SKILL.md
data/skills-md/0froq/skills/vitest/SKILL.md
data/skills-md/0froq/skills/vue-best-practices/SKILL.md
data/skills-md/0froq/skills/vue-router-best-practices/SKILL.md
data/skills-md/0froq/skills/vue-testing-best-practices/SKILL.md
data/skills-md/0froq/skills/vue/SKILL.md
data/skills-md/0froq/skills/vueuse-functions/SKILL.md
data/skills-md/0froq/skills/web-design-guidelines/SKILL.md
data/skills-md/0juano/agent-skills/bondterminal-x402/SKILL.md
data/skills-md/0juano/agent-skills/edgeone-pages-deploy/SKILL.md
data/skills-md/0juano/agent-skills/ley-ar/SKILL.md
data/skills-md/0juano/agent-skills/ticktick/SKILL.md
data/skills-md/0juano/agent-skills/x-image-cards/SKILL.md
data/skills-md/0juano/x-image-cards/x-image-cards/SKILL.md
data/skills-md/0x0funky/agent-sprite-forge/generate2dsprite/SKILL.md
data/skills-md/0x2e/superpowers/brainstorming/SKILL.md
data/skills-md/0x2e/superpowers/dispatching-parallel-agents/SKILL.md
data/skills-md/0x2e/superpowers/executing-plans/SKILL.md
data/skills-md/0x2e/superpowers/finishing-a-development-branch/SKILL.md
data/skills-md/0x2e/superpowers/receiving-code-review/SKILL.md
data/skills-md/0x2e/superpowers/requesting-code-review/SKILL.md
data/skills-md/0x2e/superpowers/subagent-driven-development/SKILL.md
data/skills-md/0x2e/superpowers/systematic-debugging/SKILL.md
data/skills-md/0x2e/superpowers/test-driven-development/SKILL.md
data/skills-md/0x2e/superpowers/using-git-worktrees/SKILL.md
data/skills-md/0x2e/superpowers/using-superpowers/SKILL.md
data/skills-md/0x2e/superpowers/verification-before-completion/SKILL.md
data/skills-md/0x2e/superpowers/writing-plans/SKILL.md
data/skills-md/0x2e/superpowers/writing-skills/SKILL.md
data/skills-md/0x70626a/monad-wingman/monad-wingman/SKILL.md

元信息

文件数
0
版本
c3c0a1e
Hash
53188948
收录时间
2026-07-23 11:01

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-30 00:51
浙ICP备14020137号-1 $访客地图$