Development

techdebt - Claude MCP Skill

/techdebt

SEO Guide: Enhance your AI agent with the techdebt tool. This Model Context Protocol (MCP) server allows Claude Desktop and other LLMs to /techdebt... Download and configure this skill to unlock new capabilities for your AI workflow.

🌟1 stars • 1 forks
📥0 downloads

Documentation

SKILL.md
# /techdebt

Find and kill duplicated code, stale TODOs, and complexity hotspots.

Run at end of every session to maintain codebase hygiene.

## Process

1. **Detect issues** using fast tools (rg, ast-grep, ts-unused-exports)
2. **Group by severity** (critical → moderate → low)
3. **Suggest refactors** using existing patterns in codebase

## Detection Commands

Run these in parallel where possible:

```bash
# 1. TODO/FIXME/HACK comments with age context
rg -n "TODO|FIXME|HACK|XXX" --type ts --type tsx --type js --type jsx 2>/dev/null | head -30

# 2. Unused exports (TypeScript only)
npx ts-unused-exports tsconfig.json 2>/dev/null | head -20

# 3. Long functions (>50 lines) - complexity hotspots
rg -l --type ts --type tsx . | head -20 | xargs -I{} sh -c 'awk "/^(export )?(async )?function|^const .* = (async )?\(/ {start=NR} /^}/ && start {if(NR-start>50) print FILENAME\":\"start\": \"NR-start\" lines\"; start=0}" {}'

# 4. Duplicated error handling patterns
ast-grep --pattern 'try { $$$A } catch (e) { console.error(e); throw e; }' --json 2>/dev/null | jq -r '.[] | "\(.file):\(.range.start.line)"' | head -10

# 5. Magic numbers (literals > 10 outside of obvious contexts)
rg -n '\b[0-9]{3,}\b' --type ts --type tsx -g '!*.test.*' -g '!*.spec.*' 2>/dev/null | grep -v "port\|1000\|width\|height\|timeout" | head -15

# 6. Empty catch blocks
ast-grep --pattern 'catch ($ERR) { }' --json 2>/dev/null | jq -r '.[] | "\(.file):\(.range.start.line): empty catch"' | head -10

# 7. Console.log in production code
rg -n 'console\.(log|debug)' --type ts --type tsx -g '!*.test.*' -g '!*.spec.*' 2>/dev/null | head -15
```

## Severity Classification

**Critical** (fix now):
- Empty catch blocks
- Hardcoded secrets or credentials
- Unused exports in public API
- Console.log in production paths

**Moderate** (fix this sprint):
- TODO/FIXME older than 30 days
- Functions > 100 lines
- Magic numbers in business logic
- Duplicated error handling

**Low** (track for later):
- HACK comments
- Minor code duplication
- Long parameter lists

## Output Format

```markdown
## Tech Debt Report - [date]

### Critical (fix now)
| Location | Issue | Suggested Fix |
|----------|-------|---------------|
| src/api.ts:42 | Empty catch | Add error logging |

### Moderate (fix this sprint)
| Location | Issue | Suggested Fix |
|----------|-------|---------------|
| src/utils.ts:15 | TODO from 60 days ago | Complete or delete |

### Low (track)
- 3x duplicated fetch wrapper pattern (consider shared util)
```

## Quick Mode

For fast feedback, run just these:

```bash
# Fast techdebt scan
rg -c "TODO|FIXME|console\.log" --type ts 2>/dev/null | sort -t: -k2 -nr | head -10
```

## Integration

After running, offer to:
1. Create GitHub issues for critical items
2. Add to existing tech debt tracking
3. Generate refactor plan for moderate items

Signals

Avg rating⭐ 0.0
Reviews0
Favorites0

Information

Repository
phrazzld/claude-config
Author
phrazzld
Last Sync
3/2/2026
Repo Updated
3/1/2026
Created
2/5/2026

Reviews (0)

No reviews yet. Be the first to review this skill!

Related Skills

cursorrules

CrewAI Development Rules

⭐ 43932Has guide

firecrawl-build-onboarding

Get Firecrawl credentials and SDK setup into a project. Use when an application needs `FIRECRAWL_API_KEY`, when an agent should add Firecrawl to `.env`, when the user wants to authenticate Firecrawl for app code, or when choosing the first SDK and docs for a new Firecrawl integration. This skill includes its own browser auth flow, so it does not depend on the website onboarding skill.

⭐ 39577

firecrawl-build

Integrate Firecrawl into application code whenever a product, agent, or workflow needs web data inside the app — web search, live search results, page scraping, structured extraction, or browser interaction. Use when building any feature that needs data from the web in code, even if the user does not mention Firecrawl explicitly and only describes wanting web data, website content, search, scraping, or interaction in an application. Trigger for Firecrawl requests, "fire girl" shorthand, and generic app-level web-data needs that should map to `/scrape`, `/search`, or `/interact`. Do not use this skill for one-off terminal-only web tasks during the current session; use `firecrawl/cli` for those.

⭐ 39577

firecrawl-build-scrape

Integrate Firecrawl `/scrape` into product code for single-page extraction. Use when an app already has a URL and needs markdown, HTML, links, screenshots, metadata, or structured page output. Prefer this skill over broader crawl patterns when the feature is page-level.

⭐ 39577

Related Guides