{"data":{"slug":"github-donchitos-claude-code-game-studios-claude-skills-tech-debt-cae33d2509ca","title":"Tech Debt Categorization and Prioritization","summary":"Classify and prioritize technical debt across the codebase using structured categories and workflow automation. The skill scans for debt indicators, maintains a register, and generates reports. It supports categorization into six types of debt and prioritization based on impact and effort.","url":"https:\/\/skillshunter.net\/skills\/github-donchitos-claude-code-game-studios-claude-skills-tech-debt-cae33d2509ca","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-donchitos-claude-code-game-studios-claude-skills-tech-debt-cae33d2509ca","markdown_url":"https:\/\/skillshunter.net\/skills\/github-donchitos-claude-code-game-studios-claude-skills-tech-debt-cae33d2509ca.md","download_url":"https:\/\/skillshunter.net\/skills\/github-donchitos-claude-code-game-studios-claude-skills-tech-debt-cae33d2509ca\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before running the scan, ensure the code root is resolved (e.g., `src\/`, `Assets\/`, or `Source\/`). When adding new debt entries, the user must provide the category, effort, and impact. The register must exist at `docs\/tech-debt-register.md` for prioritization mode.","instructions":"---\nname: tech-debt\ndescription: \"Track, categorize and prioritize technical debt across the codebase \u2014 scans for debt indicators, maintains a register.\"\nargument-hint: \"[scan|add|prioritize|report]\"\nuser-invocable: true\nallowed-tools: Read, Glob, Grep, Write, Edit, AskUserQuestion, Bash(bash \"*\/.claude\/skills\/tech-debt\/..\/..\/hooks\/yaml-helper.sh\" resolve_config *)\nmodel: sonnet\n---\n\n!`bash \"${CLAUDE_SKILL_DIR}\/..\/..\/hooks\/yaml-helper.sh\" resolve_config --keys automation,workflow`\n\n# Tech Debt\n\n\n\nEvery `AskUserQuestion` call follows `.claude\/docs\/automation-modes.md`\n(collaborative asks always \u00b7 guided major-only \u00b7 autonomous logs and proceeds;\n`automation_always_ask` categories always prompt).\n\n## Phase 1: Parse Subcommand\n\nDetermine the mode from the argument:\n\n- `scan` \u2014 Scan the codebase for tech debt indicators\n- `add` \u2014 Add a new tech debt entry manually\n- `prioritize` \u2014 Re-prioritize the existing debt register\n- `report` \u2014 Generate a summary report of current debt status\n\nIf no subcommand is provided, output usage and stop. Verdict: **FAIL** \u2014 missing required subcommand.\n\n---\n\n## Phase 2A: Scan Mode\n\nSearch the **code root** (resolve per `.claude\/docs\/code-root-resolution.md`:\n`src\/`, `Assets\/` or `Source\/` by engine) for debt indicators:\n\n- `TODO` comments (count and categorize)\n- `FIXME` comments (these are bugs disguised as debt)\n- `HACK` comments (workarounds that need proper solutions)\n- `@deprecated` markers\n- Duplicated code blocks (similar patterns in multiple files)\n- Files over 500 lines (potential god objects)\n- Functions over 50 lines (potential complexity)\n\nCategorize each finding:\n\n- **Architecture Debt**: Wrong abstractions, missing patterns, coupling issues\n- **Code Quality Debt**: Duplication, complexity, naming, missing types\n- **Test Debt**: Missing tests, flaky tests, untested edge cases\n- **Documentation Debt**: Missing docs, outdated docs, undocumented APIs\n- **Dependency Debt**: Outdated packages, deprecated APIs, version conflicts\n- **Performance Debt**: Known slow paths, unoptimized queries, memory issues\n\n**Before presenting anything, establish that there was something to scan.**\nCount the source files the scan actually covered. If the code root is\nunresolved, report `NOT ASSESSED \u2014 code root unresolved` and stop as below. If\nthat count is **zero** \u2014 the code root is absent, or holds no source files \u2014 report:\n\n> **NOT ASSESSED \u2014 no source files to scan.** The code root contains no code, so\n> \"no debt indicators found\" would be a statement about an empty search, not\n> about the codebase. Run this once implementation is under way.\n\nand stop. Do not write to the register and do not emit a COMPLETE verdict.\n\nThe distinction is the whole point of the scan: **zero findings over 400 files\nis a clean codebase; zero findings over zero files is no information at all.**\nRendering both as \"COMPLETE \u2014 scan findings written to register\" reads as the\nfirst. State the denominator whenever findings are reported,\nincluding when it is large and the count is genuinely zero.\n\nPresent the findings to the user.\n\nAsk: \"May I write these findings to `docs\/tech-debt-register.md`?\"\n\nIf yes, update the register, never overwriting it. **Match before appending:** a\nfinding with the same file and the same kind of debt as an existing `Open` entry\nupdates that entry instead of adding a duplicate. An existing `Open` entry whose\npattern is no longer in its file is proposed as `Resolved [date]` \u2014 list those and\ninclude them in the same approval. Verdict: **COMPLETE** \u2014 scan findings written to register.\n\nIf no, stop here. Verdict: **BLOCKED** \u2014 user declined write.\n\n---\n\n## Phase 2B: Add Mode\n\nAsk the user for the description and affected files (plain text prompts).\n\n**Run as a subagent?** `lead-programmer` preloads this skill, and a subagent has\nno `AskUserQuestion`. Return the three questions below (category, effort,\nimpact) in one reply, each as a short list of its options, and stop: whoever\ncalled you asks the user. Nothing goes into the register until the answers\ncome back.\n\nThen use `AskUserQuestion` to collect the **category**:\n- Prompt: \"What category does this tech debt belong to?\"\n- Options:\n  - `[A] Architecture Debt \u2014 wrong abstractions, missing patterns, coupling issues`\n  - `[B] Code Quality Debt \u2014 duplication, complexity, naming, missing types`\n  - `[C] Test Debt \u2014 missing tests, flaky tests, untested edge cases`\n  - `[D] Documentation Debt \u2014 missing\/outdated docs, undocumented APIs`\n  - `[E] Dependency Debt \u2014 outdated packages, deprecated APIs, version conflicts`\n  - `[F] Performance Debt \u2014 known slow paths, memory issues, unoptimized queries`\n\nThen use `AskUserQuestion` to collect the **estimated fix effort**:\n- Prompt: \"What is the estimated effort to fix this item?\"\n- Options:\n  - `[A] S \u2014 Small (under 1 day)`\n  - `[B] M \u2014 Medium (1\u20133 days)`\n  - `[C] L \u2014 Large (3\u20137 days)`\n  - `[D] XL \u2014 Extra Large (over 1 week)`\n\nThen use `AskUserQuestion` to collect the **impact if left unfixed** \u2014 the\nregister's Impact column, which `\/tech-debt prioritize` scores:\n- Prompt: \"What does this cost if it is never fixed?\"\n- Options: `[A] Low` \/ `[B] Med` \/ `[C] High` \/ `[D] Critical`\n\nPresent the complete new entry to the user.\n\n**Match before appending:** if an existing `Open` entry already has the same\nfile and the same category, show it to the user and ask whether to update that\nentry instead of adding a duplicate.\n\nAsk: \"May I append this entry to `docs\/tech-debt-register.md`?\" (or, on a match,\n\"May I update the existing entry instead?\")\n\nIf yes, append the entry (or update the matched one). Verdict: **COMPLETE** \u2014 entry added to register.\n\nIf no, stop here. Verdict: **BLOCKED** \u2014 user declined write.\n\n---\n\n## Phase 2C: Prioritize Mode\n\nRead the debt register at `docs\/tech-debt-register.md`. If it does not exist:\nVerdict: **NOT ASSESSED** \u2014 no register at `docs\/tech-debt-register.md`; run\n`\/tech-debt scan` first. Stop.\n\nScore each item from its own columns: `impact \u00f7 effort`, with Impact `Low` 1,\n`Med` 2, `High` 3, `Critical` 4 and Effort `S` 1, `M` 2, `L` 3, `XL` 4, rounded to\none decimal and written to Priority. Higher scores first; ties go to the older\n`Added` date. An item whose Impact or Effort is `\u2014` gets no score: list it after\nthe scored items as \"not scored \u2014 [column] not judged\" rather than guessing one.\n\nRe-sort the register by priority score and recommend which items to include in the next sprint (at `workflow: minimal`, which has no sprints, which to build next).\n\nPresent the re-prioritized register to the user.\n\nAsk: \"May I write the re-prioritized register back to `docs\/tech-debt-register.md`?\"\n\nIf yes, write the updated file. Verdict: **COMPLETE** \u2014 register re-prioritized and saved.\n\nIf no, stop here. Verdict: **BLOCKED** \u2014 user declined write.\n\n---\n\n## Phase 2D: Report Mode\n\nRead the debt register. If it does not exist: Verdict: **NOT ASSESSED** \u2014 no\nregister to report on; run `\/tech-debt scan` first. Stop.\n\nGenerate summary statistics:\n\n- Open items by category, and total estimated fix effort for them\n- Items added and items resolved during the current sprint, from each entry's\n  `Added` date and its `Resolved [date]` status\n- Trending direction (growing \/ stable \/ shrinking) \u2014 added vs resolved in that window\n\nFlag any items that have been in the register for more than 3 sprints.\n\nOutput the report to the user. This mode is read-only \u2014 no files are written. Verdict: **COMPLETE** \u2014 debt report generated.\n\n---\n\n## Phase 3: Next Steps\n\n- Run `\/sprint-plan` to schedule high-priority debt items into the next sprint (at `workflow: minimal`, which has no sprints, add them to the brief's build order instead).\n- Run `\/tech-debt report` at the start of each sprint to track debt trends over time.\n\n### Debt Register Format\n\n```markdown\n## Technical Debt Register\nLast updated: [Date]\nTotal items: [N] | Estimated total effort: [T-shirt sizes summed]\n\n| ID | Category | Description | Files | Effort | Impact | Priority | Status | Added | Sprint |\n|----|----------|-------------|-------|--------|--------|----------|--------|-------|--------|\n| TD-001 | [Cat] | [Description] | [files] | [S\/M\/L\/XL] | [Low\/Med\/High\/Critical] | [Score] | [Open \/ Resolved YYYY-MM-DD \/ Accepted \u2014 reason] | [YYYY-MM-DD] | [Sprint to fix or \"Backlog\"] |\n```\n\nEvery skill that adds a row \u2014 this one, and `\/story-done` when it logs\ndeviations as debt \u2014 writes all ten columns in this order, and a skill that\ncreates the file writes the header and table head above first:\n\n- **ID** \u2014 `TD-` and three digits, one above the highest ID already in the\n  register (`TD-001` in a new one). IDs are never reused.\n- **Category** \u2014 one of the six categories under Scan Mode, written without\n  \"Debt\": `Architecture`, `Code Quality`, `Test`, `Documentation`, `Dependency`,\n  `Performance` \u2014 the spelling `\/story-done` writes, so Report Mode groups them once.\n- **Description** \u2014 what the debt is and why it was taken on.\n- **Files** \u2014 the affected paths, comma-separated; `\u2014` when the debt has no single file.\n- **Effort** \u2014 `S`, `M`, `L` or `XL`, as in Add Mode; `\u2014` if not yet estimated.\n- **Impact** \u2014 `Low`, `Med`, `High` or `Critical`: the cost if left unfixed; `\u2014`\n  if not yet judged.\n- **Priority** \u2014 the score `\/tech-debt prioritize` writes; `\u2014` until it runs.\n- **Status** \u2014 `Open` when added. `Resolved YYYY-MM-DD` records the day the debt\n  was fixed; `Accepted \u2014 reason` records a conscious decision to keep it.\n- **Added** \u2014 the day the row was written, `YYYY-MM-DD`. Report Mode counts items\n  added and resolved from this date and the `Resolved` date.\n- **Sprint** \u2014 the sprint scheduled to fix it, or `Backlog`.\n\n### Rules\n- Tech debt is not inherently bad \u2014 it is a tool. The register tracks conscious decisions.\n- Every debt entry must explain WHY it was accepted (deadline, prototype, missing info)\n- \"Scan\" should run at least once per sprint to catch new debt\n- Items older than 3 sprints without action should either be fixed or consciously accepted with a documented reason\n","use_cases":["Identify and categorize technical debt in the codebase during a scan","Add new technical debt entries with category, effort, and impact","Re-prioritize the debt register based on impact and effort","Generate a summary report of current technical debt status"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/Donchitos\/Claude-Code-Game-Studios\/blob\/abc0de79d6ceb0b5d7aa693945849b3937afbe6a\/.claude\/skills\/tech-debt\/SKILL.md","source_commit":"abc0de79d6ceb0b5d7aa693945849b3937afbe6a","license":null,"version":null,"listing_approved_at":"2026-11-18","created_at":"2026-11-17T20:48:15.000000Z","updated_at":"2026-11-18T18:54:36.000000Z","seo_title":"Tech Debt Categorization and Prioritization","seo_description":"Track, categorize, and prioritize technical debt with structured categories and workflow automation for efficient codebase management.","seo_keywords":["tech debt categorization","technical debt prioritization","codebase debt analysis","software debt management","debt register automation"]}}