Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By wrg32786v0.1.0MITIn 1 marketplace
Saves a resume-ready capsule of your session so /clear or auto-compact picks up at the next step. You run /clear yourself, then a SessionStart hook injects the capsule pointer. Claims zero dependencies and no network.
Trending plugins
7-day copy clicks
You run one by typing its /name in Claude Code.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Claude Code asks for these when you enable the plugin. Sensitive values are stored in your system keychain.
Capsule directorycapsuleDir
Folder where capsules are written and read. Relative paths resolve against the project. Empty: <project>/.claude/capsules/.
stringdefault
Stale limit (days)maxAgeDays
Capsules older than this are refused at resume instead of loaded.
numberdefault 14
Write a resume-ready capsule of your Claude Code session, then /clear (or let auto-compact run) and pick up exactly where you left off. Plain Node scripts, zero npm dependencies, no network.
This is the portable half of aigent-os "Auto-Refresh": capsule, clear, automatic resume pointer. It is manual-trigger. A plugin is loaded by Claude Code, so it cannot type /clear for you; you run /clear, the plugin does the rest. Fully hands-off refresh at a context threshold stays an aigent-os feature (see /autorefresh-setup).
/plugin marketplace add wrg32786/aigent-os
/plugin install context-capsule@aigent-os
No build step, no npm install. Needs Node 18+ on your PATH. ${CLAUDE_PLUGIN_DATA} is not used; capsules live in the project.
| Piece | What it does |
|---|---|
/capsule | Writes a capsule now: objective, waiting_on, next_valid_action, plus reference sections. |
/refresh | Writes a capsule and tells you to run /clear. |
/resume | Loads the newest valid capsule, re-grounds against the live repo, takes the next step. |
/autorefresh-setup | Prints how hands-off refresh works and where it lives. Installs nothing. |
PreCompact hook | Side effect only; it prints nothing, because Claude Code does not add PreCompact output to the context. It does not save any context and cannot write a capsule. If no valid capsule exists it writes a small marker file (.precompact-marker.json) in the capsule directory. With a valid capsule it just removes any stale marker. To keep context across auto-compact, run /capsule before compaction happens. |
SessionStart hook (clear and compact only) | Injects one small block (at most 1800 characters): capsule id, path, age, objective, waiting_on, next_valid_action, all quoted as data. On clear it marks the capsule resumed so the next clear does not replay it. On compact the capsule stays active; if the PreCompact marker is present and no valid capsule exists, the block says no capsule existed when compaction ran and asks you to run /capsule now. That is a reminder after the fact; it does not recover anything the compaction dropped. The marker is deleted either way. |
Typical flow: /refresh, then /clear; the new session's first turn names the capsule and continues the waiting_on item.
<project>/.claude/capsules/ by default. Set the capsuleDir option (plugin config) to use another folder; a relative path resolves against the project. The hooks read the option from the environment Claude Code gives them; /capsule and the resume skill run in a Bash call that does not get it, so they pass it on the command line as --dir (the helper also accepts --dir by hand). An empty option means the project default. A configured path containing a single quote is not supported by /capsule. The plugin never uses an aigent-os vault path unless you point capsuleDir at one. The capsule format is the aigent-os format, so a later full install reads the same files.
Add .claude/capsules/ to your .gitignore: capsules are working state, not source. Capsules older than 14 days are refused at resume, not loaded (plugin option maxAgeDays; the CONTEXT_CAPSULE_MAX_AGE_DAYS env var overrides it). So are capsules with no frontmatter, empty required fields, or text that is an injected-instruction echo. A refusal names each rejected file and the reason.
If aigent-os is installed in the project, this plugin's hooks exit 0 and print nothing, so you never get a second capsule or a second resume injection. Detection (either is enough):
.aigent/state.json with a schemaVersion key in the project root (or in $AIGENT_ROOT). install.sh writes this file on every install.SessionStart or PreCompact hook in the project's .claude/settings.json or settings.local.json (or in the user profile directory's settings.json or settings.local.json: CLAUDE_CONFIG_DIR, or ~/.claude when unset) that runs aigent-os's sessionstart-reinject.mjs, resume-verb.mjs or precompact-flush.mjs.The commands and skills still work in that case; only the automatic hooks defer.
.claude/settings.json and .claude/settings.local.json in the project and in the Claude Code user profile directory (CLAUDE_CONFIG_DIR, or ~/.claude when unset; aigent-os detection only), .aigent/state.json./capsule), the PreCompact marker there, and the status: line of a capsule it just resumed on clear. Nothing else. No plugin data directory is used. Nothing is written to your home directory.node: built-ins, and a test fails if that changes.7-day copy clicks
npx claudepluginhub wrg32786/aigent-os --plugin context-capsulePlugins from other owners that cover similar ground
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.