autorefresh-setup

autorefresh-setup is a command for Claude Code from wrg32786/aigent-os. It costs 16 tokens per session (340 once invoked), scanned B, original, MIT.

A context-preservation plugin for coding sessions. It provides saved capsules, commands for writing and resuming them, and hooks that point a cleared or compacted session to the saved context.

In plain words
What is it for?
Use it to save session summaries, resume from them after clearing or compaction, and configure manual refresh instructions without network access.
Why use it?
It helps continue long tasks after conversation context is cleared or shortened. It does not itself launch the coding assistant or type the clear command.

Command for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: reads .claude/ paths; mentions Claude Code.

Part of the context-capsule plugin — 2 skills, 3 commands, 2 hooks shipped together

Good fit Use it to save session summaries, resume from them after clearing or compaction, and configure manual refresh instructions without network access.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/wrg32786/aigent-os/autorefresh-setup
Install

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.

Clone the repo
git clone --depth 1 https://github.com/wrg32786/aigent-os

Made for: Claude Code.

Or install context-capsule, the plugin that ships this one along with the rest of its 2 skills, 3 commands, 2 hooks.

Wrote 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.

agentmods badge for autorefresh-setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/wrg32786/aigent-os/autorefresh-setup/github.svg)](https://agentmods.dev/commands/wrg32786/aigent-os/autorefresh-setup)
Your own site
<a href="https://agentmods.dev/commands/wrg32786/aigent-os/autorefresh-setup"><img src="https://agentmods.dev/badge/commands/wrg32786/aigent-os/autorefresh-setup/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.

agentmods 80×15 button for autorefresh-setup

Your own site · 80×15
<a href="https://agentmods.dev/commands/wrg32786/aigent-os/autorefresh-setup"><img src="https://agentmods.dev/badge/commands/wrg32786/aigent-os/autorefresh-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 340 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.00340
Opus 5.5 $0.00006 $0.00136
Sonnet 5.5 $0.00003 $0.00068
Haiku 4.5 $0.00002 $0.00034

Measured today against content hash bfd6c71c8d3d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

autorefresh-setup 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 today.

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.

3. **Your settings (read-only check).** Look at the user's `~/.claude/settings.json` and project `.claude/settings.json` and tell them whether `idleCompaction` is set. The aigent-os runner expects `"idleCompaction": fals
plugins/context-capsule/commands/autorefresh-setup.md · 11 lines

What it actually says

Print the following guidance to the user. Do not run any installer, do not edit settings files, do not download anything.

  1. What this plugin gives you. Manual-trigger refresh: /refresh writes a capsule, you run /clear, and the SessionStart hook points the fresh session at the capsule. The PreCompact hook cannot write or save anything useful: if no valid capsule exists it only leaves a marker, and the SessionStart hook after the compaction then says no capsule existed and asks you to run /capsule. Run /capsule before compaction if you want context preserved.
  2. What it cannot do. A plugin is loaded by Claude Code, so it cannot launch Claude Code or type /clear for you. Fully hands-off refresh at a context threshold needs a runner that owns the terminal session. That runner is part of the full aigent-os install, not this plugin.
  3. Your settings (read-only check). Look at the user's ~/.claude/settings.json and project .claude/settings.json and tell them whether idleCompaction is set. The aigent-os runner expects "idleCompaction": false. Say what you found and that they can change it themselves; do not edit it.
  4. For hands-off refresh. Point them to the aigent-os repository (https://github.com/wrg32786/aigent-os) and its INSTALL.md. When aigent-os is installed in a project, this plugin detects it and stays silent, so the two never double-fire.
Changes

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.

  1. today First seen · 11 lines · 16 tokens per session scan B bfd6c71c8d3d

Subscribe to this mod's changes

autorefresh-setup is a command published in the GitHub repository wrg32786/aigent-os (25 stars, last pushed today), licensed MIT. It adds 16 tokens to every session and 340 once invoked, about $0.0001 per session on Opus 5.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-10-28.