self-review
Skill1 starsChanged 7 months agoMITView on GitHub
Reviews code quality before staging. Triggers ONLY when: implementation of a feature or fix is complete and code is ready to stage. Do NOT trigger after every small edit — only when a logical unit of work is done.
51 other projects use a version of this.
Adopted by
Most recently taken up by
- Fractera/Agent-Engineering-Infrastructuretheir own version, first seen Nov 8, 2026
- Fractera/Agentic-Engineering-Infrastructuretheir own version, first seen Nov 8, 2026
- aniketshukla1/sdlc-kittheir own version, first seen Nov 8, 2026
- plannotator/dev-skillstheir own version, first seen Nov 8, 2026
- Vumb-VibeCoder/hook-everythingtheir own version, first seen Nov 8, 2026
- crbnos/carbontheir own version, first seen Nov 7, 2026
Used with
Projects with it also use latex-formatting, novelty-assessment and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
lingzhi227Skilllatex-formatting
Handle LaTeX formatting, templates, and styling for academic papers. Set up conference templates (ICML, ICLR, NeurIPS, AAAI, ACL), fix formatting issues, manage packages, and ensure venue-specific compliance. Use when the user needs to set up a paper template, fix LaTeX formatting, or prepare for submission.
Also in 4 projects that use this
lingzhi227Skillnovelty-assessment
Assess research idea novelty through systematic literature search. Multi-round search-evaluate loops with harsh critic persona. Binary novel/not-novel decision with justification. Use before committing to a research direction.
Also in 4 projects that use this
michaelboedingSkillslide-generation
Use this skill to create presentation slides from structured content. Triggers: "create slides", "generate presentation", "make powerpoint", "create pptx", "build slides", "presentation from content", "slide deck", "slides for" Outputs: PPTX files, Markdown slides, or HTML presentations. Used by: pitch-deck-agent, market-researcher-agent, and other agents needing slides.
Also in 4 projects that use this
juanlurgSkillpaper-to-code
Reads a research paper and generates an implementation notebook with equations, code, and a toy example. Use when the user wants to implement a paper, convert a paper to code, or reproduce a paper's algorithm.
Also in 4 projects that use this
OpenAISkillidea-generation
Use when triaging public-equity idea candidates. Do not use for final trade recommendations, pitches, memos, or models.
Also in 3 projects that use this
sunnyclinches44Skillexplain
Explains code using real-world analogies and ASCII diagrams
Also in 5 projects that use this
- +6 more from lingzhi227
Other versions51 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 51
- huggingface/diffusers★ 35ksame name
- zulip/zulip★ 26ksame name
- flashinfer-ai/flashinfer★ 6.9ksame name
- unkeyed/unkey★ 5.5ksame name
- crbnos/carbon★ 2.8ksame name
- verl-project/verl-omni★ 1.5ksame name
- K9i-0/ccpocket★ 1.1ksame name
- anyproto/anytype-swift★ 525same name
- hegeldev/hegel-rust★ 400same name
- lingzhi227/agent-research-skills★ 350same name
41 more not listed
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 repository30 other files it gives its agents.
- claude.mdCLAUDE.md
- biz-thinkSkill
- biz-validateSkill
- brand-buildSkill
- community-engageSkill
- content-createSkill
- content-distributeSkill
- copy-craftSkill
- data-decideSkill
- finance-opsSkill
- growth-trackSkill
- infra-opsSkill
- issue-createSkill
- legal-guardSkill
- post-mergeSkill
- pre-codeSkill
- pre-commitSkill
- pre-prSkill
- product-evalSkill
- project-initSkill
- retroSkill
- roadmap-steerSkill
- sales-closeSkill
- search-evalSkill
- sopSkill
- staging-verifySkill
- support-opsSkill
- test-gateSkill
- ux-auditSkill
- work-breakdownSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 42 edited versions we read keep these.
7
Distinctive
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 10
Non-negotiable: Never skip. Never assume correctness.
- Distinctive: line 16
Before reviewing code quality, verify the process was followed:
- Distinctive: line 20
If ANY of these are NO: STOP.
- Distinctive: line 26
Run git diff and git diff --staged — read EVERY line.
- Distinctive: line 103
If ANY issue was found and fixed during this self-review, extract a REUSABLE PRINCIPLE — not a log entry.
- Distinctive: line 107
Generalize: Ask "what universal rule would have prevented this AND all similar future mistakes?" Strip away project-specific details.
- Very specific: line 108
De-duplicate: Read memory/principles.md — does a similar principle already exist?
- Distinctive: line 133
Run the code, write a test, or verify — do not guess
“Common” is measured: kept by at least 6 in 10 of the 42 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Self-Review: Code Quality Gate
When this triggers: implementation complete, code written/modified, about to git add, or sub-agent returns code changes.
Non-negotiable: Never skip. Never assume correctness. Every line could contain a bug.
0. Process Compliance Check
Before reviewing code quality, verify the process was followed:
- Was
pre-codeinvoked (via Skill tool) before implementation started? - Was an issue created before code was written?
- Is the branch correctly named and created from
dev? - If ANY of these are NO: STOP. Do not proceed with self-review. Fix the process violation first — create the missing issue, fix the branch, or re-run pre-code.
Step 1: Read Your Own Diff
Run git diff and git diff --staged — read EVERY line.
- Read each hunk as if reviewing someone else's PR — do not skim
- Flag lines you did NOT intend to change (accidental whitespace, unrelated modifications)
- If diff is large, read file by file — never skip files
- Confirm every changed line is intentional and necessary
Step 2: Correctness
- Solves the stated problem? Re-read issue/request, compare against acceptance criteria
- Edge cases handled? Empty input, null/undefined, zero-length arrays, negative numbers, Unicode, concurrent access
- Off-by-one errors? Loop boundaries, array indexing, string slicing, pagination offsets
- Null checks present? Function params, API responses, DB results, optional chaining — every nullable value checked before use
- Race conditions? Missing
await, shared mutable state, async operations that assume ordering - Return values checked? Non-void function return values must be used or explicitly discarded — never silently ignored (NASA Power of 10, Rule 7)
Step 3: Design & Complexity (Google Engineering Practices + Clean Code + SOLID)
- Functions do ONE thing, max ~20 lines (Clean Code, Ch. 3)
- Function arguments: 0 ideal, 1 good, 2 acceptable, 3+ requires refactoring (Clean Code, Ch. 3)
- No boolean/flag arguments — they prove the function does more than one thing (Clean Code, Ch. 3)
- "Too complex" test: if a reader can't understand it quickly, simplify (Google: "too complex")
- No over-engineering — solve the problem NOW, not speculative future needs (Google: YAGNI)
- Single Responsibility: if you describe a class/module with "and", split it (SOLID-S)
- New API? Include a usage example so reviewers see how it's called (Google: small CLs)
- Names are intention-revealing — reader knows what it does from name alone (Clean Code, Ch. 2)
- Comments explain WHY, never WHAT — if code needs a "what" comment, simplify the code (Google)
Step 4: Code Hygiene (Clean Code + Boy Scout Rule)
- Delete dead code — don't comment it out, VCS has history (Clean Code, Ch. 4)
- Delete all unused imports, variables, functions — zero tolerance
- No silently swallowed errors: empty
catch {},.catch(() => {}), ignored rejections — every error must be logged or re-thrown - No backward-compat hacks, alias re-exports, redundant naming (v2/New/Old prefixes)
- No copy-pasted code — if same logic appears twice, extract it (DRY)
- Types are correct and specific — no
anyin TypeScript unless truly unavoidable, no overly broad types - Boy Scout Rule: leave the code cleaner than you found it (Clean Code, Ch. 1)
Step 5: Security (OWASP Top 10 2021)
- No hardcoded secrets — tokens, API keys, passwords, connection strings — not in code, comments, or config literals
- A03 Injection: parameterized queries for ALL database access — never string concatenation for SQL/NoSQL
- A03 XSS: escape/sanitize all user-supplied content before rendering in HTML
- A01 Broken Access Control: deny by default, enforce authorization on every endpoint/action
- A09 Security Logging: log auth attempts and access control failures, but NEVER log sensitive data (passwords, tokens, PII)
- No command injection: never pass user input to
exec(),eval(),child_process, or shell commands - Input validation at system boundaries: API endpoints, form handlers, webhooks — validate and sanitize before processing
6. Scope Check
- Run
git diff --stat— are ALL changed files within the scope identified in pre-code? - If any file was modified that is NOT in the expected scope: justify it or revert it.
- Out-of-scope improvements spotted during development belong in new issues, not this PR.
7. Agent Output Verification
- "Build passes" ≠ "product works." If the build/tests pass, that verifies CODE correctness, not PRODUCT correctness.
- Have you actually SEEN the output? Not read the code — seen the rendered result, clicked the buttons, observed the behavior?
- If a sub-agent reported success: verify it yourself. Agents can write code but cannot judge product quality.
- Rule: Never trust "it should work." Run it. See it. Click it. If you can't verify it visually, flag it for staging-verify or manual testing.
Step 7.5: Generalized Learning
If ANY issue was found and fixed during this self-review, extract a REUSABLE PRINCIPLE — not a log entry.
Process:
- Identify the error type: What category does this belong to? (auth config, scope creep, missing test, data model flaw, etc.)
- Generalize: Ask "what universal rule would have prevented this AND all similar future mistakes?" Strip away project-specific details.
- De-duplicate: Read
memory/principles.md— does a similar principle already exist? If yes → strengthen the wording. If no → add it. - Write one line to
memory/principles.md:- Format:
- [Category] [Universal principle] - ✅ Good:
- [Auth] Any third-party auth integration must verify redirect URLs for ALL deployment environments in pre-code scope - ✅ Good:
- [Testing] Never trust "build passes" — run the full user journey manually or with Playwright after every deploy - ❌ Bad:
- [2026-04-05] Forgot OAuth redirect for staging(this is an event log, not a principle) - ❌ Bad:
- Fixed the Supabase Site URL issue(this is project-specific, not reusable)
- Format:
- Prune during retro: In the
retroskill, reviewmemory/principles.md. Remove principles that haven't been relevant in 3+ months. Merge overlapping principles.
The goal: memory/principles.md is a CONCISE list of 10-30 universal principles that improve every future project — not a growing log of past incidents.
Step 8: Verdict
If ANY issue was found:
- Fix it immediately — do not proceed with staging or committing
- Re-run self-review from Step 1 on the new diff
- Repeat until review is clean
When clean, report:
- Which steps completed, issues found and fixed
- State: "Self-review passed. Ready to stage/commit."
If uncertain about correctness:
- Run the code, write a test, or verify — do not guess
- "It should work" is NOT acceptable — prove it works
Next Steps
Report to user: "Self-review [PASSED/FAILED]. Issues found: [N]. Fixed: [N]. Remaining: [N]"
Suggested next steps (user decides):
- Passed → "Run test-gate"
- UI changes → "Plan ux-audit after PR"
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.

