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 debug-performancegit 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/debug-performance)<a href="https://agentmods.dev/skills/edimuj/tokenlean/debug-performance"><img src="https://agentmods.dev/badge/skills/edimuj/tokenlean/debug-performance/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/debug-performance"><img src="https://agentmods.dev/badge/skills/edimuj/tokenlean/debug-performance.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.00055 | $0.00624 |
| Opus 5.5 | $0.00022 | $0.00250 |
| Sonnet 5.5 | $0.00011 | $0.00125 |
| Haiku 4.5 | $0.00006 | $0.00062 |
Grade A, and why
debug-performance 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 3mo 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 — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Debug Performance
Find and fix performance bottlenecks by measuring, not guessing.
Workflow
Measure → Identify → Analyze → Optimize → Confirm
1. Measure
Establish a baseline before touching anything:
tl parallel \
"baseline=tl run '<benchmark or timed command>'" \
"complexity=tl complexity <file>" \
"hotspots=tl hotspots"
2. Identify
Find the actual bottleneck:
tl parallel \
"flow=tl flow <function> <file>" \
"deps=tl deps <file>" \
"symbols=tl symbols <file>"
3. Analyze
Understand why it's slow:
tl parallel \
"snippet=tl snippet <function> <file>" \
"related=tl related <file>" \
"scope=tl scope <function> <file>"
4. Optimize
Apply the fix based on the bottleneck type:
# Algorithmic change
tl flow <function> <file> # Verify new path is simpler
# Caching opportunity
tl impact <file> # How many callers benefit?
# Reducing I/O
tl deps <file> # Identify unnecessary imports
# Parallelization
tl flow <function> <file> # Confirm no shared state
5. Confirm
tl run "<same benchmark>" # Measure improvement — no numbers, no claim
Decision tree
"It's slow" → Do you have a measurement?
├─ Yes (specific operation) → tl flow on that operation
│ → tl snippet on each function in chain
│ → Find the O(n^2) or blocking I/O
├─ Vague ("app is slow") → tl hotspots + tl complexity
│ → Profile top 3 complex files
│ → tl flow on entry points to find hot paths
└─ Memory issue → tl deps on entry point
→ Look for large imports, circular refs
→ tl guard for circular deps
Tips
- Always benchmark before AND after — optimizations without numbers are guesses
tl complexity> 10 on a function is a red flag for performance problems- Check
tl depsfor heavy imports that could be lazy-loaded - Don't optimize cold paths — use
tl flowto confirm the function is on the hot path - Use
tl parallelfor all context-gathering steps — they're independent
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.
- 3mo ago First seen · 96 lines · 55 tokens per session scan A bbee5abe74d4
debug-performance is a skill published in the GitHub repository edimuj/tokenlean (14 stars, last pushed 4mo ago), licensed MIT. It adds 55 tokens to every session and 624 once invoked, about $0.0002 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-08-30.
debug-performance compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| debug-performanceedimuj/tokenlean | Skill | 14 | 4mo ago | MIT | A | 55 | Claude Code, Codex |
| wireshark-analysiszebbern/claude-code-guide | Skill | 4.7k | today | MIT | A | 79 | Claude Code, Codex |
| log-error-digestzebbern/claude-code-guide | Skill | 4.7k | today | MIT | A | 71 | Claude Code, Codex |
| vs-search-tuning-partial-casevolcengine/SearchCLI | Skill | 1.2k | 19d ago | Apache-2.0 | A | 85 | Claude Code, Codex |
| weedjuxt/allium | Skill | 548 | 11d ago | MIT | A | 71 | Claude Code |
| vs-searchvolcengine/SearchCLI | Skill | 1.2k | 19d ago | Apache-2.0 | A | 27 | Claude Code, Codex |
| dead-code-huntermagic5644/Graph-It-Live | Skill | 63 | 2d ago | MIT | A | 165 | Claude Code |