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 wan-huiyan/agent-traffic-control --skill claude-code-projects-jsonl-worktree-fanoutgit clone --depth 1 https://github.com/wan-huiyan/agent-traffic-controlWrote 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/wan-huiyan/agent-traffic-control/claude-code-projects-jsonl-worktree-fanout)<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/claude-code-projects-jsonl-worktree-fanout"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/claude-code-projects-jsonl-worktree-fanout/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/wan-huiyan/agent-traffic-control/claude-code-projects-jsonl-worktree-fanout"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/claude-code-projects-jsonl-worktree-fanout.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.00048 | $0.02007 |
| Opus 5 | $0.00024 | $0.01004 |
| Sonnet 5 | $0.00010 | $0.00401 |
| Haiku 4.5 | $0.00005 | $0.00201 |
Grade B, and why
claude-code-projects-jsonl-worktree-fanout scanned grade B 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 9d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
The user asks: *"find that session ~2 weeks ago where we discussed X"*. You grep `~/.claude/projects/-Users-<user>-Documents-foo-project/*.jsonl` for keywords, get partial or zero hits, and report "couldn't find it" — bu How it starts
The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Claude Code projects/ JSONL transcripts fan out across worktrees
Problem
The user asks: "find that session ~2 weeks ago where we discussed X". You grep ~/.claude/projects/-Users-<user>-Documents-foo-project/*.jsonl for keywords, get partial or zero hits, and report "couldn't find it" — but the session does exist, just under a different directory because it ran inside a git worktree.
Claude Code maps each git worktree to its own project directory under ~/.claude/projects/. The canonical project at /Users/<user>/Documents/foo-project/ becomes:
~/.claude/projects/-Users-<user>-Documents-foo-project/
But a worktree created via git worktree add .claude/worktrees/<wt-name> becomes a separate sibling:
~/.claude/projects/-Users-<user>-Documents-foo-project--claude-worktrees-<wt-name>/
Each worktree dir holds its own JSONL transcripts for sessions started from that working directory. A project that's seen heavy worktree use (typical for superpowers:using-git-worktrees workflow) can have dozens of sibling dirs.
Context / Trigger Conditions
- User asks about a prior session, conversation, or work in a project
- Project uses
superpowers:using-git-worktreesor has.claude/worktrees/populated - Your initial grep of
~/.claude/projects/<project-name>/*.jsonlreturned fewer hits than expected, or none - You want to enumerate every session that ever ran against the project (e.g. for a knowledge audit)
- Symptom:
~/.claude/projects/contains a<project-name>dir AND multiple<project-name>--claude-worktrees-<wt>siblings
Solution
Quick lookup (one-liner)
Glob the wildcard suffix to cover canonical + all worktrees:
ls ~/.claude/projects/ | grep -iE "<project-keyword>" | wc -l # confirm fan-out
Then search across all of them at once:
find ~/.claude/projects/ -name "*.jsonl" -newermt "<earliest-date>" 2>/dev/null \
| grep -iE "<project-keyword>" \
| grep -v subagents \
| while read f; do
c=$(grep -ic -E "<your-search-keywords>" "$f" 2>/dev/null)
[ "$c" -gt 0 ] && echo "$c | $(stat -f "%Sm" -t "%Y-%m-%d %H:%M" "$f") | $f"
done | sort -rn | head -10
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.
- 9d ago First seen · 162 lines · 48 tokens per session scan B 7adacfa031bf
claude-code-projects-jsonl-worktree-fanout is a skill published in the GitHub repository wan-huiyan/agent-traffic-control (3 stars, last pushed 4d ago), licensed MIT. It adds 48 tokens to every session and 2,007 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
llm-wiki
Build and maintain an LLM-curated personal knowledge base — the "LLM Wiki" pattern from Andrej Karpathy's April 2026 gist. Use this skill whenever the user wants to ingest a source (paper, article, transcript, PDF, notes) into a persistent compounding knowledge base, ask a question against accumulated notes, lint or…
bottle
Bootstrap a new or existing project with a small, file-based documentation system so Claude Code keeps context, lessons, and decisions across session restarts instead of starting cold every time. Sets up a handful of markdown files under .claude/ (standing rules, a free-form note to your next session, a phased…
lembas
Use between workflow phases or when context feels bloated. Writes a structured checkpoint capturing task, findings, files, state, and next steps, then continues from that summary instead of the full history. Invoke standalone or automatically between quest phases.
resume
Write down where this stretch of work stopped, so the next session continues instead of restarting. Use at the end of a working session, or when handing the repository to someone else.
capture
Write down a procedure worth keeping — a multi-step process, a trap that cost real time, or something that has now come up three times. Use it the moment you finish such a task, while the details are still exact.
notebook
Project notes system to prevent AI context loss and reasoning loops. Init notes, save mid-flow, recover context, migrate messy notes, resolve lessons. Subcommands: /notebook, /notebook save, /notebook recover, /notebook migrate.