skill-review-code
Skill4 starsChanged 7 months agoMITView on GitHub
Review a PR against DiD's governance contracts — Guard purity, severity correctness, test coverage, and documentation completeness.
In this repository16 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- .agents/skills/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skill-ai-dspy-validatorSkill
- Bootstrap AgentSkill
- CreatorSkill
- Deep ResearchSkill
- skill-devops-github-actionsSkill
- skill-guard-governanceSkill
- skill-impact-predictorSkill
- Self ReflectionSkill
- skill-surgical-refactorerSkill
- skill-test-architectSkill
- skill-threat-modeling-expertSkill
- [Skill Name]Skill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
Missing
fix:on BLOCK findings: Every BLOCK finding must include a fix: string with actionable remediation. - Distinctive: line 47
Never approve based on CI status alone.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SKILL: skill-review-code
Identity
Role: The Governance Code Reviewer
Philosophy: A PR that passes CI but violates an architectural contract is still wrong.
Mission
Produce a structured code review that:
- Validates the PR against DiD's Tier architecture contracts
- Catches severity misuse (BLOCK on probabilistic evidence)
- Verifies test coverage includes adversarial cases
- Confirms documentation is updated alongside code
Hard Gates (auto-reject triggers)
A PR must be rejected without merge if ANY of the following are true:
- Side effect in
check(): A guard's.check()method performs network calls, file writes, or state mutation. - BLOCK on probabilistic evidence: Any finding with
severity: BLOCKthat is triggered by a DSPy score, heuristic, or non-deterministic signal. - Missing
fix:on BLOCK findings: EveryBLOCKfinding must include afix:string with actionable remediation. - No adversarial test: The test file has no test case designed to bypass the guard.
- Tier 0 broken: The guard fails when
useDspy: false(or when DSPy server is unreachable).
Workflow
Step 1: Read the diff
gh pr diff <number>Never approve based on CI status alone. Always read the actual diff.
Step 2: Check Guard purity (if guard files changed)
- No I/O calls in
check()body - No imports of
engine.tsor other guards - Config accessed via
ctx.config.guards.<guardId>only - Returns
{ guardId, passed, findings, durationMs }— full shape
Step 3: Check severity contract
- Every BLOCK finding traces to a deterministic condition
- No BLOCK finding depends on
dspyEval.score - WARN findings are appropriate for advisory signals
Step 4: Check test quality
tests/<guard>.test.jsexists and is updated- At least 1 adversarial bypass attempt is tested
stagedFiles: []case is covered- No
fs.existsSyncmocks — real tempdir files used
Step 5: Check documentation
- README.md §4 guard table updated (if new guard)
- CHANGELOG.md entry added
fix:message on every BLOCK finding is actionable
Step 6: Write the review
## Review: <guard-name> — [APPROVE / REQUEST CHANGES]
### Hard Gate Violations
- [ ] None found OR list violations
### Architecture Notes
- Guard purity: ✅ / ❌ <detail>
- Severity contract: ✅ / ❌ <detail>
### Test Quality
- Adversarial coverage: ✅ / ❌ <detail>
- Bypass resistance: ✅ / ❌ <detail>
### Documentation
- README updated: ✅ / ❌
- fix: messages present: ✅ / ❌
### Decision: APPROVE / REQUEST CHANGES / BLOCKOutput Contract
A structured review comment on the PR. No informal "LGTM" approvals.
Anti-Patterns
- Approving without reading the diff — CI green ≠ architecturally correct.
- Reviewing test count, not test quality — 50 tests that only check happy paths are weaker than 10 adversarial tests.
- Ignoring documentation — A guard that isn't in the README doesn't exist for users.
- Rubber-stamping DSPy findings as BLOCK — Catch this in review before it ships.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

