Tech Debt logo

Tech Debt

Community
mcouthon
tech-debt

Use when finding code smells, auditing TODOs, removing dead code, cleaning up unused imports, or assessing code quality. Triggers on: 'use tech-debt mode', 'tech debt', 'code smells', 'clean up', 'remove dead code', 'delete unused', 'simplify'. Full access mode - can modify files and run tests.

Overview

Publishermcouthon
Repositoryagents
Skill nametech-debt
Stars
79
Forks
11
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by mcouthon on GitHub. Read the source before you install it.

Installation

Install the Tech Debt AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mcouthon/agents.git /tmp/agents
mkdir -p .claude/skills
cp -r /tmp/agents/generated/claude/skills/tech-debt .claude/skills/tech-debt
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Tech Debt in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Tech Debt on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Tech Debt is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Tech Debt Mode

Identify, catalog, and eliminate technical debt.

Core Philosophy

"Deletion is the most powerful refactoring."

The 40% Rule: In AI-assisted coding, expect to spend 30-40% of your time on code health—reviews, smell detection, and refactoring. Without this investment, vibe-coded bases accumulate invisible debt that slows agents and breeds bugs. Schedule regular code health passes, not just reactive fixes.

Every line of code:

  • Must be understood
  • Must be tested
  • Must be maintained
  • Can contain bugs

Less code = less of all the above.

Debt Indicators to Find

CategoryWhat to Look For
CommentsTODO, FIXME, HACK, XXX, "temporary"
Code SmellsDuplicated blocks, long functions (>50 lines)
Type IssuesMissing hints, Any types, type: ignore
Dead CodeUnused functions, unreachable branches
DependenciesOutdated packages, unused imports
ComplexityDeep nesting, long parameter lists

Rationalization Prevention

ExcuseRealityRequired Action
"Someone might need this code"Dead code is maintenance burdenCheck references — delete if unused
"It's not hurting anything"Unused code confuses future agentsRemove it; git preserves history
"Refactoring is risky"You haven't measured the impactCount callers, assess blast radius first
"We'll clean it up later"Later never comes — debt compoundsFix it now or create a tracked issue with details
"Working code shouldn't be touched"Untouched code rots — dependencies change around itAssess: does it still work? Are patterns current?

Process

1. Scan

Search for debt indicators across the codebase:

  • Grep for TODO/FIXME comments
  • Find functions over threshold length
  • Identify files with type errors
  • Check for unused exports

2. Categorize

For each finding, assess:

  • Severity: How bad is this?
  • Effort: How hard to fix?
  • Risk: What could go wrong?

3. Prioritize

Focus on:

  • 🎯 Quick Wins - Low effort, high impact
  • 🔒 Safety First - Fix risky debt before adding features
  • 📍 Hot Paths - Prioritize frequently-touched code

4. Fix or Document

  • Simple fixes: Just do it (with tests)
  • Complex fixes: Create a plan for later

Quick Win Examples

  • Dead imports: Remove unused imports (e.g., from typing import List, Dict, Optional when only Optional is used)
  • Bare excepts: Replace except: pass with specific exception handling and logging
  • Unused variables: Delete variables that are assigned but never read

Tech Debt Report Format

markdown
## Tech Debt Analysis

### Summary

- **Total issues found**: X
- **Critical**: X (fix immediately)
- **Quick wins**: X (easy to fix)
- **Requires planning**: X (complex)

### Findings

#### Critical 🔴

| Location     | Type     | Issue                     | Effort |
| ------------ | -------- | ------------------------- | ------ |
| `file.py:42` | security | bare except hiding errors | Low    |

#### Quick Wins 🎯

| Location      | Type   | Issue             | Effort |
| ------------- | ------ | ----------------- | ------ |
| `utils.py:10` | unused | import never used | Low    |

#### Requires Planning 📋

| Location | Type        | Issue              | Why Complex              |
| -------- | ----------- | ------------------ | ------------------------ |
| `api.py` | duplication | 3 similar handlers | Needs abstraction design |

### Recommendations

[Suggested order of tackling debt]

### Fixed This Session

[List of debt items resolved]

When Fixing Debt

  • ✅ Run tests after each change
  • ✅ Keep changes atomic and focused
  • ✅ Verify no regressions
  • ❌ Don't mix debt fixes with new features
  • ❌ Don't "refactor" working code without reason

Safe Deletion Patterns

Before removing code, verify it's unused:

bash
# Check for usages
ag "function_name" --python

# Check imports
ag "from module import function_name"

Watch for code that might be used dynamically:

python
# ✅ Safe to delete: unused import
from typing import List  # 'List' never used in file

# ✅ Safe to delete: unused variable
result = calculate()  # 'result' never read
log(value)  # This is the actual intent

# ✅ Safe to delete: dead branch
if False:  # Will never execute
    do_something()

# ⚠️ Verify first: might be used dynamically
def _helper():  # Underscore suggests private, but check usages
    pass

# ❌ Don't delete without checking: exported function
def public_api():  # Might be called by external code
    pass

Also watch for:

  • Dynamically called code (getattr, eval)
  • Reflection-based frameworks
  • External API contracts
  • CLI entry points

Cleaning Checklist

markdown
- [ ] Unused imports removed
- [ ] Unused variables removed
- [ ] Dead functions removed
- [ ] Commented-out code removed
- [ ] Debug statements removed
- [ ] Duplicate code consolidated
- [ ] Tests still pass
- [ ] Types still check

Debt Prevention Tips

Add TODOs with issue tracker links, use type hints from the start, and review for simplification opportunities.

"The best code is no code at all."

Frequently asked questions

What does the Tech Debt AI skill do?

Use when finding code smells, auditing TODOs, removing dead code, cleaning up unused imports, or assessing code quality. Triggers on: 'use tech-debt mode', 'tech debt', 'code smells', 'clean up', 'remove dead code', 'delete unused', 'simplify'. Full access mode - can modify files and run tests.

Why use Tech Debt on TypingMind?

Because you install it once and use it with any model. Tech Debt is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Tech Debt in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mcouthon/agents/tree/main/generated/claude/skills/tech-debt. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Tech Debt?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Tech Debt?

As many as you like. As long as a model supports skills, you can use Tech Debt with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Tech Debt AI skill free?

Yes. It is published on GitHub by mcouthon under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇