agentleFS
stijnvanhullestijnvanhulle/agents/.agents/skills/tech-debt/SKILL.md

tech-debt

Skill1 starsChanged 2 months agoMITView on GitHub

Audits a whole codebase for tech debt and publishes the audit as a page, such as a Claude artifact, with file-cited findings, severity, effort, and the calls that look bad but are fine. Use only when asked for a tech debt audit, a codebase health check, or an architecture or code quality review of an entire repo or module. For a diff or a pull request, use `deslop` or `review`.

41 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use playtest-report, test-flakiness and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CoralGameSkill

    playtest-report

    Generates a structured playtest report template or analyzes existing playtest notes into a structured format. Use this to standardize playtest feedback collection and analysis.

    Also in 13 projects that use this

  • lilangMaxSkill

    test-flakiness

    Detect non-deterministic (flaky) tests by reading CI run logs or test result history. Aggregates pass rates per test, identifies intermittent failures, recommends quarantine or fix, and maintains a flaky test registry. Best run during Polish phase or after multiple CI runs.

    Also in 11 projects that use this

  • lilangMaxSkill

    soak-test

    Generate a soak test protocol for extended play sessions. Defines what to observe, measure, and log during long play sessions to surface slow leaks, fatigue effects, and edge cases that only appear after sustained play. Primarily used in Polish and Release phases.

    Also in 10 projects that use this

  • CoralGameSkill

    team-audio

    Orchestrate audio team: audio-director + sound-designer + technical-artist + gameplay-programmer for full audio pipeline from direction to implementation.

    Also in 13 projects that use this

  • +6 more from lilangMax
  • +2 more from CoralGame

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 34 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every finding cites path:line.

    line 11
  2. Distinctive:

    Read the code before you judge it, since a pattern that looks wrong alone may hold something up.

    line 12
  3. Very specific:

    Read the README, the package manifest (package.json, pyproject.toml, Cargo.toml, or go.mod), and any architecture docs or ADRs.

    line 19
  4. Distinctive:

    Read the churn. A shallow clone hides it, so say so in the audit when the history is cut.

    line 22
  5. Very specific:

    Search with rg, ast-grep when installed, and the stack's own tools.

    line 41
  6. Very specific:

    Run only the tools the repo already has.

    line 65
  7. Very specific:

    When the user gives an earlier audit, as a page link or a TECH_DEBT_AUDIT.md in the repo, read it first and update it in place.

    line 93

“Common” is measured: kept by at least 6 in 10 of the 34 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Tech debt

Audit the codebase as it is and publish the findings as a page. The audit changes no code and adds no file to the repo. The input is an optional path, such as src/payments, that scopes the audit to one module.

Every finding cites path:line. A finding without a citation is an impression, so leave it out. Read the code before you judge it, since a pattern that looks wrong alone may hold something up. Say what is broken without softening it, and write no praise to balance the list.

1. Orient

Form no opinion before you understand the system.

  1. Read the README, the package manifest (package.json, pyproject.toml, Cargo.toml, or go.mod), and any architecture docs or ADRs.
  2. Map the directories and name the major modules and layers.
  3. Read the churn. A shallow clone hides it, so say so in the audit when the history is cut.

    git log --oneline -200
    git log --stat --since="6 months ago"
  4. Name the entry points, the hot paths, and the corners nobody touches.
  5. List the 20 largest files by line count and the 20 files changed most often in the last six months. Debt usually sits where the two lists overlap.

Then write one or two paragraphs on how the system works. A model that contradicts the README is itself a finding.

2. Audit

Search with rg, ast-grep when installed, and the stack's own tools. Write "Nothing material" for a dimension with nothing in it rather than padding it.

DimensionLook for
Architectural decayCircular dependencies, layering violations, files over 500 lines, logic duplicated in three or more places, abstractions nobody uses, dead code
Consistency rotSeveral ways to do one job, such as HTTP clients, error handling, logging, config, validation, or dates. Naming drift. Folders that no longer match the code
Type and contract debtany, as any, # type: ignore, loose dictionaries, untyped API boundaries, missing schema validation at trust boundaries
Test debtCoverage gaps on critical paths, tests that assert the implementation, skipped or flaky tests, high-churn files with no tests
Dependency and config debtKnown CVEs, unused or duplicate dependencies, environment variables that are read but undocumented or have different defaults per environment
PerformanceN+1 queries, sync work in async paths, blocking I/O on hot paths, listeners or handles never released
Errors and observabilitySwallowed exceptions, blanket catches, errors logged but not handled, error shapes that differ per module
Security hygieneHardcoded secrets, SQL built by string concatenation, missing input validation, permissive auth or CORS, weak crypto
Documentation driftREADME claims that do not match the code, comments that contradict the code next to them, undocumented public APIs

Detect the stack from the manifest and run its tools in parallel:

StackTools
TypeScript and JavaScriptThe package manager's audit, tsc --noEmit, knip, madge --circular
Pythonpip-audit, ruff check, vulture, mypy --strict
Rustcargo audit, cargo machete, cargo clippy
Gogovulncheck, go vet, staticcheck

Run only the tools the repo already has. Never install one or fetch it with npx. Name each missing tool in the audit and move on.

For a repo over 50,000 lines or with more than five top-level modules, in Claude Code and Cursor run one subagent per module, in parallel. Give each its module, the dimensions table, the citation rule, and a cap of 200 findings. Then merge, dedupe, and rank the reports. Elsewhere, audit one module at a time and write its findings down before you read the next.

3. Write the audit

Publish the audit as a page: a Claude artifact, or the equivalent in Cursor or Codex. The request for an audit is the yes to build it. When the client has no page tool, write TECH_DEBT_AUDIT.md in the repo root instead and say so. The page has these sections, in order:

  1. Executive summary: ten bullets at most, ranked by impact.
  2. Architectural mental model: the system as it is.
  3. Findings: a table with the columns ID, Category, File:Line, Severity (Critical, High, Medium, or Low), Effort (S, M, or L), Description, and Recommendation. Expect 30 to 80 rows on a whole repo. More than that is padding.
  4. Top 5 to fix first: each with a diff sketch or a refactor outline.
  5. Quick wins: a checklist of the low-effort findings with Medium severity or higher.
  6. Things that look bad but are fine: the calls you considered flagging and why you did not. This section is required. When it is empty, the audit was too shallow, so look again.
  7. Open questions for the maintainer: what you could not tell was debt or intent. Ask here instead of asserting.

Recommend specific, scoped changes, never a rewrite.

When the user gives an earlier audit, as a page link or a TECH_DEBT_AUDIT.md in the repo, read it first and update it in place. Mark fixed findings RESOLVED, update the stale ones, and tag the new ones NEW.

Output

The link to the page, or the file path when there is no page tool. In chat, give the counts per severity, the top 5, and the tools that were missing. Fixing a finding is a separate request.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.