All skills
sanyuan0704 avatar

/code-review-expert

@ae75e91
by Shawn Yangsanyuan0704/sanyuan-skills3.9k stars
344

Expert code review of current git changes with a senior engineer lens. Detects SOLID violations, security risks, and proposes actionable improvements.

Use this Skill: https://skilld.dev/gh/sanyuan0704/sanyuan-skills/code-review-expert

This session only. Nothing lands on disk.

README.md

≈590 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Code Review Expert

A comprehensive code review skill for AI agents. Performs structured reviews with a senior engineer lens, covering architecture, security, performance, and code quality.

Installation

npx skills add sanyuan0704/sanyuan-skills --path skills/code-review-expert

Features

  • SOLID Principles - Detect SRP, OCP, LSP, ISP, DIP violations
  • Security Scan - XSS, injection, SSRF, race conditions, auth gaps, secrets leakage
  • Performance - N+1 queries, CPU hotspots, missing cache, memory issues
  • Error Handling - Swallowed exceptions, async errors, missing boundaries
  • Boundary Conditions - Null handling, empty collections, off-by-one, numeric limits
  • Removal Planning - Identify dead code with safe deletion plans

Usage

After installation, simply run:

/code-review-expert

The skill will automatically review your current git changes.

Workflow

  1. Preflight - Scope changes via git diff
  2. SOLID + Architecture - Check design principles
  3. Removal Candidates - Find dead/unused code
  4. Security Scan - Vulnerability detection
  5. Code Quality - Error handling, performance, boundaries
  6. Output - Findings by severity (P0-P3)
  7. Confirmation - Ask user before implementing fixes

Severity Levels

Level Name Action
P0 Critical Must block merge
P1 High Should fix before merge
P2 Medium Fix or create follow-up
P3 Low Optional improvement

Structure

code-review-expert/
├── SKILL.md                 # Main skill definition
├── agents/
│   └── agent.yaml           # Agent interface config
└── references/
    ├── solid-checklist.md   # SOLID smell prompts
    ├── security-checklist.md    # Security & reliability
    ├── code-quality-checklist.md # Error, perf, boundaries
    └── removal-plan.md      # Deletion planning template

References

Each checklist provides detailed prompts and anti-patterns:

  • solid-checklist.md - SOLID violations + common code smells
  • security-checklist.md - OWASP risks, race conditions, crypto, supply chain
  • code-quality-checklist.md - Error handling, caching, N+1, null safety
  • removal-plan.md - Safe vs deferred deletion with rollback plans

License

MIT

Source: SKILL.md on GitHub

No alerts16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The 'Code Review Expert' skill provides structured analysis of code changes, focusing on security, performance, and design principles. It operates using local git tools and requires user approval before making any changes to the codebase, maintaining a safe and transparent workflow.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    7 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at ae75e91. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 7 months ago

README badge

README badge for sanyuan0704/sanyuan-skills/code-review-expert