agentleFS
TheophilusChinomonaTheophilusChinomona/idev/skills/self-review/SKILL.md

self-review

Skill0 starsChanged 5 months agoMITView on GitHub

Code-quality checklist run on Claude's own output before reporting done: unused imports, missing error handling, naming consistency, security issues. Use after completing any code changes.

51 other projects use a version of this.

Adopted by

Most recently taken up by

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.
  • lingzhi227Skill

    latex-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

  • lingzhi227Skill

    novelty-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

  • michaelboedingSkill

    slide-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

  • juanlurgSkill

    paper-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

  • OpenAISkill

    idea-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

  • sunnyclinches44Skill

    explain

    Explains code using real-world analogies and ASCII diagrams

    Also in 5 projects that use this

  • +6 more from lingzhi227

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 10 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 42 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After completing any code creation or modification task

    line 12
  2. Distinctive:

    Before reporting to the user that work is done

    line 13
  3. Distinctive:

    Run AFTER build-check passes (no point reviewing code that doesn't compile)

    line 14
  4. Distinctive:

    Run these on every file created or modified:

    line 26
  5. Distinctive:

    After completing code changes:

    line 100
  6. Distinctive:

    Do NOT review every line — focus on the checklist items

    line 148
  7. Distinctive:

    Do NOT re-read files that weren't changed

    line 149
  8. Distinctive:

    Do NOT block on style preferences — only flag objective issues

    line 150
  9. Distinctive:

    Do NOT add features during review (scope creep)

    line 151
  10. Distinctive:

    Do NOT report trivial issues — fix them silently

    line 152

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Self-Review Skill

Purpose

Automated code review checklist that Claude runs on its own output before reporting "done." Catches unused imports, missing null checks, inconsistent naming, and other common issues that a human reviewer would flag.

Activation

  • After completing any code creation or modification task
  • Before reporting to the user that work is done
  • Run AFTER build-check passes (no point reviewing code that doesn't compile)

How It Works

This is a checklist-based technique, not a scanner. After writing code, Claude re-reads its own output and checks each item. No cache needed.


Phase 1: Universal Checks (All Languages)

Run these on every file created or modified:

□ No unused imports/usings — every import is used in the file
□ No unused variables — every declared variable is referenced
□ No hardcoded strings that should be constants — magic numbers, URLs, messages
□ No console.log/print statements left from debugging
□ No commented-out code blocks left behind
□ No TODO/FIXME/HACK comments added without being tracked in task-journal
□ Consistent naming — follows project convention (PascalCase, camelCase, snake_case)
□ File naming matches project convention
□ Exports match project convention (default vs named)
□ No duplicate code — if same logic exists elsewhere, consider shared utility

Phase 2: Backend Checks

Derive the project's actual invariants from the pattern caches (.claude/idev/backend-patterns/cache.md) and the project rules file — do NOT assume any of these are universal. The items below are EXAMPLES of common invariants; replace them with what the caches say this project actually uses.

□ Controller/route methods use correct HTTP verb (GET for reads, POST for creates, PUT for updates, DELETE for deletes)
□ Route paths follow project convention (consistent with existing routes)
□ All endpoints have the project's auth attribute/middleware (or inherit from base)
□ Service methods follow the project's error handling pattern
□ Entity has all audit fields the project requires (EXAMPLE: CreatedDate, CreatedBy, UpdatedDate, UpdatedBy)
□ Soft delete uses the project's soft-delete flag, NOT physical delete (EXAMPLE: a RecordStatusId column)
□ Multi-tenancy: tenant filter column checked in all queries, if the project is multi-tenant (EXAMPLE: a ClientId column)
□ DTOs don't expose internal fields
□ Mapping method names are consistent with the project convention
□ No N+1 query patterns (loading related entities in a loop)

Phase 3: Frontend Checks

Derive the project's actual invariants from the pattern caches (.claude/idev/frontend-patterns/cache.md) and the project rules file. The items below are EXAMPLES of common invariants — adapt to the detected framework, UI library, and styling approach.

□ Components use the project's typing convention (EXAMPLE: React FC typing)
□ Props interfaces are defined (not inline anonymous types)
□ Hooks follow naming convention (use* prefix)
□ useQuery/useMutation have proper query keys (if a query library is used)
□ Error states are handled (isError, error display)
□ Loading states are handled (isLoading, skeleton/spinner)
□ Empty states are handled (no data → show empty message)
□ Event handlers are memoized where needed
□ No direct state mutation (always use setter functions)
□ UI library components follow project patterns (size, styling)
□ Styling is consistent with the project's approach (EXAMPLE: Tailwind classes, no inline styles when a utility class exists)
□ Types match the API response shape (check api-contract-validation)

Phase 4: Security Checks

□ No secrets/credentials in source code
□ No SQL injection vectors (parameterized queries only)
□ No XSS vectors (user input is sanitized before rendering)
□ No command injection (user input not passed to exec/system calls)
□ Auth checks present on all endpoints that need them
□ CORS is not overly permissive
□ No sensitive data in URL query parameters (use POST body)
□ No sensitive data logged to console or error logs

Phase 5: How to Run

After completing code changes:

1. For each file created/modified, re-read it
2. Run through applicable checklists (universal + language-specific)
3. If issues found:
   a. Fix automatically if straightforward (unused import → remove)
   b. Flag to user if judgment needed (naming choice, architecture decision)
4. Report: "Self-review: N files checked, M issues found and fixed"
   Or: "Self-review: clean, no issues"

When to SKIP self-review:

- Quick one-line fixes (typo, single property change)
- Non-code files (.md, .json, .txt, config)
- User explicitly says "skip review"

Depth levels:

Quick review: Universal checks only (~30 seconds)
Standard review: Universal + language-specific (~1 minute)
Deep review: All checks including security (~2 minutes)

Default: Standard review
Use deep review for: new features, auth changes, data handling changes

Phase 6: Integration

Feature creation workflow:
  1. Load lessons-learned → prevention steps
  2. Create files
  3. post-creation-verify → registration checks
  4. build-check → compile
  5. api-contract-validation → FE↔BE match
  6. self-review → code quality check  ← THIS SKILL
  7. Report to user

Anti-Patterns

  1. Do NOT review every line — focus on the checklist items
  2. Do NOT re-read files that weren't changed
  3. Do NOT block on style preferences — only flag objective issues
  4. Do NOT add features during review (scope creep)
  5. Do NOT report trivial issues — fix them silently

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.