mayurpise/draft/review

Claude Code and agent skill by mayurpise/draft

Trust tier 2
  • community
  • ext:[{"type":"plugin","description":"Custom plugin integration"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Canonical review parent command. Runs the default three-stage review for tracks or project changes, and routes to quick-review, bughunt, deep-review, or assist-review when the user asks for explicit review depth or when the review context justifies escalation.

Install

npx vskill@latest install mayurpise/draft/review

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as mayurpise/draft/review.

Code Review

You are conducting a code review using Draft's Context-Driven Development methodology.

MANDATORY GRAPH LOOKUP (read before any review stage)

When draft/graph/schema.yaml exists, this skill must follow the graph-first lookup contract in core/shared/graph-query.md §Mandatory Lookup Contract. Stage 1 (Automated Validation) starts from the graph:

First resolve the bundled helpers:

bash
# Locate Draft's bundled helpers (cwd is the user's project; ${CLAUDE_PLUGIN_ROOT}
# is not exported into skill Bash). See core/shared/tool-resolver.md.
DRAFT_TOOLS="${DRAFT_PLUGIN_ROOT:-$(cat ~/.cache/draft/plugin-root 2>/dev/null)}/scripts/tools"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/cache/*/draft/*/scripts/tools 2>/dev/null | sort -V | tail -1)"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/marketplaces/*draft*/scripts/tools 2>/dev/null | tail -1)"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$PWD/scripts/tools"
  1. Run blast-radius assessment via "$DRAFT_TOOLS/hotspot-rank.sh" --repo . and "$DRAFT_TOOLS/graph-impact.sh" (see Stage 1).
  2. For each changed file with non-trivial diff size, run "$DRAFT_TOOLS/graph-impact.sh" --repo . --file <path> to obtain the affected module set deterministically.
  3. For each public symbol modified, run "$DRAFT_TOOLS/graph-callers.sh" --repo . --symbol <name> to enumerate downstream callers before judging breaking-change severity.

Filesystem grep is reserved for source-text scans (string literals, log messages, regex matches in code) — not for discovering modules, files, or callers when the graph can answer.

When draft/graph/schema.yaml does not exist, the graph checks do not run and must be reported as not run — never inferred from grep. See Step 0.

Red Flags - STOP if you're

See shared red flags — applies to all code-touching skills.

Skill-specific:

  • Reviewing without reading the track's spec.md and plan.md first
  • Reporting findings without reading the actual code
  • Skipping spec compliance stage and jumping to code quality
  • Making up file locations or line numbers
  • Claiming "no issues" without systematic analysis evidence

Read before you review. Evidence over opinion.


Overview

This command is the canonical review parent.

It orchestrates review workflows at two levels:

  • Track-level: Review against spec.md and plan.md (three-stage: automated validation, spec compliance, code quality)
  • Project-level: Review arbitrary changes (automated validation + code quality)

Specialist review workflows remain available:

  • /draft:quick-review
  • /draft:bughunt
  • /draft:deep-review
  • /draft:assist-review

/draft:review should remove the burden of choosing among them when the right depth is obvious from user intent or track state.

Important semantic note:

  • /draft:impact is not a review-depth mode in the current product. It measures project/track delivery telemetry, not code-change review depth. Do not route /draft:review to /draft:impact.

Automated static validation (OWASP secrets, dead code, dependency cycles, N+1 patterns) is natively built into Stage 1 of this review.


Step 0: Detect Setup Level (run first, always)

/draft:review is context-optional. It runs on an un-indexed repo with no setup, so a first-time user gets findings before paying for /draft:init.

bash
ls draft/ 2>/dev/null # absent -> zero-setup mode
ls draft/graph/schema.yaml 2>/dev/null # absent -> graph-less
draft/graphModeBehavior
absentabsentzero-setupFollow references/zero-setup-mode.md for scope resolution, stage behavior, output, and CTA. Skip Steps 2.1–2.2 and Stage 2.
presentabsentgraph-lessFull workflow minus graph queries. Report every graph check as not run.
presentpresentfullEverything below.

Do not print "Draft not initialized" and stop — that error belongs to skills that cannot function without context (/draft:learn, /draft:deep-review, /draft:tech-debt, /draft:implement). See core/shared/context-verify.md.

In any degraded mode: report what did not run, never simulate it, and end with the specific checks that indexing would add.


Step 1: Parse Arguments

Extract and validate command arguments from user input.

Supported Arguments

Explicit review modes:

  • quick - Route to /draft:quick-review
  • bughunt - Route to /draft:bughunt
  • deep - Route to /draft:deep-review
  • assist - Route to /draft:assist-review

Scope specifiers (mutually exclusive for baseline review):

  • track <id|name> - Review specific track (exact ID or fuzzy name match)
  • project - Review uncommitted changes (git diff HEAD)
  • files <pattern> - Review specific file pattern (e.g., src/**/*.ts)
  • commits <range> - Review commit range (e.g., main...HEAD, abc123..def456)

Quality integration modifiers:

  • with-bughunt - Include /draft:bughunt results
  • with-assist - Include /draft:assist-review summary
  • full - Enable all sensible add-ons for the selected scope (with-bughunt, with-assist, and any justified deep-review escalation)
Validation Rules
  1. Mode exclusivity: At most one explicit mode among quick, bughunt, deep, assist
  2. Scope requirement: At least one scope specifier OR no arguments (auto-detect track/project)
  3. Scope exclusivity: Only one of track, project, files, commits
  4. Modifier normalization: If full is present, enable with-bughunt and with-assist. Do not silently force deep; deep-review is module-scoped and must still satisfy escalation rules.
Default Behavior

If no arguments provided:

  • Auto-detect active [~] In Progress track from draft/tracks.md
  • If no [~] track, find first [ ] Pending track
  • If track found: display Auto-detected track: <id> - <name> [<status>] and proceed
  • If no track is found but the repo has local changes: default to project-level review of current changes
  • If no draft/tracks.md exists (zero-setup mode): resolve scope from git per references/zero-setup-mode.md §Scope resolution without tracks — uncommitted changes, else branch-vs-default diff, else HEAD
  • If no track and no changes: error "No review scope found. Specify a track, files, commit range, or create changes to review."

Step 1.5: Route Explicit Modes Before Baseline Review

If the user explicitly invoked a specialist mode, route directly.

Explicit Mode Routing
  • /draft:review quick ... → follow /draft:quick-review
  • /draft:review bughunt ... → follow /draft:bughunt
  • /draft:review deep ... → follow /draft:deep-review
  • /draft:review assist ... → follow /draft:assist-review

When routing, preserve any scope that can be mapped sensibly.

Examples:

  • /draft:review quick files "src/**/*.ts" → quick review of those files
  • /draft:review bughunt track payments-refactor → bughunt scoped to that track
  • /draft:review deep auth → deep-review of the auth module
  • /draft:review assist track add-user-auth → reviewer-assist summary for that track

Explicit mode always wins over automatic escalation.

If no explicit mode is present, continue with the baseline /draft:review workflow below.


Step 2: Determine Review Scope

Based on parsed arguments, determine review scope and load appropriate context.

Track-Level Review

Trigger: track <id|name> argument OR auto-detected track

2.1: Resolve Track
  1. Check if argument is exact directory match:

``bash ls draft/tracks/<arg>/ 2>/dev/null ``

If exists → use this track

  1. Parse tracks.md for fuzzy matching:
  • Read draft/tracks.md
  • Split by --- separators
  • For each section, extract:
  • Track ID (from path: ./tracks/<id>/)
  • Track name (from heading: ### <id> - <name>)
  • Match input against:
  • Exact ID (case-insensitive)
  • Partial ID (substring)
  • Partial name (substring, case-insensitive)
  1. Handle matches:
  • Exact match: Use immediately
  • Multiple matches: Display numbered list with format:

```text Multiple tracks match '<input>':

  1. <id> - <name> [<status>]
  2. <id> - <name> [<status>]

Select track (1-N): ```

Validate selection is within 1-N range. Re-prompt on invalid input.

  • No matches: Error with suggestions (closest 3 by edit distance)
2.2: Load Track Context

Once track is resolved:

  1. Verify track directory exists:

``bash ls draft/tracks/<id>/ 2>/dev/null ``

  1. Read spec.md:
  • Load draft/tracks/<id>/spec.md
  • Extract: Summary, Requirements, Acceptance Criteria, Non-Goals
  • Store for Stage 1 compliance checks
  1. Read hld.md and lld.md (when present):
  • draft/tracks/<id>/hld.md — extract §High-Level Design / Architecture, §Detailed Design (per-component subsections), §Dependencies, §Checklist (Performance/Scale/Security/Resiliency/Multi-tenancy/Upgrade/Cost), §Approvals
  • draft/tracks/<id>/lld.md — extract §Classes and Interfaces (signatures, invariants), §Data Model (schemas, migrations), §Error Handling, §Observability metrics
  • Store for HLD/LLD compliance pass (Stage 1.5 below)
  1. Read plan.md:
  • Load draft/tracks/<id>/plan.md
  • Extract commit SHAs from completed [x] task lines only. Match pattern: 7+ character hex strings in parentheses, regex \(([a-f0-9]{7,})\). Example: - [x] **Task 1.1:** Description (7a7dc85). Collect SHAs in order of appearance; deduplicate keeping first occurrence.
  • Determine commit range:
  • First commit parent: run git rev-parse <first_SHA>^ 2>/dev/null
  • If the parent exists: use <first_SHA>^..<last_SHA> as the range
  • If the parent does NOT exist (first commit in the repo — git rev-parse fails): use the empty tree SHA 4b825dc642cb6eb9a060e54bf8d69288fbee4904 as the range start, i.e., 4b825dc642cb6eb9a060e54bf8d69288fbee4904..<last_SHA>. Alternatively, for single-commit ranges, use git diff-tree --root -p <first_SHA> to obtain the diff.
  • Last commit: <last_SHA>
  1. Check for incomplete work:
  • Parse plan.md task statuses
  • Count [ ], [~], [x], [!] tasks
  • If [ ] or [~] tasks exist: Display warning and proceed:

``yaml Warning: Track has N incomplete tasks (M in-progress, K pending). Reviewing completed work only. ``

  1. Handle missing files:
  • Missing spec.md: Error "spec.md not found for track <id>"
  • Missing plan.md: Warn "plan.md not found, skipping commit extraction"
  • No commits found: Warn "No commits found in plan.md, review may be incomplete"
Project-Level Review

Trigger: project, files <pattern>, commits <range> argument, or no active track with local changes

2.3: Project Scope Detection
  1. `project` argument:
  • Scope: Uncommitted changes
  • Command: git diff HEAD
  1. `files <pattern>` argument:
  • Scope: Specific files matching glob pattern
  • Command: git diff HEAD -- <pattern>
  • Validate pattern matches files:

``bash git ls-files <pattern> | head -1 ``

If empty: Error "No files match pattern '<pattern>'"

  1. `commits <range>` argument:
  • Scope: Commit range
  • Validate range exists:

``bash git rev-parse <range> 2>/dev/null ``

If fails: Error "Invalid commit range '<range>'"

  • Command: git diff <range>
2.4: Load Project Context

For project-level reviews (no track context):

  1. Load Draft context (if available):

Read and follow the base procedure in core/shared/draft-context-loading.md.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
39
Repository forks
5
7-day trend score
18

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • pluginCustom plugin integration

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/mayurpise/draft/review/badge)](https://verified-skill.com/skills/mayurpise/draft/review)

Something wrong with this skill or its page? Tell us.