beancount-io: Skill for Claude Code

.agents/skills/rt-dead-code-removal/SKILL.md

rt-dead-code-removal is a skill for Claude Code from bex-co/beancount-io. It costs 165 tokens per session (1,012 once invoked), scanned A, original, MIT.

A maintenance routine for deleting code that the repository's detectors show cannot be reached. It checks dynamic references and removes the unused code along with tests or fixtures that existed only for it.

In plain words
What is it for?
Use it to clean dead code from JavaScript, TypeScript, or Python packages with the repository's configured checks.
Why use it?
Unreachable code increases the amount developers must read and can preserve obsolete behavior or configuration. Verification helps avoid deleting code that is used indirectly.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

This is bex-co/beancount-io's own configuration. It tells Claude Code how to work on beancount-io itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything beancount-io configures →

Reuse

Borrowing it

Nothing to install: this file belongs to bex-co/beancount-io. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/bex-co/beancount-io/main/.agents/skills/rt-dead-code-removal/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/bex-co/beancount-io

Made for: Claude Code.

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 rt-dead-code-removal

README.md
[![agentmods](https://agentmods.dev/badge/skills/bex-co/beancount-io/rt-dead-code-removal/github.svg)](https://agentmods.dev/skills/bex-co/beancount-io/rt-dead-code-removal)
Your own site
<a href="https://agentmods.dev/skills/bex-co/beancount-io/rt-dead-code-removal"><img src="https://agentmods.dev/badge/skills/bex-co/beancount-io/rt-dead-code-removal/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 rt-dead-code-removal

Your own site · 80×15
<a href="https://agentmods.dev/skills/bex-co/beancount-io/rt-dead-code-removal"><img src="https://agentmods.dev/badge/skills/bex-co/beancount-io/rt-dead-code-removal.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 165 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,012 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.00165 $0.01012
Opus 5.5 $0.00066 $0.00405
Sonnet 5.5 $0.00033 $0.00202
Haiku 4.5 $0.00016 $0.00101

Measured yesterday against content hash aae09612a984, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rt-dead-code-removal 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 yesterday.

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.

.agents/skills/rt-dead-code-removal/SKILL.md · 104 lines

How it starts

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

Task: Delete provably unreachable code

Usage: /rt-dead-code-removal [package-or-path]

Run the target package's dead-code detector, prove each hit is truly unreachable, delete it (with the tests and fixtures that only existed for it), make the package's checks pass, and land each removal via /land.

Contract

Read .agents/skills/rt-shared/contract.md first — it defines preconditions, scope resolution, verify gates, the land protocol, the budget, and universal STOPs. This file adds only what is specific to dead code. Floor even without it: never land red; one finding per landing; anything in a DO_NOT_DO.md is a hard STOP.

Workflow

1. Scope

Resolve scope per the contract. With no argument, prefer running scripts/lint-deadcode.sh from the repo root once as a survey, then pick the one package with the most promising hits.

2. Discover

cd into the package, then run its detector:

  • JS/TS packages (mobile, dashboard, backend-cluster/backend-v2, backend-cluster/ledger) → yarn lint:deadcode (Knip; config in the package's knip.jsonc)
  • cli/ → make deadcode (Vulture; high-confidence only)

Also legitimate finds while reading nearby code: commented-out blocks, if (false)-style branches, early-return shadowed code. A detector hit is a candidate, not proof.

3. Prove it

For every candidate, sweep for references the detector can't see before touching anything:

  • Grep the whole package for the symbol/file name as a string — dynamic imports, registries, config-referenced entries, test fixtures.
  • Expo Router is file-based: files under mobile/app/ are routes reachable by navigation and deep links even with zero imports — never a dead-code finding.
  • Codegen inputs (GraphQL documents, codegen.ts, apollo.config.json) and build/tooling entry points (babel.config.js, scripts referenced from package.json) count as reachable.

A confirmed false positive is its own legitimate finding: add a scoped ignore to the package's knip.jsonc (with a short reason) instead of deleting, so the detector stays trustworthy.

Read the full file on GitHub · 104 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. yesterday First seen · 104 lines · 165 tokens per session scan A aae09612a984

Subscribe to this mod's changes

rt-dead-code-removal is a skill published in the GitHub repository bex-co/beancount-io (808 stars, last pushed yesterday), licensed MIT. It adds 165 tokens to every session and 1,012 once invoked, about $0.0007 per session on Opus 5.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-12-01.

Related

rt-dead-code-removal compared with skills from other repositories

rt-dead-code-removal next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rt-dead-code-removalbex-co/beancount-ioSkill808yesterdayMITA165Claude Code
bookkeepingericrisco/rsc-harnessSkill695yesterdayMITA84Claude Code, Codex
rledgerrustledger/rustledgerSkill442todayGPL-3.0A117Claude Code, Codex
countbean-accountingCPUtester5465/countbean-pluginSkill211mo agoMITA54Claude Code
ledger-revieweternal-roman/ledgerSkill13d agoMITA42Claude Code
full-engagement-pipelinecynco-labs/ai-accounting-skillsSkill64mo agoMITA56Claude Code
smart-intakecynco-labs/ai-accounting-skillsSkill64mo agoMITA47Claude Code