review-and-refactor-code
Skill2 starsChanged 12 days agoMITView on GitHub
Review a defined PR or diff and make behavior-preserving refactors. Use for PR/diff reviews, verified defect findings, bounded review rounds, or refactors that must not change behavior. Not for open-ended repository discovery, unknown runtime failures, or migrations.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- cmdr-chara/codex-toolkitword for word, first seen Oct 31, 2026
Other versions1 project uses a version of this.
Word for word · 1
- cmdr-chara/codex-toolkit★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- bin/AGENTS.mdAGENTS.md
- evaluations/AGENTS.mdAGENTS.md
- orchestration/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- skills/llms.txtllms.txt
- bug-finderSkill
- codebase-evolution-controllerSkill
- codebase-improvement-plannerSkill
- completion-proofSkill
- content-provenance-hygieneSkill
- cpp-engineeringSkill
- debugging-investigatorSkill
- delegate-with-mission-cardsSkill
- documentation-synchronizerSkill
- expo-react-native-builderSkill
- flutter-production-builderSkill
- go-engineeringSkill
- kotlin-engineeringSkill
- mobile-architecture-directorSkill
- multi-agent-work-coordinatorSkill
- optimize-codebase-performanceSkill
- product-design-directorSkill
- production-web-builderSkill
- python-engineeringSkill
- repository-intelligenceSkill
- rust-engineeringSkill
- screenshot-to-interfaceSkill
- security-reviewSkill
- swift-engineeringSkill
- toolchain-preflightSkill
- typescript-quality-enforcerSkill
- verification-and-releaseSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
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
- Distinctive: line 12
Use this skill for a defined PR/diff review, bounded maintainability assessment, cleanup, decomposition, or behavior-preserving refactor.
- Distinctive: line 14
Do not trigger for general repository discovery, unknown runtime causes, proactive bug hunting unrelated to a diff, migrations, …
- Distinctive: line 37
For refactors, first define parity: Use behavior-parity.md. Load characterization-testing.md when material behavior is untested.
- Distinctive: line 39
Improve project policy only if asked: Use review-policy-template.md for opting into team review policy.
- Distinctive: line 47
If files or candidate revisions are inaccessible, narrow coverage and state the gap.
- Very specific: line 51
Stop a review with counted, evidence-backed findings (including explicit zero) and remaining coverage limits, without unauthorized edits or …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Review and Refactor Code
Find actionable regressions in a defined change and improve structure without smuggling in behavior changes. Favor trustworthy findings and review loops that converge.
Trigger boundary
Use this skill for a defined PR/diff review, bounded maintainability assessment, cleanup, decomposition, or behavior-preserving refactor.
Do not trigger for general repository discovery, unknown runtime causes, proactive bug hunting unrelated to a diff, migrations, security-only review, measured performance, or final release approval.
Required inputs
Resolve repository/scope, base and exact head or bounded area, intended behavior and PR acceptance criteria, affected consumers/contracts/tests, repository AGENTS.md and optional REVIEW.md, generated/vendor boundaries, working-tree state, approval, and protected user work.
Safety baseline
- Begin read-only for reviews. Do not infer edit, merge, approval, or policy-change authority from a request to review.
- Preserve uncommitted work, author history, existing review decisions, and repository-specific instructions.
- Findings require a reachable contract failure and precise evidence, not stylistic preference or hypothetical problems.
- Pre-existing defects are not newly introduced regressions. Distinguish and deduplicate them.
- AI reviewer findings never count as required human approvals. Repository/host controls and release judgment remain separate.
Workflow
- Freeze the changed surface. Record base/head, PR purpose, changed files, impacted callers, state/data/permissions, contracts, tests and exclusions. Compare subsequent fix commits against the last reviewed head.
- For a PR or diff, load pr-review-protocol.md. Select Quick, Standard, or Deep review from blast radius, consequence and reversibility, not diff length. Read a local
REVIEW.mdif present, without assuming automatic enforcement. For Rust code, read rust-review.md for consumer compatibility, ownership/runtime boundaries, unsafe evidence, and configuration-specific checks. For other language contracts, load only the relevant Kotlin, Python, C++, Swift, or Go checklist. These self-contained review aids do not transfer finding admission or edit authority to an implementation skill. - Challenge candidate findings. Apply finding-contract.md. Trace reachable triggers, guards and counterexamples before admitting a claim. Use a genuinely fresh-context read-only reviewer on higher-risk changes if available and proportionate. Never call same-context analysis independent verification.
- Return a high-signal result. Begin with
Actionable findings: N, including0when justified. Cite precise introduced defects, separate pre-existing issues, identify checked SHAs, list observed test/CI evidence, risk and coverage gaps. - Make approved fixes converge. Fix the defect class, test affected invariants, and re-review only the new delta plus possible repair regressions. Preserve finding IDs and don't repeat old nits. After three substantive review rounds, stop automatic fix/review cycling and escalate approach decisions to the owner.
- For refactors, first define parity. Use behavior-parity.md. Load characterization-testing.md when material behavior is untested; load module-seams.md for responsibility redesign. Propose the smallest safe slice, invariants, checks and risks. Stop at
AWAITING_APPROVALif broad edits are not authorized. - Implement only approved refactor slices. Preserve interfaces, characterize legacy behavior where needed, check relevant consumers and test parity, and inspect the final diff for unintended changes.
- Improve project policy only if asked. Use review-policy-template.md for opting into team review policy. When repeated proven agent errors demand prevention, read recurring-errors.md and prefer bounded mechanical checks over more generic prose.
Handoffs and interaction boundaries
security-review owns exploitability when security is the main concern, debugging-investigator owns unexplained runtime symptoms, evolution owns compatibility transitions, performance owns measured bottlenecks, builders own implementation, and verification-and-release owns the integrated ship/no-ship decision. Independent readers are optional and read-only; the primary reviewer owns synthesis and evidence.
Failure handling
If files or candidate revisions are inaccessible, narrow coverage and state the gap. Retire claims that fail falsification instead of inflating confidence. Do not perform more than three automatic review/fix rounds without a fresh owner decision.
Stop conditions
Stop a review with counted, evidence-backed findings (including explicit zero) and remaining coverage limits, without unauthorized edits or approvals. Stop a broad refactor at AWAITING_APPROVAL unless the approved slices and parity evidence are complete. Never silently merge or deploy.
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.

