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 yeisonrestrepo/code-conductor --skill cc-compactgit clone --depth 1 https://github.com/yeisonrestrepo/code-conductorWrote 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/yeisonrestrepo/code-conductor/cc-compact)<a href="https://agentmods.dev/skills/yeisonrestrepo/code-conductor/cc-compact"><img src="https://agentmods.dev/badge/skills/yeisonrestrepo/code-conductor/cc-compact/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/yeisonrestrepo/code-conductor/cc-compact"><img src="https://agentmods.dev/badge/skills/yeisonrestrepo/code-conductor/cc-compact.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.00032 | $0.02030 |
| Opus 5.5 | $0.00013 | $0.00812 |
| Sonnet 5.5 | $0.00006 | $0.00406 |
| Haiku 4.5 | $0.00003 | $0.00203 |
Grade A, and why
cc-compact 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 5d 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 — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.
code-conductor: this command was written for Claude Code. Where it names a Claude Code tool (Read, Grep, Glob, Edit, Write, Bash, Skill, Agent), use your closest equivalent.
$ARGUMENTSand anARGUMENTS:line mean the text the user gave with the command.
Run git rev-parse HEAD to get the current commit SHA (the full 40-char hash — NOT --short, whose abbreviation length auto-scales with repo size and is unstable across growth). Lowercase and trim it; if it does not match /^[0-9a-f]{7,40}$/, or the command exits non-zero (non-git workspace, no commits, git absent, or permission-denied), use "0000000". Wrap the call with shell timeout only when command -v timeout (or gtimeout) succeeds; otherwise run it unwrapped. This same value is sys.c and the sessions / snapshots git-hash key.
Determine sys.s: take the active specification file path from this phase's context, split on / and \, keep the last segment, strip a trailing .md extension, truncate to 200 characters. If no active spec file exists, use "none".
Collect from the current conversation context:
- Phase (
sys.ph):spec|plan|impl|rev, the phase that just completed - Decisions (
mem.d): finalized decisions this phase, max 10 elements, each ≤300 chars (JSON-serialized length) - Pending (
ops.n): next immediate step(s), max 3 elements, each ≤200 chars - Files Touched (
ops.f): each entry<relpath>:C|M|D(uppercase only); replace any backslash in the path with/; if the path contains a literal:, percent-encode it as%3Abefore appending the suffix; max 20 elements, each ≤300 chars - Constraints (
mem.x): hard constraints next phase must respect, max 5 elements, each ≤200 chars
For all four array fields: filter out empty/whitespace-only strings, deduplicate by exact case-sensitive string equality (first occurrence wins), then truncate each surviving element to its per-element cap (snap-build does the cut, to the cap measured as JSON-escaped length, never splitting a character; an over-cap ops.f entry keeps its :C/:M/:D suffix and loses path, and one with no such suffix is refused with SNAP_FILE_NO_ACTION), then if the array still exceeds its cap, drop from the head (oldest first) until it fits. Empty arrays are valid and must still be serialized (never omitted).
Serialize by piping a flat JSON object {ph, c, s, n, f, d, x} (no pr) on stdin to node .claude/scripts/snap-build.mjs; its stdout is the canonical single-line v1 SNAP JSON. snap-build performs all array normalization (filter/dedup/per-element cap/head-drop) and the 4096-char size trim internally — do not pre-serialize. If snap-build exits non-zero (malformed field object), report the error and stop; do not write the handoff file, do not run the DB tail, do not print the compact prompt.
Write the single JSON line, followed by exactly one trailing newline, to .claude/memory/session-snapshot.json.
If .claude/memory/session-snapshot.md exists, delete it as part of this write.
Idempotently append .claude/memory/session-snapshot.json to the project's .gitignore: read the file; if any line, after stripping leading/trailing whitespace, exactly equals .claude/memory/session-snapshot.json, skip the append. Otherwise, check whether the last byte of .gitignore is a newline; if not, prepend a newline before the appended entry. If .gitignore cannot be read or written (permission or lock error), log a non-fatal warning to stderr and continue; do not block the snapshot write.
If writing the snapshot fails (e.g., missing .claude/memory/ directory), report the error and stop. Do NOT output the compact prompt.
Once the snapshot is written successfully, output exactly:
Snapshot written. Run
/compactnow to clear history.
Fail-open DB tail (best-effort, synchronous)
After the handoff file is written and the compact prompt is ready — and only if the authoritative write succeeded — run this synchronous, fail-open tail. Any failure here is non-fatal: never revert the handoff file, never suppress the compact prompt.
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.
- 5d ago First seen · 69 lines · 32 tokens per session scan A 559fb26e6df8
cc-compact is a skill published in the GitHub repository yeisonrestrepo/code-conductor (22 stars, last pushed 2d ago), licensed MIT. It adds 32 tokens to every session and 2,030 once invoked, about $0.0001 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-11-25.
cc-compact compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cc-compactyeisonrestrepo/code-conductor | Skill | 22 | 2d ago | MIT | A | 32 | Claude Code |
| decision-loggerbestagentkits/agency-skills | Skill | 28 | 5mo ago | MIT | A | 76 | Codex |
| context-enginebestagentkits/agency-skills | Skill | 28 | 5mo ago | MIT | A | 75 | Codex |
| decidebestagentkits/agency-skills | Skill | 28 | 5mo ago | MIT | A | 66 | Codex |
| baoyu-wechat-summarybestagentkits/agency-skills | Skill | 28 | 5mo ago | MIT | B | 213 | Codex |
| comet-memoryrpamis/comet | Skill | 3.3k | yesterday | MIT | A | 38 | Claude Code, Codex |
| relevance-coarse-filterelvisun/newsjack | Skill | 1.7k | 4d ago | MIT | A | 57 | Claude Code |