set-copilot: Skill for Claude Code

.claude/skills/auto-clear/SKILL.md

auto-clear is a skill for Claude Code from tatargabor/set-copilot. It costs 61 tokens per session (3,734 once invoked), scanned B, original, MIT.

A control for an automatic cycle that records a handoff, clears a session, reloads the handoff in a new session, and optionally continues the task.

In plain words
What is it for?
It is for turning the cycle on or off, checking its measured state, and managing context resets in a project or session.
Why use it?
It reduces the chance that long sessions lose their current state when the context grows too large or the session has been idle. It will not clear a session unless a fresh handoff exists.

Skill for Claude Code

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

This is tatargabor/set-copilot's own configuration. It tells Claude Code how to work on set-copilot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything set-copilot configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tatargabor/set-copilot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/tatargabor/set-copilot/master/.claude/skills/auto-clear/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/tatargabor/set-copilot

Made for: Claude Code.

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 auto-clear

README.md
[![agentmods](https://agentmods.dev/badge/skills/tatargabor/set-copilot/auto-clear/github.svg)](https://agentmods.dev/skills/tatargabor/set-copilot/auto-clear)
Your own site
<a href="https://agentmods.dev/skills/tatargabor/set-copilot/auto-clear"><img src="https://agentmods.dev/badge/skills/tatargabor/set-copilot/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.

agentmods 80×15 button for auto-clear

Your own site · 80×15
<a href="https://agentmods.dev/skills/tatargabor/set-copilot/auto-clear"><img src="https://agentmods.dev/badge/skills/tatargabor/set-copilot/auto-clear.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,734 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.00061 $0.03734
Opus 5.5 $0.00024 $0.01494
Sonnet 5.5 $0.00012 $0.00747
Haiku 4.5 $0.00006 $0.00373

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

Security

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
.claude/skills/auto-clear/SKILL.md · 216 lines

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: init copied the files into .claude/hooks/, and the project's settings call them;
  • package route: no copy at all. A plugin's hooks/hooks.json calls set-claude-handoff hook … --from-plugin (written by set-claude-handoff plugin-files), or the project's settings call set-claude-handoff hook … without --from-plugin. The watcher runs as set-claude-handoff watch --dir <tree>, which runs the package's own templates/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

Read the full file on GitHub · 216 lines

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. 9d ago Changed · +55 lines scan A → B 9c629ee13465
  2. 11d ago First seen · 161 lines · 61 tokens per session scan A 26a7fcbed479

Subscribe to this mod's changes

auto-clear is a skill published in the GitHub repository tatargabor/set-copilot (3 stars, last pushed 6d ago), 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-24.

Related

auto-clear compared with skills from other repositories

auto-clear next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
auto-cleartatargabor/set-copilotSkill36d agoMITB61Claude Code
Migratedanielmiessler/LifeOSSkill21k17d agoMITA104Claude Code, Codex
Cortexdanielmiessler/LifeOSSkill21k17d agoMITA184Claude Code
Profiledanielmiessler/LifeOSSkill21k17d agoMITA108Claude Code, Codex
wiki-dashboardAr9av/obsidian-wikiSkill3.9ktodayMITA42Claude Code
relevance-coarse-filterelvisun/newsjackSkill1.7k10d agoMITA57Claude Code
daily-briefingvellum-ai/vellum-assistantSkill1.5k4d agoMITA75Claude Code, Codex