From draft
Scans codebase for technical debt across six categories: code, architecture, tests, dependencies, docs, and infrastructure. Prioritizes findings and generates remediation plans with effort estimates.
npx claudepluginhub mayurpise/draft --plugin draftThis skill uses the workspace's default tool permissions.
You are conducting a technical debt analysis to catalog, prioritize, and plan remediation of debt across the codebase.
Identifies, categorizes, and prioritizes technical debt across code, architecture, tests, dependencies, docs, and infrastructure. Scores by impact, risk, effort; outputs remediation plans.
Identifies, quantifies, and prioritizes technical debt in codebases across code complexity, architecture flaws, testing gaps, documentation lacks, and infrastructure issues. Creates remediation plans.
Identifies, quantifies, and prioritizes technical debt in codebases across code complexity, architecture flaws, outdated tech, testing gaps, docs, and infra. Creates remediation plans with metrics.
Share bugs, ideas, or general feedback.
You are conducting a technical debt analysis to catalog, prioritize, and plan remediation of debt across the codebase.
Not all shortcuts are debt. Check accepted patterns before flagging.
Before starting, capture the current git state:
git branch --show-current # Current branch name
git rev-parse --short HEAD # Current commit hash
Store this for the report header. All findings are relative to this specific branch/commit.
ls draft/ 2>/dev/null
If draft/ doesn't exist, this skill can still run standalone with reduced context.
Read and follow the base procedure in core/shared/draft-context-loading.md.
/draft:tech-debt — Project-wide scan (default)/draft:tech-debt module <name> — Module-scoped scan/draft:tech-debt category <type> — Filter by category (code, architecture, test, dependency, documentation, infrastructure)/draft:tech-debt <path> — Scan specific directory/file patterndraft/tech-stack.md — Critical: "Accepted Patterns" section. Do NOT flag these as debt.draft/guardrails.md — Learned conventions (skip) and anti-patterns (always flag)draft/.ai-context.md — Module boundaries, invariants, known constraintsdraft/product.md — Business priorities for impact assessmentdraft/workflow.md — Team conventions and toolchain for feasibility assessmentScan the codebase systematically across all six categories. For each finding, record: location (file:line), description, evidence, and category.
npm audit, pip audit, etc.)For each finding, score on three dimensions:
Impact (1-5): How much does this hurt development velocity or production reliability?
Risk (1-5): How likely is this to cause a production incident?
Effort (1-5): How much work to remediate?
Priority = (Impact + Risk) / (6 - Effort)
Higher score = higher priority. This formula naturally favors high-impact, low-effort items ("quick wins") and deprioritizes low-impact, high-effort items.
Organize findings into three actionable tiers:
Items that can be fixed in a single sprint or less. Do these first — they deliver the best return on investment.
For each item:
Items requiring dedicated effort. Create via /draft:new-track or feed into /draft:jira-preview.
For each item:
Track but don't prioritize. Revisit quarterly. These items are real debt but the cost of remediation exceeds the current pain.
MANDATORY: Include YAML frontmatter with git metadata. Follow core/shared/git-report-metadata.md.
Include the report header table immediately after frontmatter:
| Field | Value |
|-------|-------|
| **Branch** | `{LOCAL_BRANCH}` → `{REMOTE/BRANCH}` |
| **Commit** | `{SHORT_SHA}` — {COMMIT_MESSAGE} |
| **Generated** | {ISO_TIMESTAMP} |
| **Synced To** | `{FULL_SHA}` |
Save to: draft/tech-debt-report-<timestamp>.md
Create symlink: draft/tech-debt-report-latest.md
TIMESTAMP=$(date +%Y-%m-%dT%H%M)
# Example: draft/tech-debt-report-2026-03-15T1430.md
ln -sf tech-debt-report-${TIMESTAMP}.md draft/tech-debt-report-latest.md
Report structure:
/draft:new-track (refactor tracks — scope the debt before planning)/draft:implement (when TODO/FIXME detected at completion)/draft:deep-review (architecture debt findings)/draft:jira-preview (create remediation tickets from Tier 2 items)/draft:testing-strategy (Test Debt findings inform test planning)core/shared/jira-sync.mdIf no draft context: Run with reduced analysis, note: "Run /draft:init for better debt detection with accepted-pattern filtering"
If tech-stack.md has accepted patterns: Explicitly skip those patterns, note: "Skipped N accepted patterns from tech-stack.md"
If >100 findings: Group by category, show top 20 by priority in the summary, full list in Category Details section
If module scope requested but module not found: List available modules, ask user to confirm