Borrowing it
Nothing to install: this file belongs to zkysar1/Claude-Mind. 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/zkysar1/Claude-Mind/main/.claude/skills/drain-temp/SKILL.mdgit clone --depth 1 https://github.com/zkysar1/Claude-MindWrote 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/zkysar1/claude-mind/drain-temp)<a href="https://agentmods.dev/skills/zkysar1/claude-mind/drain-temp"><img src="https://agentmods.dev/badge/skills/zkysar1/claude-mind/drain-temp/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/zkysar1/claude-mind/drain-temp"><img src="https://agentmods.dev/badge/skills/zkysar1/claude-mind/drain-temp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Tool Misuse · line 163 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
- high Tool Misuse · line 340 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
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.00237 | $0.06567 |
| Opus 5 | $0.00118 | $0.03284 |
| Sonnet 5 | $0.00047 | $0.01313 |
| Haiku 4.5 | $0.00024 | $0.00657 |
Grade A, and why
drain-temp scanned grade A with 0 findings 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 yesterday.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 408 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/drain-temp — Temp Store Drain Engine
Encodes the value out of agents/<agent>/temp/ into the one long-term retrieval
surface (the knowledge tree + supplementary stores), then archives each processed
file to temp/drained/. This is the mechanism that makes temp/ a STAGING area
rather than a slush directory: every working doc either drains into knowledge or
is discarded — nothing lives in temp/ permanently.
Hybrid skill: the user invokes it ("drain temp", "encode everything in temp");
the aspirations loop invokes it when aspirations-precheck flags
temp_drain_needed (temp/ accumulated past the drain threshold). Writes to the
tree / reasoning bank / guardrails — requires assistant or autonomous mode.
Why this exists
A working document written to temp/ is in none of the retrieval stores until it
is drained — invisible to /prime and retrieve.sh. Draining is how that knowledge
becomes durable and findable. See core/config/conventions/temp-store.md.
Phase 0: Load Routing Context
Bash: load-conventions.sh temp-store learning-routing
→ Read the returned paths not already in context. learning-routing.md carries the
"where does this learning go?" decision tree used in Phase 2 classification.
Phase 1: Enumerate Undrained Files
1. Resolve the bound agent's temp dir via the canonical path helper (never
hardcode an agent name — _paths.sh exports AGENT_DIR for $MIND_AGENT):
Bash: source core/scripts/_paths.sh; TEMP_DIR="$AGENT_DIR/temp"; echo "$TEMP_DIR"
2. List undrained working docs — files DIRECTLY under temp/ (NOT under drained/):
Bash: ls -1 "$TEMP_DIR"/*.md "$TEMP_DIR"/*.json 2>/dev/null
(drained/ is the archive subdir — never re-drain it; the glob above does not
descend into it.)
2b. ALSO list the THIRD-CLASS residue — everything matching NEITHER the
*.md/*.json glob above NOR Phase 1.5's ephemera suffixes:
Bash: find "$TEMP_DIR" -maxdepth 1 -type f ! -name '.*' \
! -name '*.md' ! -name '*.json' ! -name '*.log' ! -name '*.txt' \
! -name '*.py' ! -name '*.sh' ! -name '*.err' ! -name '*.raw' \
! -name '*.out' ! -name '*.bak*'
These are NOT auto-drained; CLASSIFY each one in Phase 2 alongside the docs
(same routing table, same 3b probe where the shape is probe-able).
WHY AT CENSUS TIME AND NOT LATER: Phase 2.5's stamp gate condemns exactly
this population, so meeting it there means meeting it as a list of files you
are about to DELETE. Measured twice on the same box (2026-08-27 and
2026-08-30, echo/cc-03): both passes correctly retracted the stamp per
guard-4864, and substantially the same five files came back — because a
correctly-refused stamp protects them from deletion while nothing ever
classifies them, so they can never be legitimately discharged either. Two
correct mechanisms composing into a permanent blind spot. Retracting is safe
and INSUFFICIENT; this step is what lets the stamp pass on merit. The 08-30
pass classified all five in minutes and one turned out to be a working
compile gate that existed nowhere else on the box. (rb-9792, g-001-104.)
3. IF no drainable files (.md/.json): set docs_count=0 and skip Phase 2-3, but
STILL run Phase 1.5 — pure ephemera (.log/.txt) may need purging even when no
docs remain (the g-115-1727 case: 7 ephemera survived a full doc-drain).
Report "temp/ is clean" + DONE only if Phase 1.5 ALSO purges nothing.
4. IF --file <name> given: restrict the list to that one file under "$TEMP_DIR"
and SKIP Phase 1.5 (single-file drain is a targeted op, not a full sweep).
5. Sort oldest-first (timestamped filenames sort lexically = chronologically).
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.
- yesterday Changed · +2 lines 00df55050d6e
- 5d ago Changed · +19 lines 05ee3125b868
- 9d ago First seen · 387 lines · 237 tokens per session scan A ef4a1707c966
drain-temp is a skill published in the GitHub repository zkysar1/Claude-Mind (5 stars, last pushed yesterday), licensed MIT. It adds 237 tokens to every session and 6,567 once invoked, about $0.0012 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
hive.context-preservation
Proactively extract critical values from tool results into working notes before automatic context pruning destroys them.
hive.note-taking
Maintain a free-form scratchpad of decisions, extracted values, and open questions so context pruning doesn't lose anything you still need.
Vizra ADK Memory System
Implement persistent memory, session context, and vector memory (RAG) for AI agents.
learning-capture
Log corrections, errors, and discoveries to orbital/LESSONS.md so future sessions avoid repeating mistakes.
obsidian
A skill for working with an Obsidian vault, which is a folder of Markdown notes used as a personal knowledge base. It covers creating, extending, searching, and organizing notes, including links, tags, folders, and daily entries.
memory-system
3-tier hierarchical memory management for AI agents. L1 (daily active context, 100 lines), L2 (weekly decisions/insights, 400 lines), L3 (long-term archive, unlimited). Includes self-improvement loop, session continuity, semantic search, and mistake-tracking. Use when starting a session (load memory), ending a session…