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.
npx skills add Borda/AI-Rig --skill sessiongit clone --depth 1 https://github.com/Borda/AI-RigWrote 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/borda/ai-rig/session)<a href="https://agentmods.dev/skills/borda/ai-rig/session"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/session/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/borda/ai-rig/session"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/session.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.00205 | $0.05844 |
| Opus 5.5 | $0.00082 | $0.02338 |
| Sonnet 5.5 | $0.00041 | $0.01169 |
| Haiku 4.5 | $0.00020 | $0.00584 |
Grade B, and why
session 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 6d 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.
find .claude/state/session -maxdepth 1 -name '*.md' ! -name 'PARKED.md' 2>/dev/null | while IFS= read -r f; do How it starts
The opening of the file, as written. The whole thing — 343 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Carry the durable part of a session across /clear, hold open loops until they land. dump composes a small handover doc from the live conversation, writes it to .claude/state/session/<slug>.md, ends by printing /clear. The session-restore.js hook (SessionStart, matcher clear) injects that doc into the fresh session, so restore is free. Implementation detail — diffs, tool output, exploration transcript, abandoned approaches — dropped on purpose; only the decision that settled an approach survives.
Runs inline, never context: fork. Conversation history is the authoritative source for what changed, what was decided, what never landed; a forked run would see none of it.
NOT for: auto-compact survival (compaction.md skill contract); reviving a finished conversation (native /resume). Boundary table in the notes section below.
- $ARGUMENTS: required. Six modes:
dump [name]— sweep, compose and write handover doc, setLATESTpointer, print/clearnext step.nameoptional; unnamed dumps derive a slug from branch + UTC timestamp.recall [name]— print a stored handover into context, mark it consumed. Named, orLATESTwhen omitted. Manual path for dumps the hook skips.list— table of stored handovers (slug, age, consumed) plus open parked items.park <idea>— append one open-loop item to.claude/state/session/PARKED.md. No dump needed; works any time.sweep— read conversation for unlanded ideas, unanswered questions, pending tasks; report them, offer to park.drop <item>— fuzzy-match a parked item, remove it, log the closure.
- Store dir:
.claude/state/session/(project-local;.claude/state/gitignored, same assession-context.md) - Item store:
.claude/state/session/PARKED.md— one bullet per open item; survives every dump, never auto-deleted - Pointer file:
.claude/state/session/LATEST— plain text, slug of most recent unconsumed dump. Blank or missing = nothing pending. - Closure log:
.claude/state/session/dropped.jsonl— one JSON line perdrop - Doc size cap: ~1.5K tokens (~75 lines). Compress prose, never drop a decision.
- Hook auto-restore window: unconsumed and
createdwithin 30 min. Outside it,recallis the manual path. - Hook truncation threshold: ~8000 chars — above it hook injects
## Goal+ files table +## Next step+ a→ /foundry:session recall <slug>pointer instead of the whole doc. - Stale threshold: 14 days (
⚠ staleprefix when listing) — applies to handover docs and parked items - Delete threshold: 30 days — handover docs only, swept during
list. Parked items never auto-deleted; onlydropremoves one. - Files-table row cap: 25 (over that, group by directory, state elided count)
Task hygiene — task tools may be deferred; load before first use: ToolSearch(query="select:TaskList,TaskCreate,TaskUpdate,TaskGet", max_results=4). Call TaskList first and triage each task it returns: completed if work clearly done, deleted if orphaned, keep in_progress only if genuinely continuing. Never spend a turn on bookkeeping alone — every TaskCreate/TaskUpdate ships in the same response as the next substantive tool call; one exception, TaskUpdate(completed) immediately before a long output block (rules/task-lifecycle.md).
Step 0: Validate and dispatch mode
Extract first word of $ARGUMENTS as MODE.
If MODE matches:
dump(alias:save) → Mode: dumprecall(aliases:restore,load) → Mode: recalllist→ Mode: listpark→ Mode: parksweep→ Mode: sweepdrop(alias:archive) → Mode: drop
Unsupported flag check — after extracting mode token, scan the tokens after it for --<token> patterns — except in park and drop, whose whole remainder is free-text payload (an idea or item may itself contain --), never flags. Found: invoke AskUserQuestion with question text ! Unknown flag(s): `--<token>`. Supported modes: dump, recall, list, park, sweep, drop. — (a) Abort (stop, re-invoke correctly) · (b) Continue ignoring (skip unknown flags, proceed with recognized mode).
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.
- 6d ago Changed · -4 tokens per session 551c5f1c3cf6
- 15d ago Changed f14cb1fbdc1b
- 17d ago Changed 5d984f0a53b9
- 27d ago Changed · +9 lines ea2ba8684b64
- 28d ago Changed · -5 lines 67bd9d2e4cb6
- 1mo ago Changed · +2 lines 2eed207ddc30
- 1mo ago Changed 872038610697
- 1mo ago First seen · 337 lines · 209 tokens per session scan B ef11cbb9599e
session is a skill published in the GitHub repository Borda/AI-Rig (28 stars, last pushed yesterday), licensed Apache-2.0. It adds 205 tokens to every session and 5,844 once invoked, about $0.0008 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-08-30.
Other skills, from other repositories
memory-review
Review the file-based memory store via the Agent Monitor Config Explorer API: the user and project CLAUDE.md plus per-project auto-memory files under /.claude/projects/ /memory/.md. Groups by project, shows the index (MEMORY.md) vs per-fact files, and flags stale or oversized facts. Reads /api/cc-config/memory and…
context-optimizer
A context-management assistant for long conversations with AI agents. It helps organize the information an agent needs when conversations become large or contain conflicting details.
context-engineering
Strategies for managing LLM context windows effectively in AI agents. Use when building agents that handle long conversations, multi-step tasks, tool orchestration, or need to maintain coherence across extended interactions.
handover
Session handover — end a session by systematically updating project state files for continuity. Use this when the session is ending, the user asks for a "handover", or when significant progress needs to be recorded.
learn
Capture an observation — something that went wrong or worked well — to LEARNINGS.md for future reference. Quick in-session capture, not full analysis.
review-memory
Review auto-memory for the current project. Shows accumulated learnings, identifies noise, and helps promote permanent patterns to CLAUDE.md, rules, or skills.