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 agentmods add skills/cluesmith/codev/arch-savenpx skills add cluesmith/codev --skill arch-savegit clone --depth 1 https://github.com/cluesmith/codevWhat 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 | $0.00086 | $0.02365 |
| Opus 5 | $0.00043 | $0.01182 |
| Sonnet 5 | $0.00017 | $0.00473 |
| Haiku 4.5 | $0.00009 | $0.00236 |
Grade A, and why
arch-save 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 — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/arch-save — save state, clear, and come back as yourself
Long sessions accumulate stale context. This is the deliberate cure: you choose the moment, you choose what survives, and a fresh session resumes from what you wrote.
$ARGUMENTS is the architect name (e.g. main). Omit it to auto-detect.
When NOT to run this
On the owner's direction, or when the owner runs it themselves. Do not invoke this
autonomously mid-task on your own judgement — the irreversible step is a human decision,
relocated from "press /clear" to "invoke /arch-save", not removed. If the owner tells
you to run it, run it; if you think it is time, suggest it and wait.
Only at a resumable boundary — a gate approval, a PR merge, a completed investigation, the end of a long tool-heavy stretch. Never mid-task. Nothing here can check that; the state file must describe a point a fresh session can resume from, not a half-finished action. A mid-task snapshot resumes into confusion.
The procedure
Do these in order. The order is the feature — step 3 must precede step 4, because the context that knows what to write is the one about to be destroyed.
1. Resolve your name
If $ARGUMENTS is non-empty, that is your name. Otherwise run afx whoami and use the
reported name when type: architect.
type: builder→ STOP. This terminal is a builder. Report the mismatch.- Non-zero exit → STOP and ask which architect you are. Do not guess, and do not
default to
main— writing another architect's state file is the exact failure/arch-initexists to prevent (#1094).
Validate the name before building any path: [a-z][a-z0-9-]*, at most 64 characters.
Reject slashes, .., uppercase, spaces. Never interpolate an unvalidated name into
codev/state/<name>.md.
2. Stop your own monitors
Enumerate every monitor, watcher or background task you armed, and stop it.
This is the half that only you can do. Monitors are session-bound, not
context-bound: they survive /clear and keep firing into a context that cannot evaluate
their alerts. pgrep cannot see them — they are harness background tasks, not shell
processes — so the instance after the clear has no handle on them. You do. Use it.
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 First seen · 190 lines · 86 tokens per session scan A 3203b8c59b38
arch-save is a skill published in the GitHub repository cluesmith/codev (286 stars, last pushed 5d ago), licensed Apache-2.0. It adds 86 tokens to every session and 2,365 once invoked, about $0.0004 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-30.
Other skills, from other repositories
weather-fetcher
Instructions for fetching current weather temperature data for Dubai, UAE from Open-Meteo API.
time-skill
Display the current time in Pakistan Standard Time (PKT, UTC+5). Use when the user asks for the current time, Pakistan time, or PKT.
time-fetcher
Instructions for fetching current Dubai time via bash command.
weather-svg-creator
Creates an SVG weather card showing the current temperature for Dubai. Writes the SVG to orchestration-workflow/weather.svg and updates orchestration-workflow/output.md.
hns-lsel-curator
Local Self-Evolution Loop (LSEL) curator — the CLUSTER + drain engine for the GOOS-local PROPOSE→APPLY seam closure (SPEC-LSEL-LOCAL-EVOLUTION-001). Companion-offset drain of .moai/lessons-inbox.jsonl with a drain-side severity filter that drops the 65% Bash-timeout/sandbox noise, eventkey clustering with a frequency…
moai-foundation-core
Provides MoAI-ADK foundational principles including TRUST 5 quality framework, SPEC-First DDD methodology, delegation patterns, progressive disclosure, agent catalog reference, and token budget management (absorbed from moai-foundation-context). Use when referencing TRUST 5 gates, SPEC workflow, or context window…