review-diff

Solid

Scan git diffs for project-specific anti-patterns. Triggers on: 'scan diff', 'check diff', 'anti-pattern check', 'pattern scan', 'review changes'.

Code & Development 70 stars 21 forks Updated 1 months ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
62
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

Scan a git diff for project-specific anti-patterns. This is a fast, targeted scan (seconds), not a full code review. Use `/review` for comprehensive analysis. ## Step 0: Detect project Ensure you are inside a git repository before running diff commands: - If cwd is a git repo: use it - If recent context references a project: `cd` into it first - Check `CLAUDE.md` or the project manifest (package.json, composer.json, pom.xml, Gemfile, *.csproj, go.mod, Cargo.toml, requirements.txt/pyproject.toml, etc.) in the project root to identify the framework and project-specific patterns - If unclear: ask which project ## Step 1: Get the diff Determine the diff source from `$ARGUMENTS`: - **No arguments**: Run `git diff` (unstaged) + `git diff --cached` (staged). Combine both outputs. - **Branch name** (e.g., `feat/xyz`): Run `git diff main...$ARGUMENTS` - **Commit range** (e.g., `HEAD~3..HEAD`): Run `git diff $ARGUMENTS` - **Single commit hash**: Run `git diff $ARGUMENTS~1..$ARGUMENTS` If the diff is empty, report "No changes to scan." and stop. ## Step 2: Scan for anti-patterns Analyze ONLY `+` lines (additions) in the diff. For each pattern below, search the added lines and the surrounding file context when needed. ### Pattern Table | # | Pattern | What to look for | Severity | |---|---------|-----------------|----------| | 1 | **Filter logic mismatch** | String `===` comparisons where one value could be a prefix of the other (e.g., `'All' === value` when value could be `'All...

Details

Author
faizkhairi
Repository
faizkhairi/claude-code-blueprint
Created
5 months ago
Last Updated
1 months ago
Language
Shell
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category