arch-init

A startup procedure that makes an architect agent recover its identity and saved state from the project’s codev/state files. An architect agent plans and coordinates work rather than directly implementing every change.

In plain words
What is it for?
Use it when an architect terminal starts, resumes, or changes session. It validates the architect name, checks the terminal role, and restores the corresponding project state.
Why use it?
It prevents an agent from acting as the wrong architect or guessing its identity after a restart or lost context.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/cluesmith/codev/arch-init
Any agent
npx skills add cluesmith/codev --skill arch-init
Clone the repo
git clone --depth 1 https://github.com/cluesmith/codev

Made for: Claude Code, Codex.

Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,809 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00099 $0.01809
Opus 5 $0.00049 $0.00905
Sonnet 5 $0.00020 $0.00362
Haiku 4.5 $0.00010 $0.00181

Measured yesterday against content hash 02c1bfd5aa93, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

arch-init 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.

.claude/skills/arch-init/SKILL.md · 136 lines

How it starts

The opening of the file, as written. The whole thing — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/arch-init — become architect <name> and recover state

You are an architect agent in a codev workspace. This command tells you which architect you are and where your durable state lives, so you can resume mid-stream.

$ARGUMENTS is the architect name (e.g. main, or a sibling architect's name in a multi-architect workspace).

What to do

  1. Resolve your name.

    • If $ARGUMENTS is non-empty, that is your name — the human named you explicitly, which removes all identity-resolution risk. Validate it first: an architect name must match [a-z][a-z0-9-]* and be at most 64 characters (lowercase letters, digits, hyphens; starts with a letter). Reject anything else — slashes, .., uppercase, spaces — and tell the human the rule. Never build a file path from an unvalidated name (path-traversal guard).
    • If $ARGUMENTS is empty, run afx whoami and read its output:
      • type: architect → adopt the reported name.
      • type: builder → STOP. This terminal is a builder, not an architect; report the mismatch to the human and do not adopt an architect identity.
      • Non-zero exit (identity unknown) → STOP and ask the human which architect you are. Do NOT guess, and do NOT default to main — adopting the wrong identity and writing to another architect's state file is the exact failure this command exists to prevent.
  2. Read your state file: codev/state/<name>.md (relative to the workspace root).

    • If it does not exist: list the architect state files in codev/state/excluding *_thread.md files, which are builder thread logs that share the directory — tell the human the file is missing, and ask whether to start a fresh state file for <name>. Do not fabricate state.
    • The state file is authoritative free text. It typically opens with a role banner and may carry resume instructions; follow whatever it says.
    • Architect state files are per-person and gitignored (codev/state/*.md); never commit them. Builder *_thread.md files are the opposite: versioned, shipping with each builder PR.

Read the full file on GitHub · 136 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. yesterday First seen · 136 lines · 99 tokens per session scan A 02c1bfd5aa93

Subscribe to this mod's changes

arch-init is a skill published in the GitHub repository cluesmith/codev (286 stars, last pushed 5d ago), licensed Apache-2.0. It adds 99 tokens to every session and 1,809 once invoked, about $0.0005 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.

Related

Other skills, from other repositories