Code Review Command Generator
Generate a project-specific /{PREFIX}-code-review Claude Code command that performs deep clean code analysis tailored to the repo's tech stacks, module structure, and architecture.
What This Skill Produces
A single Claude Code command: .claude/commands/{PREFIX}-code-review.md
The generated command includes:
- Scope mapping (keyword → directory paths)
- All 7 clean code categories with tech-appropriate examples and thresholds
- Stack-specific quality checks for the project's languages/frameworks only
- Per-category structured report tables
- Post-report triage with issue command integration (when available)
- Quality check commands per workspace area
Workflow
Phase 1: Auto-Detect Project Structure
Scan the repo root for tech markers:
| Marker |
Tech |
Cargo.toml |
Rust |
pyproject.toml, setup.py, requirements.txt |
Python |
go.mod |
Go |
build.gradle, build.gradle.kts, pom.xml |
Java/Kotlin |
package.json (check dependencies for framework) |
TypeScript + React/Next.js/Svelte |
*.xcodeproj, Package.swift |
Swift/iOS |
settings.gradle with android |
Kotlin/Android |
Map detected technologies to workspace areas by examining directory structure. Look for common patterns:
- Monorepo:
crates/, packages/, apps/, services/
- Standard:
src/, lib/, cmd/, internal/
- Frontend:
frontend/, web/, app/
- Mobile:
ios-app/, android-app/, apps/ios/, apps/android/
Phase 2: Confirm with User
Present detected workspace areas and ask the user to confirm or adjust. Gather:
- Workspace areas — present detected modules with paths; let user add/remove/rename
- Project prefix — short name for the command (e.g.,
frk → /{frk}-code-review). If a {PREFIX}-issue or {PREFIX}-start command already exists in .claude/commands/, suggest reusing that prefix.
- Architecture style — hexagonal, layered, flat, microservices, or custom. This determines the dependency order for reviewing code (e.g., core → infrastructure → API → frontend for hexagonal).
- Project-specific rules — any architectural constraints to respect during review. Examples: "CMS 3-layer architecture is intentional", "adapter pattern in infrastructure is production-ready", "greenfield — delete dead code directly". These become extra rules in the generated command.
- Quality check commands — per workspace area. Auto-suggest from
references/tech-checks.md based on detected tech, let user confirm or override.
Phase 3: Generate the Command
Read the following references to compose the command:
assets/code-review-command.md — structural template with placeholders
references/categories.md — 7 categories with per-tech variants
references/tech-checks.md — stack-specific quality checks
Placeholder resolution:
| Placeholder |
Source |
{ISSUE_COMMAND_NOTE} |
If /{PREFIX}-issue exists: — does NOT create GitHub issues (use /{PREFIX}-issue for that). Otherwise: empty. |
{SCOPE_TABLE} |
Workspace areas as argument → path mapping table. Always include all (full codebase, one area at a time) and path/to/file (single file or directory). |
{DEPENDENCY_ORDER} |
Work in dependency order: X → Y → Z. based on architecture style. |
{CATEGORIES} |
All 7 categories from references/categories.md. Include only the tech-specific items matching this project's stacks. Use thresholds for the project's languages. |
{STACK_CHECKS} |
Relevant sections from references/tech-checks.md only. Do not include stacks the project doesn't use. |
{ISSUE_COMMAND_REF} |
If /{PREFIX}-issue exists: (/{PREFIX}-issue). Otherwise: empty. |
{PROJECT_RULES} |
User-provided architectural constraints as additional rule bullets. |
{QUALITY_COMMANDS} |
- **Quality checks**: followed by the per-area check commands. |
Write the assembled command to .claude/commands/{PREFIX}-code-review.md.
Phase 4: Commit
Stage and commit:
git add .claude/commands/{PREFIX}-code-review.md
git commit -m "chore: add {PREFIX}-code-review command"
Design Principles
- Self-contained output — the generated command works without this skill being installed
- Tech-appropriate — only includes categories, examples, thresholds, and checks relevant to the project's actual tech stacks
- No false positives — the generated command emphasizes verification before reporting
- Integrates with existing workflow — detects and references existing issue/start commands
- Re-runnable — can regenerate the command when repo structure changes
Source: descoped/llm-skills — distributed by TomeVault.
1---2name: descoped-llm-skills-code-review3description: Code Review Command Generator4---56# Code Review Command Generator78Generate a project-specific `/{PREFIX}-code-review` Claude Code command that performs deep clean code analysis tailored to the repo's tech stacks, module structure, and architecture.910## What This Skill Produces1112A single Claude Code command: `.claude/commands/{PREFIX}-code-review.md`1314The generated command includes:15- Scope mapping (keyword → directory paths)16- All 7 clean code categories with tech-appropriate examples and thresholds17- Stack-specific quality checks for the project's languages/frameworks only18- Per-category structured report tables19- Post-report triage with issue command integration (when available)20- Quality check commands per workspace area2122## Workflow2324### Phase 1: Auto-Detect Project Structure2526Scan the repo root for tech markers:2728| Marker | Tech |29|--------|------|30| `Cargo.toml` | Rust |31| `pyproject.toml`, `setup.py`, `requirements.txt` | Python |32| `go.mod` | Go |33| `build.gradle`, `build.gradle.kts`, `pom.xml` | Java/Kotlin |34| `package.json` (check `dependencies` for framework) | TypeScript + React/Next.js/Svelte |35| `*.xcodeproj`, `Package.swift` | Swift/iOS |36| `settings.gradle` with android | Kotlin/Android |3738Map detected technologies to workspace areas by examining directory structure. Look for common patterns:39- Monorepo: `crates/`, `packages/`, `apps/`, `services/`40- Standard: `src/`, `lib/`, `cmd/`, `internal/`41- Frontend: `frontend/`, `web/`, `app/`42- Mobile: `ios-app/`, `android-app/`, `apps/ios/`, `apps/android/`4344### Phase 2: Confirm with User4546Present detected workspace areas and ask the user to confirm or adjust. Gather:47481. **Workspace areas** — present detected modules with paths; let user add/remove/rename492. **Project prefix** — short name for the command (e.g., `frk` → `/{frk}-code-review`). If a `{PREFIX}-issue` or `{PREFIX}-start` command already exists in `.claude/commands/`, suggest reusing that prefix.503. **Architecture style** — hexagonal, layered, flat, microservices, or custom. This determines the dependency order for reviewing code (e.g., core → infrastructure → API → frontend for hexagonal).514. **Project-specific rules** — any architectural constraints to respect during review. Examples: "CMS 3-layer architecture is intentional", "adapter pattern in infrastructure is production-ready", "greenfield — delete dead code directly". These become extra rules in the generated command.525. **Quality check commands** — per workspace area. Auto-suggest from `references/tech-checks.md` based on detected tech, let user confirm or override.5354### Phase 3: Generate the Command5556Read the following references to compose the command:57- `assets/code-review-command.md` — structural template with placeholders58- `references/categories.md` — 7 categories with per-tech variants59- `references/tech-checks.md` — stack-specific quality checks6061**Placeholder resolution:**6263| Placeholder | Source |64|-------------|--------|65| `{ISSUE_COMMAND_NOTE}` | If `/{PREFIX}-issue` exists: ` — does NOT create GitHub issues (use /{PREFIX}-issue for that)`. Otherwise: empty. |66| `{SCOPE_TABLE}` | Workspace areas as argument → path mapping table. Always include `all` (full codebase, one area at a time) and `path/to/file` (single file or directory). |67| `{DEPENDENCY_ORDER}` | `Work in dependency order: X → Y → Z.` based on architecture style. |68| `{CATEGORIES}` | All 7 categories from `references/categories.md`. Include only the tech-specific items matching this project's stacks. Use thresholds for the project's languages. |69| `{STACK_CHECKS}` | Relevant sections from `references/tech-checks.md` only. Do not include stacks the project doesn't use. |70| `{ISSUE_COMMAND_REF}` | If `/{PREFIX}-issue` exists: ` (/{PREFIX}-issue)`. Otherwise: empty. |71| `{PROJECT_RULES}` | User-provided architectural constraints as additional rule bullets. |72| `{QUALITY_COMMANDS}` | `- **Quality checks**: ` followed by the per-area check commands. |7374Write the assembled command to `.claude/commands/{PREFIX}-code-review.md`.7576### Phase 4: Commit7778Stage and commit:79```bash80git add .claude/commands/{PREFIX}-code-review.md81git commit -m "chore: add {PREFIX}-code-review command"82```8384## Design Principles8586- **Self-contained output** — the generated command works without this skill being installed87- **Tech-appropriate** — only includes categories, examples, thresholds, and checks relevant to the project's actual tech stacks88- **No false positives** — the generated command emphasizes verification before reporting89- **Integrates with existing workflow** — detects and references existing issue/start commands90- **Re-runnable** — can regenerate the command when repo structure changes9192---93> Source: [descoped/llm-skills](https://github.com/descoped/llm-skills) — distributed by [TomeVault](https://tomevault.io).94<!-- tomevault:4.0:skill_md:2026-04-26 -->