Skip to content
Skills Library
Programming · Analysis

debt-ledger

/debt-ledger

Record technical debt as principal, interest and breakeven, then decide pay-or-accept with a calculator that supports margins, residual interest and whole ledgers. Use when choosing a shortcut, prioritising refactors, auditing accumulated debt, or after horizon-fit returns TEMPORARY IS ENOUGH. Ships a calculator and an example ledger.

Licence
MIT
Last repository change
02.11.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
1
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 02.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/debt_calc.py

What it does and when to use it

Record technical debt as principal, interest and breakeven, then decide pay-or-accept with a calculator that supports margins, residual interest and whole ledgers. Use when choosing a shortcut, prioritising refactors, auditing accumulated debt, or after horizon-fit returns TEMPORARY IS ENOUGH. Ships a calculator and an example ledger.

Original author description

Record technical debt as principal, interest and breakeven, then decide pay-or-accept with a calculator that supports margins, residual interest and whole ledgers. Use when choosing a shortcut, prioritising refactors, auditing accumulated debt, or after horizon-fit returns TEMPORARY IS ENOUGH. Ships a calculator and an example ledger.

How it works

  1. When to activate
  2. Entry fields
  3. Procedure
  4. Mandatory questions
  5. Failure patterns
  6. Output
  7. Exit path
  8. Limits
Original SKILL.md headings · 49 lines, 583 words
SKILL.md preview
---
name: debt-ledger
description: Record technical debt as principal, interest and breakeven, then decide pay-or-accept with a calculator that supports margins, residual interest and whole ledgers. Use when choosing a shortcut, prioritising refactors, auditing accumulated debt, or after horizon-fit returns TEMPORARY IS ENOUGH. Ships a calculator and an example ledger.
metadata:
  domain: coding
  status: READY
---
# Debt Ledger: debt with interest

Borrowed from finance: debt has a **principal**, an **interest** and a **breakeven**. Deliberate debt is normal; unrecorded debt is the problem.

## When to activate
Whenever a shortcut is taken, when `horizon-fit` returns TEMPORARY IS ENOUGH (this skill is then the only required follow-up), and when auditing a codebase (`codebase-longevity-audit`).

## Entry fields
| Field | Meaning |
|---|---|
| id, what | identifier and one-line description |
| basis | **how the numbers were estimated** (past incidents, measured time); an estimate without basis is not accepted |
| principal_hours | hours to fix NOW, including tests, migration, review |
| interest_hours_per_month | extra hours per month the debt costs if left (slower work, bugs, re-explaining) |
| residual_hours_per_month | optional: interest remaining AFTER the fix (default 0) |
| horizon_months | optional: months the affected code will live (from `horizon-fit`) |
| owner, due, why_taken | accountable person, re-evaluation date, why it was accepted |

## Procedure
1. **Record the debt when the shortcut is taken**, not later. Write the re-class trigger from `horizon-fit` into `why_taken` for class B items.
2. **Estimate principal and interest in hours, citing the basis.** Include the usually forgotten parts of principal (tests, data migration, coordination). Interest counts only work caused by the debt being touched or tripped over.
3. **Compute:** single debt `python scripts/debt_calc.py --principal 8 --interest 1.5 --horizon 12`; whole ledger `python scripts/debt_calc.py --ledger debt.json`. Rules used:
   - net interest = interest - residual; breakeven = principal / net interest
   - saved = net interest x horizon
   - **PAY NOW** if saved >= 1.5 x principal (the margin covers optimistic fix estimates); **MARGINAL** if principal <= saved < 1.5 x principal (accept, re-check at `due`); **ACCEPT** if saved < principal or net interest <= 0
   - no horizon given: the tool prints only the breakeven; get the horizon from `horizon-fit` first
4. **Rank for payment** by relative rate (net interest / principal), highest first: high interest, low principal goes first.
5. **Check interactions by hand:** does this debt raise the interest of another? If so raise that entry's interest and say why.
6. **Review on `due`:** the script flags OVERDUE entries; re-estimate with fresh evidence, then pay, accept again with a new date, or delete if the code is gone.

## Mandatory questions
- If nobody touches this code again, is the interest really zero? (Untouched debt accrues no interest: accepting it is right.)
- Does paying it remove the interest, or only part of it (residual)?
- Is the principal missing tests or migrations?

## Failure patterns
No interest estimate; principal underestimated; no owner or due date (debt becomes permanent); using the ledger to justify everything as "accept".

## Output
The ledger (JSON in the template format), the calculator output, and the PAY NOW set with its total principal and interest removed.

## Exit path
- **Missing input:** effort or interest estimates missing: ask for ranges; do not fill in numbers.
- **Script problem:** if `debt_calc.py` exits 2 or crashes, fix the input once and retry. If it still fails, write `NOT MEASURED: <script>`, give a bound you can compute by hand, and do not quote a number.
- **Stop or hand off:** if breakeven is longer than the horizon, record the entry as ACCEPT with its re-check date.

## Limits
Hour estimates are rough: use them to rank and choose, not to report precisely. The same frame works for non-code debts (see the `finance` skills when available).
Files in this package (3)
  • SKILL.md 4 KB
  • scripts/debt_calc.py 5 KB
  • templates/debt.example.json 1 KB

Versions

The database has no other skills named debt-ledger.

Database snapshot: 13.11.2026 · package version 8eb67f41ee7c (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100tech-debt-tracker
    Use when surfacing tech debt as trackable items — interest-vs-principal framing, prioritisation by carrying cost, repayment plan — even if the user just says 'this codebase is a mess'.
  • 100technical-debt
    Technical debt inventory, prioritization, and audit for PHP/Laravel (MySQL) and Node/TypeScript/React projects. Use when assessing code health, identifying refactoring candidates, planning debt paydown, or auditing a codebase for accumulated debt. Triggers on "audit technical…
  • 100code-refactoring-tech-debt
    Technical debt expert specializing in identifying, quantifying, and prioritizing technical debt in software projects. Use when auditing a codebase for technical debt or planning remediation.
  • 85ponytail-debt
    List every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.
  • 84analyze-tech-debt
    Analyze and prioritize technical debt with remediation plans. Use when user says "analyze the technical debt in this codebase", "what's the code quality like in this module", "identify what's slowing down our development", "assess the maintenance burden of this legacy code",…
  • 85ponytail-debt
    List every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.