Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add Marcel-Bich/marcel-bich-claude-marketplace/plugin install credoWrote 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/commands/marcel-bich/marcel-bich-claude-marketplace/self-compact)<a href="https://agentmods.dev/commands/marcel-bich/marcel-bich-claude-marketplace/self-compact"><img src="https://agentmods.dev/badge/commands/marcel-bich/marcel-bich-claude-marketplace/self-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/commands/marcel-bich/marcel-bich-claude-marketplace/self-compact"><img src="https://agentmods.dev/badge/commands/marcel-bich/marcel-bich-claude-marketplace/self-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.03328 |
| Opus 5.5 | $0.00013 | $0.01331 |
| Sonnet 5.5 | $0.00006 | $0.00666 |
| Haiku 4.5 | $0.00003 | $0.00333 |
Grade A, and why
self-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 15d 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 — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Credo Self-Compact
After compact-plus has secured the session state to disk (requirements log, rolling
HANDOFF.md, rehydrate breadcrumb), this runs the REAL Claude Code /compact on the same
session to save tokens. An agent cannot call /compact itself, so a detached worker types
it into the session's OWN tmux pane - only once the session is idle and the input field is
empty. After the compact the session wakes itself: a finished /compact does not start
a model turn, so the worker waits for the deterministic compact-done signal and then types
. to continue (details below).
Helper: ${CLAUDE_PLUGIN_ROOT}/scripts/credo-self-compact.py
| Action | What it does |
|---|---|
check (default) |
Dry run. Resolves the tmux pane of THIS Claude process (TMUX_PANE from the Claude process environment, server socket from its TMUX), verifies the pane's process is this Claude process or the shell that started it with no other Claude process in between (a nested claude never types into the outer session's pane), checks the compact-plus breadcrumb (present and not older than --max-breadcrumb-age, default 7200 s = 2 h, also settable via CREDO_SELF_COMPACT_BREADCRUMB_MAX_AGE), prints the plan, the exact text it would type and the current pane state (background work in the footer does not count). Types nothing. Exit 1 with the reason when a precondition fails (not in tmux, pane of another process, no or stale breadcrumb, no session id). |
run (--auto | --user-confirmed) [--delay S] [--timeout S] [--handoff PATH] |
Owner-rule guard first: refused -> exit 3, nothing started. Running background work does not block it (below). Then validates like check (exit 1 + ntfy on failure). Otherwise spawns a fully detached worker and returns at once. End your turn right after run. Refuses while another self-compact or a /credo:self-reload of this session is pending (both type into the same pane and share the wake file). |
cancel |
Marks the pending self-compact of THIS session (CLAUDE_CODE_SESSION_ID) as cancelled and terminates its worker and removes a pending wake file. This works before typing, while typing (then no Enter is sent and the own line is taken back out of the input field, only when the field holds exactly that line) and while the worker waits for the compact or the wake. Once Enter was sent, the compact itself runs and only the wake is stopped. Nothing more is typed. Another session's pending self-compact is never touched. |
status |
State line (pending / typing / sent / waking / woken / cancelled / failed: ...), the marker <configdir>/credo/self-compact-<session-id>.json and the tail of <configdir>/credo/self-compact-<session-id>.log of THIS session. |
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.
- 15d ago First seen · 173 lines · 32 tokens per session scan A ab70fea513ae
self-compact is a command published in the GitHub repository Marcel-Bich/marcel-bich-claude-marketplace (12 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 3,328 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-10-10.
Other commands, from other repositories
context-stats
Display context window usage and token statistics.
handoff
Write a session handoff document for continuity.
hades-show-proposals
Show pending Asphodel memory update proposals.
hades-validate-memory
Validate every Asphodel memory file and report results.
deps-update
Audit and update dependencies safely.
security-scan
Run security audit on codebase.