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 edimuj/tokenlean --skill dedupgit clone --depth 1 https://github.com/edimuj/tokenleanWrote 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/edimuj/tokenlean/dedup)<a href="https://agentmods.dev/skills/edimuj/tokenlean/dedup"><img src="https://agentmods.dev/badge/skills/edimuj/tokenlean/dedup/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.
<a href="https://agentmods.dev/skills/edimuj/tokenlean/dedup"><img src="https://agentmods.dev/badge/skills/edimuj/tokenlean/dedup.svg" alt="Reviewed on agentmods" width="80" 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.00069 | $0.01642 |
| Opus 5.5 | $0.00028 | $0.00657 |
| Sonnet 5.5 | $0.00014 | $0.00328 |
| Haiku 4.5 | $0.00007 | $0.00164 |
Grade A, and why
dedup scanned grade A with 1 finding 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 1mo 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
import { execFileSync } from 'node:child_process'; How it starts
The opening of the file, as written. The whole thing — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dedup
tl dupes finds duplicates; removing them well is the skill. Most of the
output is noise, the wins hide in two tiers, and the mitigation that actually
sticks is non-obvious: you remove the second home, not "fix both copies."
Workflow
Scan → Triage → Mitigate → Verify → Ratchet
1. Scan
tl dupes --near # structural + near surfaced first; tests excluded by default
Via the MCP tool, near is a number (the similarity threshold), not a flag:
mcp__callmux__tl_dupes { near: 0.85 }. Passing near: true fails schema
validation — the CLI's bare --near defaults that threshold for you.
Files copied verbatim into another tool (e.g. a plugin shipped into a user's
config dir) are external contracts — their duplicate helpers are by-design,
not cleanup targets. tl dupes excludes them by default. Mark your own in
.tokenleanrc.json:
{ "externalContractFiles": ["src/my-copied-plugin.js"] }
Use tl dupes --near --include-contracts only when you deliberately want to
audit those copies too.
2. Triage by tier — signal vs. noise
tl dupes returns four tiers. Treat them differently:
- Structural + near = signal. Renamed clones and copy-paste-with-edits — the drift-prone ones. Start here.
- Exact = quick wins, but check intent first. Two trivial pass-throughs
colliding (
return [...this.x.values()]) aren't always worth a shared home. - Names = mostly noise. Idiomatic repeats (
update,close,get, logger levels). Skim, don't mine — add--no-namesonce you've glanced.
3. The "real dupe?" test
The rule that separates worth-fixing from leave-it:
- Same rule encoded twice → collapse it. Validation, response unwrapping, a path-containment check, a magic constant, a normalization step. These are the drift hazards: one copy gets a fix, the other doesn't, and a phantom bug surfaces weeks later.
- Same shape by coincidence → leave it. Logger
debug/info/warn/error, SSEemit*helpers, store thunks, thin HTTP wrappers. Merging hurts readability for zero safety gain.
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.
- 1mo ago First seen · 164 lines · 69 tokens per session scan A 69d5d02eaec4
dedup is a skill published in the GitHub repository edimuj/tokenlean (13 stars, last pushed 3mo ago), licensed MIT. It adds 69 tokens to every session and 1,642 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
deep-module-refactor
Explore a codebase to find opportunities for architectural improvement, focusing on making the codebase more testable by deepening shallow modules. Use when user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more AI-navigable.
secure-code-review
Systematically reviews code for SQL injection, XSS, SSRF, broken access control, cryptographic failures, and other common OWASP Top 10 vulnerabilities, providing vulnerable code examples and ready-to-use remediation guidance. Trigger this skill when users ask for a security review, vulnerability scan, or penetration…
witness
Independently witness that an Allium loop's convergence claim is true and was reached honestly. Use when the user wants to verify a loop's self-report, confirm tests really pass and no generated test was weakened, produce a convergence certificate or witness record, gate CI on a trustworthy signal, or check that an…
agentbro-pr-merge
Use when reviewing, fixing CI for, approving workflows for, or merging AgentBro pull requests into dev/main, especially external contributor PRs where contributor attribution matters.
graph-it-live
Analyze code dependencies, call graphs, and architecture using the graph-it CLI. Use this skill whenever the user wants to understand how their code is connected — even if they don't say "dependency graph" explicitly. Trigger for: "what calls this function", "who uses this class", "is it safe to delete X", "what…
pr-review
Review pull requests and Git diffs with Graph-It-Live risk, breaking-change, dependency-impact, cycle, unused-export, and test-candidate evidence. Use when asked to review a PR, inspect a diff, assess merge risk, check a branch before merging, create a Graph-It-Live review gate, or explain review-pr results. Trigger…