refactoring-and-tech-debt

refactoring-and-tech-debt is a skill for Claude Code from aneja5/forge-skills. It costs 57 tokens per session (1,770 once invoked), scanned A, original, MIT.

A workflow for recording and planning the removal of technical debt: code that works but makes future changes slower, riskier, or more expensive. It also sets patterns for refactoring, or improving code structure without changing behavior.

In plain words
What is it for?
Use it to track debt items, compare rewriting with gradual improvement, plan refactors, and schedule cleanup alongside normal product work.
Why use it?
It keeps recurring workarounds and risky old code visible instead of letting them spread or get mixed into unrelated feature changes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the forge-skills plugin — 42 skills, 36 commands, 1 hook shipped together

Good fit Use it to track debt items, compare rewriting with gradual improvement, plan refactors, and schedule cleanup alongside normal product work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aneja5/forge-skills/refactoring-and-tech-debt
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aneja5/forge-skills --skill refactoring-and-tech-debt
Clone the repo
git clone --depth 1 https://github.com/aneja5/forge-skills

Made for: Claude Code.

Or install forge-skills, the plugin that ships this one along with the rest of its 42 skills, 36 commands, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for refactoring-and-tech-debt

README.md
[![agentmods](https://agentmods.dev/badge/skills/aneja5/forge-skills/refactoring-and-tech-debt/github.svg)](https://agentmods.dev/skills/aneja5/forge-skills/refactoring-and-tech-debt)
Your own site
<a href="https://agentmods.dev/skills/aneja5/forge-skills/refactoring-and-tech-debt"><img src="https://agentmods.dev/badge/skills/aneja5/forge-skills/refactoring-and-tech-debt/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for refactoring-and-tech-debt

Your own site · 80×15
<a href="https://agentmods.dev/skills/aneja5/forge-skills/refactoring-and-tech-debt"><img src="https://agentmods.dev/badge/skills/aneja5/forge-skills/refactoring-and-tech-debt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,770 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.01770
Opus 5 $0.00028 $0.00885
Sonnet 5 $0.00011 $0.00354
Haiku 4.5 $0.00006 $0.00177

Measured 7d ago against content hash d4126b608a4e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

refactoring-and-tech-debt scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/refactoring-and-tech-debt/SKILL.md · 131 lines

How it starts

The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Refactoring and Tech Debt

Overview

Make tech debt visible, accountable, and resolvable — before it compounds. Output is .forge/tech-debt-registry.md — every known debt item with location, type, cost-to-fix, cost-of-not-fixing, owner, and trigger. Sets the refactor patterns (extract, inline, rename, strangler-fig) and enforces the rule that refactor PRs are refactor-only. Pairs with code-review-and-quality (review enforces the registry) and planning-and-task-breakdown (debt items get scheduled like features).

When to Use

  • A codebase is older than 6 months and the team can name "the bad part" but it's not tracked
  • A refactor is being proposed and the team is debating "rewrite vs incremental"
  • The same workaround (try/catch with comment, copy-pasted helper, manual cleanup script) appears in 3+ places
  • A perf or security finding requires a refactor in addition to the immediate fix
  • A team member is leaving and the bus-factor on a module is 1

When NOT to Use

  • A greenfield project — no debt yet
  • A trivial rename or extract that's part of a feature task (do it as part of the feature work, don't ceremony it)
  • A speculative "this might be debt someday" — wait for the third occurrence

Common Rationalizations

Thought Reality
"We'll fix it later" Later never comes without a ticket and a trigger. The debt registry is the ticket.
"Just rewrite it" Rewrites without a strangler-fig plan create two broken systems running in parallel. The new system inherits the old system's bugs because the old system encoded the bugs as decisions.
"It works, don't touch it" Working code that nobody understands has a bus factor of zero. The first incident on that code is also a knowledge incident.
"Refactoring is a waste of time" The time you save skipping refactoring you spend debugging. Debt compounds; refactor pays it down.
"We'll refactor while we add this feature" Mixed PRs are impossible to review and impossible to revert independently. The next bisect points at the refactor commit even when the feature caused the regression.
"Strangler-fig is overkill, just swap it" Big-bang swaps fail. Strangler-fig keeps the system running while you migrate, one consumer at a time.

Read the full file on GitHub · 131 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 131 lines · 57 tokens per session scan A d4126b608a4e

Subscribe to this mod's changes

refactoring-and-tech-debt is a skill published in the GitHub repository aneja5/forge-skills (3 stars, last pushed 3mo ago), licensed MIT. It adds 57 tokens to every session and 1,770 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

code-review

Run an extremely strict maintainability review for abstraction quality, giant files, and spaghetti-condition growth. Use for a code review, deep code quality audit, or especially harsh maintainability review. Only use when explicitly asked to review; never during implementation.

Kripu77/software-factory · 52 tokens

boundaries

Analyze Phoenix context boundaries and module coupling via mix xref. Use when checking cross-context calls, validating dependencies, before splitting modules, or reviewing architecture.

oliver-kriska/claude-elixir-phoenix · 33 tokens

triage

Triage review findings interactively — approve, skip, or prioritize each issue. Use after /phx:review to filter findings before fixing.

oliver-kriska/claude-elixir-phoenix · 32 tokens

skeptical-triage

Reusable 3-round self-challenge + arbiter pattern for filtering false positives from findings/verdicts. Use when the cost of a false-positive gate block exceeds the cost of 4 extra LLM turns.

avelikiy/great_cto · 49 tokens

vertical-real-estate

Residential-proptech domain knowledge so architect / pm aren't naive when speccing real-estate products (listings, lead-crm, transaction-coordination, property-mgmt). Codifies MLS/IDX reality, listing status lifecycle + syndication canonical-source, long-cycle lead nurture, transaction-coordination as the high-pain…

avelikiy/great_cto · 99 tokens

product-economics

Does this product make money at a price someone will pay? Forces contribution margin, a price with a stated basis, and a bottom-up market size — each number labelled measured / assumed / unknown, so a guess can never be read as a calculation.

avelikiy/great_cto · 55 tokens