review

📁 kelvinz/cobb 📅 6 days ago
23
总安装量
8
周安装量
#16043
全站排名
安装命令
npx skills add https://github.com/kelvinz/cobb --skill review

Agent 安装分布

amp 8
opencode 8
kimi-cli 8
codex 8
claude-code 8

Skill 文档

review

Review one change set in one mode and return a decision-led report.


Guardrails

  • Require an explicit mode: pr or local.
  • Do not implement or modify code.
  • Do not commit, merge, push, or delete branches.
  • Do not update PRD/todo tracking files here.
  • Update tasks/memory.md only for durable review outcomes (recurring risks, release-critical gotchas, or confirmed follow-up decisions).
  • Do not invent test results; run checks or call out missing evidence.

Inputs

  • review mode:
    • pr: PR URL/number (preferred)
    • local: base branch (default: repository default branch resolved from origin/HEAD; ask if unclear)
  • optional PRD path (if scope validation is needed)

Workflow

  1. Confirm mode and target.
  2. Collect context:
    • pr mode:
      • Preferred (gh available):
        • gh pr view --json url,number,title,body,state,isDraft,baseRefName,headRefName,files,additions,deletions
        • gh pr diff
        • gh pr checks
      • Fallback (gh unavailable/auth fails):
        • ask for base/head branch names if not already provided
        • git fetch origin "<base>" "<head>"
        • git diff "origin/<base>...origin/<head>"
        • git log "origin/<base>..origin/<head>" --oneline
        • mark CI/check status as Missing evidence unless the user provides CI artifacts
    • local mode:
      • git diff "<base>...HEAD"
      • git log "<base>..HEAD" --oneline
      • git status --short
  3. Compare the change set against required behaviour:
    • correctness and edge cases
    • security risks and data handling
    • test depth and regression risk
    • scope control (especially if PRD path is provided)
      • Compare diff vs PRD ‘In scope’ and completed user stories; flag any diff not attributable to a PRD requirement.
  4. Classify findings:
    • blockers (must fix)
    • suggestions (optional improvements)
    • missing evidence (tests/checks not run, unclear behaviour)
      • If unable to run checks (CI-only, permissions), mark as ‘Missing evidence’ and request the specific artifact (CI link, log, or command for user to run).
  5. Produce the report with a clear recommendation:
    • pr mode: Ready to accept PR: Yes or Ready to accept PR: No
    • local mode: Good to commit: Yes or Good to commit: No
    • if decision is No, include explicit fix items and ask the user to address them before rerunning review in the same mode
  6. Evaluate memory-worthy review outcomes and update tasks/memory.md inline when needed:
    • systemic risks likely to recur
    • key security or data-handling decisions
    • durable follow-up decisions that affect future work
    • if no durable outcome exists, mark memory as skipped with reason in the report

Review Checklist

  • Correctness:
    • empty/null/error paths
    • boundary values and state transitions
    • ordering/concurrency/time assumptions (if applicable)
  • Security:
    • authn/authz behaviour
    • input validation and output encoding
    • secret/PII handling and logging safety
    • dependency risk for newly introduced packages
  • Tests and verification:
    • happy path + key failure paths
    • regression coverage in touched areas
    • manual verification steps when automation is missing
  • Maintainability:
    • naming clarity and control-flow simplicity
    • comments/docs for non-obvious decisions only

Report Template

PR Mode Report
Mode: pr
Decision:
- Ready to accept PR: Yes | No

Blockers (must fix):
- …

Suggestions (nice to have):
- …

Missing evidence:
- …

Security notes:
- …

Regression risks / watch-outs:
- …

Memory updates:
- Updated: <summary> | Skipped: <reason>

Recommended next step:
- If Ready to accept PR=No: ask user to fix blockers, then rerun `review` in `pr` mode.
- If Ready to accept PR=Yes: run `commit` in `finalise` mode.
Local Mode Report
Mode: local
Decision:
- Good to commit: Yes | No

Blockers (must fix):
- …

Suggestions (nice to have):
- …

Missing evidence:
- …

Security notes:
- …

Regression risks / watch-outs:
- …

Memory updates:
- Updated: <summary> | Skipped: <reason>

Recommended next step:
- If Good to commit=No: ask user to fix blockers, then rerun `review` in `local` mode.
- If Good to commit=Yes: run `commit` in `commit` mode.

Output

  • Return the review report with explicit memory update status.
  • Keep the decision explicit and unambiguous.
  • End with a short status block:
    • Files changed: list of created/updated files
    • Key decisions: any assumptions or choices made (if any)
    • Next step: recommended next skill or action