Techdebt

From rajitsaha/100xprism · View interactive version

Techdebt is an AI agent skill from the GitHub repository rajitsaha/100xprism. Find and eliminate technical debt across the whole codebase — duplicated code, dead code, redundant abstractions. Use at the end of a coding session or when the codebase feels bloated. Reports findings and fixes them with user confirmation. Cleanups limited to the current working changes belong in a

How to use this skill

Skill file

Techdebt — Technical Debt Scanner

Scan the codebase for technical debt and eliminate it. Run at end of session or when the codebase feels bloated.

Do NOT ask for permission — scan, report, then ask before fixing.

How to use


Phase 1 — Scan

PROJECT_ROOT=$(git rev-parse --show-toplevel)
cd "$PROJECT_ROOT"

Look for:

  1. Duplicated code — copy-pasted logic that should be a shared utility
  2. Dead code — unused functions, variables, imports, exports, commented-out blocks
  3. Redundant abstractions — over-engineered helpers used in only one place
  4. Inconsistent patterns — same operation done 3+ different ways across files
  5. Stale TODOs / FIXMEs — old comments no longer relevant

Use Grep and Glob to identify candidates. Confirm each item is truly dead/duplicated before reporting.


Phase 2 — Report

## Tech Debt Found

### Duplicated Code
- `src/utils/formatDate.ts:12` and `src/helpers/dates.ts:45` — identical logic
  Fix: consolidate into formatDate.ts, delete dates.ts

### Dead Code
- `src/api/legacyAuth.ts` — no imports found anywhere
  Fix: delete file

### Stale TODOs
- `src/components/Modal.tsx:89` — TODO from 6 months ago, feature shipped
  Fix: remove comment

Phase 3 — Fix (with confirmation)

For each item, ask the user to confirm unless they said "fix". After fixes:

# Run tests to verify nothing broke
npm test 2>&1 | tail -20

GATE: Tests still pass after cleanup.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.