CodeCannon / rules
Cursor rule1 starsChanged 9 months agoMITView on GitHub
Code Cannon: Run a standalone code review on a pull request
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/checkpoint.mdcCursor rule
- .cursor/rules/delegate.mdcCursor rule
- .cursor/rules/deploy.mdcCursor rule
- .cursor/rules/qa.mdcCursor rule
- .cursor/rules/setup.mdcCursor rule
- .cursor/rules/start.mdcCursor rule
- .cursor/rules/status.mdcCursor rule
- .cursor/rules/story.mdcCursor rule
- .cursor/rules/submit-for-review.mdcCursor rule
- checkpointSkill
- delegateSkill
- deploySkill
- qaSkill
- reviewSkill
- setupSkill
- startSkill
- statusSkill
- storySkill
- submit-for-reviewSkill
The file
We split this review.mdc into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
If ai is "off", say:
- Very specific: line 29
If $ARGUMENTS is a number, use it as the PR number.
- Very specific: line 31
If $ARGUMENTS is empty, detect the current branch's open PR:
- Very specific: line 36
If no PR is found, abort and say: "No open PR found for the current branch.
- Very specific: line 49
Read the PR diff via gh pr diff <number>
- Distinctive: line 50
Read any files needed for full context
- Distinctive: line 57
After the review agent completes, relay its verdict to the user:
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule 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
--- description: Code Cannon: Run a standalone code review on a pull request globs: alwaysApply: false --- > **Cursor:** Trigger this skill via `@review` in Agent mode. State any arguments in your message. Sub-agent spawning is not supported — the automated review step in `/submit-for-review` must be done manually using the review-agent prompt. --- ## What `/review` does `/review` runs a standalone code review on a PR. It wraps `.claude/review-agent-prompt.md`. --- ## Pre-flight If `ai` is `"off"`, say: > "Code review is disabled for this project (REVIEW_GATE is set to 'off' in .codecannon.yaml). To enable reviews, set REVIEW_GATE to 'ai' or 'advisory' and re-run CodeCannon/sync.py." Do not proceed. --- ## Step 1 — Identify the PR If `$ARGUMENTS` is a number, use it as the PR number. If `$ARGUMENTS` is empty, detect the current branch's open PR: ``` gh pr view --json number --jq '.number' ``` If no PR is found, abort and say: "No open PR found for the current branch. Pass a PR number explicitly: `/review <number>`" --- ## Step 2 — Run the review Load `.claude/review-agent-prompt.md` and perform the review for the PR number. **If sub-agent spawning is supported** (e.g. Claude Code): invoke a dedicated review agent with the prompt and PR number. **If sub-agent spawning is not supported** (e.g. Codex, Cursor, Gemini): perform the review yourself inline — follow the instructions in the review-agent prompt directly. The review must: 1. Read the PR diff via `gh pr diff <number>` 2. Read any files needed for full context 3. Post findings as a PR comment via `gh pr comment <number>` --- ## Step 3 — Report verdict After the review agent completes, relay its verdict to the user: - **APPROVE** → "Review passed. Run `/submit-for-review` to merge (or it may already be merged if called from `/submit-for-review`)." - **REQUEST CHANGES** → Surface the CRITICAL findings. Say: "Fix the issues above and run `/review` again before merging." --- ## Important - This command does not commit, push, or merge anything. It only reviews. - It may be called manually at any time, not just from `/submit-for-review`. - The review comment is posted to GitHub for the audit trail. <!-- generated by CodeCannon/sync.py | skill: review | adapter: cursor | hash: 06d3232c | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
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.

