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 coltonbearden/carrel --skill context-packinggit clone --depth 1 https://github.com/coltonbearden/carrelWrote 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/coltonbearden/carrel/context-packing)<a href="https://agentmods.dev/skills/coltonbearden/carrel/context-packing"><img src="https://agentmods.dev/badge/skills/coltonbearden/carrel/context-packing.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.00078 | $0.01247 |
| Opus 5 | $0.00039 | $0.00624 |
| Sonnet 5 | $0.00016 | $0.00249 |
| Haiku 4.5 | $0.00008 | $0.00125 |
Grade A, and why
context-packing 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.
How it starts
The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context packing with carrel pack
carrel pack PATHS... turns files and folders into a single LLM-ready document. The skill is choosing which files and how much of them — in that order. Run carrel pack --help before composing flags; the slash command /carrel-inspect:pack carries the current help.
When to pack
- The user wants an LLM (this session or another) to "read" a folder of documents.
- You need repeatable, shareable context (a file you can re-attach) rather than ad-hoc Reads.
- Many small files are involved — one pack beats dozens of Read calls.
Don't pack when the user needs 1–2 specific files — just read those.
Decision procedure
- Ask the index first:
--query. For "what does this folder say about X", don't pack the folder — pack the hits:carrel --root DIR pack DIR --query 'X OR "x phrase"' --top 12 -o ctx.md. Files come out in relevance order (FTS5 syntax: phrases in quotes, AND/OR/NOT,term*). This needs a desk index — runcarrel --root DIR indexonce (incremental, cheap to repeat).--fail-emptyturns "no hits" into exit 5 so you notice. - Scope by git for reviews:
--since. For a PR or branch,carrel pack . --since main -o pr.mdpacks only what changed since the ref (deleted files are listed in the header as removed, not packed);--changeddoes the same for uncommitted work. Combine with--queryor globs — filters intersect. - Orient before you commit:
--tree-only/--outline. On an unknown folder,carrel pack DIR --outlinecosts the same as a tree but shows.pydef/class names with line numbers and.mdheadings — usually enough to pick--includeglobs.--tree-onlyis the bare structure.--statsprints a per-file token table (the pack is still written when-ois given). - Choose a format.
--format xmlfor Claude — CDATA-wrapped<file>sections parse robustly.--format md(default) for humans and most models — fenced sections, fences auto-lengthen on collision.--format jsonwhen a program will consume the pack.
- Trim before you chunk. Prefer
--exclude/--includeglobs (repeatable) over huge chunk counts: exclude build output, archives, fixtures..gitignoreis honored, including!patternre-includes with git's last-match-wins rule (--no-gitignoredisables);.git/.carrelare always skipped. Binaries outside the supported types are tree-listed, never inlined.--dedupe-contentinlines identical files once. - Count precisely when it matters:
--tokenizer exact. The default estimate isceil(chars/3.6)labeledtokens_est— fine for sizing. When the pack must fit a hard budget (chunks near the window, billing), add--tokenizer exact(tiktoken o200k_base, fieldtokens; needs thecarrel[tokens]extra — exit 3 tells you). - Set budgets.
- Fits comfortably (rule of thumb: ≤ half the model's window, e.g. ≲80k tokens for a 200k window): single pack,
-o context.md. - Too big:
--chunk TOKENS -o out.md→out.part1..N, each ≤ TOKENS under the active tokenizer. Files are never split mid-file unless one alone exceeds the budget (then split on line boundaries with "(continued)" markers). Pick TOKENS ≈ what one turn can afford, e.g. 30000–60000. Not with--outline. - Hard caps:
--max-bytes N(total) and--max-file-bytes N(skip single huge files); omissions are noted in the pack header — mention them to the user.
- Fits comfortably (rule of thumb: ≤ half the model's window, e.g. ≲80k tokens for a 200k window): single pack,
- Images/scans: only read with
--ocr(needs tesseract/ocrmypdf); otherwise they're listed but contribute no text.
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.
- yesterday Changed · +4 lines · +14 tokens per session dea5d3fc2ae9
- 6d ago First seen · 51 lines · 64 tokens per session scan A 29c8d92adafd
context-packing is a skill published in the GitHub repository coltonbearden/carrel (1 stars, last pushed 2d ago), licensed MIT. It adds 78 tokens to every session and 1,247 once invoked, about $0.0004 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
mnemon
Persistent memory CLI for LLM agents. Store facts, recall past knowledge, link related memories, manage lifecycle.
durable-session-state
Persist plans, scope decisions, evidence, and reviewer/critic verdicts to durable files during long or multi-phase tasks so work survives context compaction, session resumes, and handoffs. Use for swarm-mode tasks, before context grows large, when recording approval gates, and when resuming after compaction or a…
memory
Persistent, token-efficient project memory. When ON, maintains a .shob/memory/ folder of structured .md files so the full context of the project is NEVER lost across responses, sessions, or context compaction. Uses progressive disclosure — routes through a lightweight INDEX and loads only the files a task needs…
sivtr-memory
Retrieve shared local work memory: terminal activity, AI conversation history, prior decisions, validation evidence, debugging trails, recaps, and handoff context. Use before asking the user to repeat local work context.
brain-ingest
The process for digesting a conversation, document, or research result, classifying it, and writing it down as brain content (a root-page update or a new/updated page) through the brain CLI.
kn-init
Use at the start of a new session to read project docs, understand context, and see current state.