Borrowing it
Nothing to install: this file belongs to tatargabor/set-core. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/tatargabor/set-core/main/.claude/skills/auto-clear/SKILL.mdgit clone --depth 1 https://github.com/tatargabor/set-coreWrote 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/tatargabor/set-core/auto-clear)<a href="https://agentmods.dev/skills/tatargabor/set-core/auto-clear"><img src="https://agentmods.dev/badge/skills/tatargabor/set-core/auto-clear/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/tatargabor/set-core/auto-clear"><img src="https://agentmods.dev/badge/skills/tatargabor/set-core/auto-clear.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.00061 | $0.03734 |
| Opus 5.5 | $0.00024 | $0.01494 |
| Sonnet 5.5 | $0.00012 | $0.00747 |
| Haiku 4.5 | $0.00006 | $0.00373 |
Grade B, and why
auto-clear 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 9d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
grep -E '"enabledPlugins"' -A8 .claude/settings.json ~/.claude/settings.json 2>/dev/null | grep -i true How it starts
The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.
auto-clear — arm, check, or switch off the automatic clear cycle
The cycle this arms, once running, needs no human keystrokes:
1. limit (default 400k) the gate measures each session's OWN context number
or warm-idle (48 min) …or its idle time: ≥ 48 min with no request at ≥ 200k (before the runtime's idle compaction)
2. handoff készítés the session writes a handoff; the write-check hook arms it
3. auto-clear the executor types /clear when every gate holds
4. auto-reload the SessionStart:clear hook injects the right handoff
5. auto-continue the executor re-prompts the fresh session (optional, recommended)
Never clear without step 2: a session with no fresh handoff of its own is never cleared — that is the one rule the machinery will not bend.
Arguments
- (none) or
on— full state check, then arm what is missing. off [project|session <id8>]— create a kill-switch file (below). Default: ask which scope.status— report measured state only; change nothing.
1. STATE first — measure, never assume
Run and report; each answer changes what you do next:
Hooks and the watcher come by one of two routes, and either one is enough:
- copy route:
initcopied the files into.claude/hooks/, and the project's settings call them; - package route: no copy at all. A plugin's
hooks/hooks.jsoncallsset-claude-handoff hook … --from-plugin(written byset-claude-handoff plugin-files), or the project's settings callset-claude-handoff hook …without--from-plugin. The watcher runs asset-claude-handoff watch --dir <tree>, which runs the package's owntemplates/watch-auto-clear.sh.
command -v set-claude-handoff # the package binary (package route)
test -f .claude/hooks/clear-gate.mjs && echo gate-copy || echo no-gate-copy # copy route only
grep -cE 'handoff-reinject-clear|hook reinject' \
.claude/settings.json .claude/settings.local.json 2>/dev/null # project wiring, either route
grep -E '"enabledPlugins"' -A8 .claude/settings.json ~/.claude/settings.json 2>/dev/null | grep -i true
grep -l 'hook reinject --from-plugin' \
~/.claude/plugins/cache/*/*/*/hooks/hooks.json 2>/dev/null # plugins that wire it (enabled ones count)
ls -l .set/handoff/.watcher-alive 2>/dev/null # a watcher's heartbeat (≤ 10 min = live)
ls .set/handoff/.no-autoclear 2>/dev/null # PROJECT switch: present = OFF
pgrep -af "watch-auto-clear.sh" | grep -- "--dir $(pwd -P)" || true # a watcher for THIS tree, either route
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.
- 9d ago First seen · 216 lines · 61 tokens per session scan B 9c629ee13465
auto-clear is a skill published in the GitHub repository tatargabor/set-core (36 stars, last pushed yesterday), licensed MIT. It adds 61 tokens to every session and 3,734 once invoked, about $0.0002 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-11-26.
auto-clear compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| auto-cleartatargabor/set-core | Skill | 36 | yesterday | MIT | B | 61 | Claude Code |
| handoffterva-sh/terva | Skill | 5 | yesterday | MIT | A | 56 | Claude Code, Codex |
| openrig-herdrmvschwarz/openrig | Skill | 9.0k | today | Apache-2.0 | A | 132 | Claude Code, Codex |
| context-engineeringmvschwarz/openrig | Skill | 9.0k | today | Apache-2.0 | A | 142 | Claude Code, Codex |
| claude-compaction-restoremvschwarz/openrig | Skill | 9.0k | today | Apache-2.0 | A | 60 | Claude Code |
| retiring-and-inheriting-a-seatmvschwarz/openrig | Skill | 9.0k | today | Apache-2.0 | A | 145 | Claude Code |
| mission-slice-sopmvschwarz/openrig | Skill | 9.0k | today | Apache-2.0 | A | 30 | Claude Code |