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.
npx skills add ashlrai/ashlr-plugin --skill ashlr-cost-refactorgit clone --depth 1 https://github.com/ashlrai/ashlr-pluginWrote 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.
[](https://agentmods.dev/skills/ashlrai/ashlr-plugin/ashlr-cost-refactor)<a href="https://agentmods.dev/skills/ashlrai/ashlr-plugin/ashlr-cost-refactor"><img src="https://agentmods.dev/badge/skills/ashlrai/ashlr-plugin/ashlr-cost-refactor.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00062 | $0.00694 |
| Opus 5 | $0.00031 | $0.00347 |
| Sonnet 5 | $0.00012 | $0.00139 |
| Haiku 4.5 | $0.00006 | $0.00069 |
Grade A, and why
ashlr-cost-refactor 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.
How it starts
The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Ashlr Cost Refactor
A structured discipline for refactoring tasks that minimizes token spend without sacrificing correctness.
Rules (active when this skill is enabled)
1. Diff first
Before editing anything, run ashlr__diff or ashlr__diff_semantic to understand what already changed (staged/unstaged). This prevents redundant edits to files that are already in the state you want.
2. Structural edits for renames
When renaming a symbol, type, or file — use ashlr__edit_structural instead of search/replace. Structural edit finds all references in one pass and renames them correctly, including imports and re-exports.
3. Find all refs, then one ashlr__multi_edit per file
Before editing a file, run ashlr__grep to find all references. Then apply all changes to that file in a single ashlr__multi_edit call. Do not make sequential single edits to the same file — each one burns a full round-trip.
4. No re-reads between edits in a sequence
Once you've read a file and know its structure, proceed through your edit sequence without re-reading. ashlr__edit and ashlr__multi_edit return diffs that confirm each change — that's sufficient to continue.
5. One ashlr__genome_propose at the end
After the refactor is complete and stable, write one genome proposal summarizing the entire change: what was renamed/moved, why, and the affected file paths. Do not propose mid-refactor.
6. Verify with ashlr__bash not Read
After a refactor, confirm with bun run typecheck or bun test via ashlr__bash. Do not re-read edited files to verify — the typecheck output is authoritative and far cheaper.
Sequence template
1. ashlr__diff_semantic() — see what's already changed
2. ashlr__grep("OldName|oldFn") — find all refs
3. ashlr__edit_structural(...) — rename symbols
OR ashlr__multi_edit([...]) — batch all edits per file
4. ashlr__bash("bun run typecheck") — verify, not Read
5. ashlr__genome_propose(summary) — one proposal at the end
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.
- 7d ago First seen · 51 lines · 62 tokens per session scan A 9fd216f24771
ashlr-cost-refactor is a skill published in the GitHub repository ashlrai/ashlr-plugin (3 stars, last pushed 7d ago), licensed MIT. It adds 62 tokens to every session and 694 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-08-31.
Other skills, from other repositories
fable-recover
Diagnose repeated command failures, stale build caches, branch drift, or contradictory evidence before attempting further code edits. Use when commands fail repeatedly, tests stay red after attempted fixes, build output contradicts source code, or the execution path is confused — even if the user does not explicitly…
ci-self-heal
A diagnostic guide for analysing failed continuous-integration checks. Continuous integration, or CI, automatically tests and builds code changes; this guide classifies failures and suggests fixes without editing the code.
incident-rca
A diagnostic process for producing a structured root-cause analysis of a serious production incident, such as a P0 or P1 outage. It compares logs, measurements, request traces, code changes, and architecture decisions, and gives ranked explanations and actions.
bug-fix
A structured bug-fixing workflow that takes a problem from reproduction and evidence-based cause finding through approval, implementation, testing, and cleanup.
debug
Use when diagnosing software errors, test failures, or unexpected runtime behavior.
doctor
Use when diagnosing CLI environment health, node setup, permissions, or configuration drift.