Agent skill

Arch Init

by cluesmith in cluesmith/codev

Adopt an architect identity and recover its state from codev/state/<name.md.

Apache-2.0Auto-check passedAgent Workflows

Install Arch Init

skills CLI
$ npx skills add cluesmith/codev --skill arch-init -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cluesmith/codev arch-init --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cluesmith/codev.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/arch-init .claude/skills/arch-init && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
arch-init
GitHub stars
288
Token cost
~2.7k tokens
SKILL.md length
1,541 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

Adopt an architect identity and recover its state from codev/state/<name.md.

  • Works in 5 steps: Resolve your name. → Read your state file: codev/state/.md… → Confirm identity + orient. In one tight… → …
  • An architect terminal needs to (re)establish which architect it is — after a restart
  • SKILL.md covers What to do, Saving your state (and knowing… and Guardrails (architect-wide;…
  • Calls git

What it does

Arch Init is an agent skill from cluesmith/codev. Adopt an architect identity and recover its state from codev/state/<name.md. Use when an architect terminal needs to (re)establish which architect it is — after a restart, context loss, or session handoff — or when the user says "/arch-init", "you are the X architect", or "recover your architect state". Identity resolves via afx whoami (an explicit name argument overrides); if neither resolves, ask the human — never guess.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Session handoff. The repository describes itself as: Codev helps humans and agents co-develop both the context and the code of the project. The licence is Apache-2.0.

When your agent uses it

  • An architect terminal needs to (re)establish which architect it is — after a restart
  • Session handoff —
  • The user says /arch-init
  • You are the X architect

Example prompts

  • “/arch-init”
  • “you are the X architect”
  • “recover your architect state”
  • “/arch-init”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Resolve your name.
  2. Read your state file: codev/state/.md (relative to the
  3. Confirm identity + orient. In one tight block, report: who you now are
  4. Start on the next task, if the banner carries one. It is the **first
  5. Then follow the state file. Carry out whatever it says to do on

What it can do on your machine

Read from SKILL.md and the folder at commit 9cd8607. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Arch Init loads about 2.7k tokens when it runs. Until then it costs about 110 tokens; SKILL.md has 1,541 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~110
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from cluesmith/codev at commit 9cd8607, republished under its Apache-2.0 licence (© cluesmith). 1,541 words, ~2,688 tokens.

Download SKILL.mdSave it as .claude/skills/arch-init/SKILL.md (or your agent's skills folder).
name
arch-init
description
Adopt an architect identity and recover its state from codev/state/<name>.md. Use when an architect terminal needs to (re)establish which architect it is — after a restart, context loss, or session handoff — or when the user says "/arch-init", "you are the X architect", or "recover your architect state". Identity resolves via `afx whoami` (an explicit name argument overrides); if neither resolves, ask the human — never guess.
argument-hint
[name] (e.g. main; omit to auto-detect via afx whoami)

/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.
  3. Confirm identity + orient. In one tight block, report: who you now are (name + one-line role from the banner, if present), the file you read, and the current-state / open-loops summary from the most recent dated section (or the file's leading content if it has no dated sections). If the banner carries a NEXT TASK line, report both halves of it, as Next task from the owner at save time: <verbatim> → resolved: <gloss> (omit → resolved: … when the line carries no [resolved at save: …] gloss).

  4. Start on the next task, if the banner carries one. It is the first action of the resumed session, ahead of the general resume agenda — the owner wrote it at save time precisely so it would not have to be typed again once you came back. Begin it without waiting for a further prompt.

    • It carries the owner's authority the way any owner message does, with the standard limits unchanged. A next task never by itself approves a porch gate, merges a PR, cuts a release, restarts Tower, or performs any other act that needs a per-occasion word. If the next task is such an act, prepare it and ask for the word live: a saved instruction is an instruction, not a pre-spent approval.
    • The gloss carries the word — for the items it names, and only them. Items named in a [resolved at save: …] gloss are approved for the act the owner's words name: "merge them all [resolved at save: PRs #1710, #1712]" means merge #1710 and #1712 without asking again. The owner gave the word at save time, and the saving session pinned it to those items. This narrows the rule above; it does not remove it — and a line with no gloss pre-approves nothing:
      • The act must be the one the owner's words say. A gloss never widens the verb — "merge" does not also approve a release.
      • Anything not in the gloss still needs the word live. A PR that appeared after the save, an item the gloss did not name, a gate the words did not mention → prepare and ask, exactly as above.
      • Porch gates are still relayed to the builder, never run by you: the gloss lets you relay the approval without re-asking; it does not change who runs porch approve.
      • Ordinary verification still applies: an approved merge still waits for green CI, and a gloss item you find already merged, closed, or changed is reported, not forced.
      • A line marked [carried over — …] is orientation only. Its gloss was written by an earlier cycle and carries no word: ask for it before any gated act.
    • This does not narrow the gate rule. The human decision was explicit at save time, and the gloss is its record. What the rule forbids — inferring approval from a gate notification, from silence, or from an agent's own judgment — stays forbidden; a gloss is none of those.
    • Once you have started, delete the NEXT TASK line from the banner and record the pickup as a log entry (picked up next task: <verbatim> → resolved: <gloss>, omitting → resolved: … when there was no gloss). A second re-init, or the next /arch-save, must not re-run it.
  5. Then follow the state file. Carry out whatever it says to do on resume. Do not invent a new agenda — resume the one the state file describes.

Show full SKILL.md (680 more words)Show less

Saving your state (and knowing when to /clear)

Recovery is only half the loop. /arch-init reads state; you write it. The state file is not crash insurance — it is your deliberate memory-management mechanism. Auto-compaction happens at an arbitrary moment with content you did not choose; a state save happens at a boundary you pick, with a summary you curate. That is strictly better, so use it:

/arch-init (recover) → work → save at a checkpoint → refresh → /arch-init (recover) → …
                                                       │
              packaged:  /arch-save  ─────────────────┤  stops monitors, saves, clears,
                                                       │  schedules /arch-init
              manual:    suggest /clear → human clears ┘  then human runs /arch-init

When to save. Save at a resumable boundary — a point a fresh session could pick up cleanly from. Good moments, judged by you: a gate approval, a PR merge, a completed investigation, the end of a long tool-heavy stretch. Never save mid-task. The state file must describe a point you can resume from, not a half-finished action; a mid-task snapshot resumes into confusion.

How to save (write format = read format). Recovery reads the role banner plus the most recent dated section, so a save must leave exactly that behind:

  1. Rewrite the current-state / open-loops section in place — overwrite it with where things actually stand now (current focus + open loops + how to resume). Do not accumulate stale "current state" blocks, and never leave two sections with the same heading (a duplicated "How to resume" or "Open loops" means you appended where you should have overwritten). Delete resolved loops entirely — a closed item's record is the log entry, not a lingering line in current state.
  2. Append one short dated log entry capturing what changed this stretch.
  3. Compact — this is part of the save, not optional polish. Every save both adds AND removes: after writing, keep the recent dated log entries in full and collapse older ones into a single one-line summary that names where the detail lives (the closed PRs, issues, and reviews it covered). Remember these state files are gitignored — there is no git history to fall back on, so pruned prose is gone for good. Prune by replacing detail with pointers to durable artifacts, never by deleting the only record of something. The file is a summary a fresh session reads at a glance — one screen is the right order of magnitude, judged by you. If a save has grown it past easy readability, prune as part of that save rather than leaving it for next time.

Content guardrails. No secrets (tokens, keys, credentials). No transcript dumps or raw tool output. Include only: current focus, open loops, and the instructions a fresh session needs to resume.

Then — and only then — suggest the refresh. Save first, then tell the human it is a good time to clear. You must never decide unilaterally to lose your context; keeping the irreversible step behind a human decision means accepting the suggestion can never lose anything, because the save already happened. Make the suggestion advisory, never nagging, and only right after a save — e.g.:

State saved to codev/state/<name>.md — good time to refresh if this session is feeling heavy.

Do not repeat it, and do not prompt for it at any other time.

/arch-save packages this whole loop, and is the preferred path when the owner directs a refresh: it stops your monitors, writes the pruned state file, clears, and schedules /arch-init to bring you back — in that order, which is the part that matters. It also accepts a next task as free text (/arch-save file and spawn that issue), which it writes into the banner as a NEXT TASK line for step 4 above to pick up. The save discipline above is what it performs at its step 3, so this section remains the source of truth for how to write the file; /arch-save is the source of truth for the sequence. The manual path (save → human clears → /arch-init) stays valid and is the fallback when Tower is unavailable.

Guardrails (architect-wide; the state file may add more)

  • Never auto-approve porch gates. A gate notification is for the human, not you.
  • Touch only your own builders / spawns / filings. Sibling architects own theirs.
  • Never cd into a builder worktree; use git -C + absolute paths.
  • Stay on the default branch at the workspace root; verify with git branch if unsure.

© cluesmith, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .codex/skills/arch-init of cluesmith/codev.

Open the folder on GitHubat commit 9cd8607

Compare with similar skills

Arch Init next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Arch Init compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Arch Init this skillcluesmith/codev288—~2.7kAutomated safety check: PassApache-2.0
Orca CLIstablyai/orca87k2 repos~593Automated safety check: PassMIT
Beads Task Memorygastownhall/beads28k—~1.2kAutomated safety check: PassMIT
Session History Searchslopus/happy24k—~3.1kAutomated safety check: PassMIT
Paseo Agent Handoffgetpaseo/paseo20k1 repos~606Automated safety check: PassCustom licence
Memori Long-Term MemoryMemoriLabs/Memori17k—~2kAutomated safety check: NotesCustom licence

Similar skills

  • Orca CLI

    stablyai/orca

    Operate Orca-managed worktrees, folder contexts, terminals, repos, automations, artifacts, skill sharing, worktree comments, and Orca's embedded browser…

    87k GitHub starsUsed in 2 repos~593 tokens
    Agent WorkflowsAuto-check passed
  • Beads Task Memory

    gastownhall/beads

    Tracks multi-session work with dependencies in the bd issue tracker so the agent can find ready tasks and recover its context after conversation compaction.

    28k GitHub stars~1.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Searches past Claude Code, Codex and Cursor sessions and summarizes what was worked on, tried or decided, using extraction scripts instead of reading raw logs.

    24k GitHub stars~3.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Paseo Agent Handoff

    getpaseo/paseo

    Hands off the current task, including context, decisions and failed attempts, to a fresh agent through Paseo by writing a self-contained briefing prompt and launching that agent.

    20k GitHub starsUsed in 1 repo~606 tokens
    Agent WorkflowsAuto-check passed
  • Memori Long-Term Memory

    MemoriLabs/Memori

    Connects Claude Code to Memori Cloud for long-term memory, recalling stored context before substantive replies and saving new context afterward.

    17k GitHub stars~2k tokensUpdated 5 days ago
    Agent WorkflowsAuto-check: notes
  • Beads

    liwp/again

    A skill your agent uses when working in a repository that uses bd or Beads for durable project task tracking, issue dependencies, blocker management, multi-session handoff, or shared work memory.

    118 GitHub starsUsed in 6 repos~537 tokens
    Agent WorkflowsAuto-check passed

More from cluesmith/codev

All 12 skills in this repo
  • Afx

    cluesmith/codev

    Agent Farm CLI — the tool for spawning builders, managing Tower, workspaces, and cron tasks.

    288 GitHub stars~2.4k tokensUpdated 2 days ago
    Auto-check passed
  • Arch Save

    cluesmith/codev

    Save an architect's state, clear its context, and re-init automatically — the packaged save→clear→re-init refresh cycle.

    288 GitHub stars~3.8k tokensUpdated 2 days ago
    Auto-check passed
  • Builder Refresh

    cluesmith/codev

    Refresh a builder's own context at a protocol boundary — save working state, verify it, clear, and re-orient.

    288 GitHub stars~1.7k tokensUpdated 2 days ago
    Auto-check passed
  • Codev

    cluesmith/codev

    Codev project management CLI — init, adopt, update, and doctor commands.

    288 GitHub stars~962 tokensUpdated 2 days ago
    Auto-check passed
  • Consult

    cluesmith/codev

    AI consultation CLI — query Gemini, Codex, or Claude for reviews and analysis.

    288 GitHub stars~1.1k tokensUpdated 2 days ago
    Auto-check: notes
  • Generate Image

    cluesmith/codev

    AI image generation via Gemini with optional async providers.

    288 GitHub stars~751 tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Arch Init

What does Arch Init do?

Adopt an architect identity and recover its state from codev/state/<name.md. Arch Init is an agent skill from cluesmith/codev.md.

When should I use Arch Init?

Arch Init fits situations like: an architect terminal needs to (re)establish which architect it is — after a restart; session handoff —; the user says /arch-init; you are the X architect.

How do I install Arch Init in Claude Code?

Run `npx skills add cluesmith/codev --skill arch-init -a claude-code`. Or copy the skill folder (.codex/skills/arch-init in cluesmith/codev) into .claude/skills/arch-init in your project. Claude Code loads it when a task matches its description.

How do I install Arch Init in Codex?

Run `npx skills add cluesmith/codev --skill arch-init -a codex`. Or copy the skill folder (.codex/skills/arch-init in cluesmith/codev) into .agents/skills/arch-init in your project. Codex loads it when a task matches its description.

Can I use Arch Init in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cluesmith/codev --skill arch-init -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/arch-init, .gemini/skills/arch-init, .github/skills/arch-init and .opencode/skills/arch-init in your project.

What does Arch Init need to run?

Going by SKILL.md and its folder, Arch Init needs the command-line tools its instructions call (git).

Does Arch Init access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Arch Init safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Arch Init use?

Arch Init is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Arch Init use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Arch Init?

Skills that share tags, products or a category with Arch Init: Orca CLI (stablyai/orca, 87k stars), Beads Task Memory (gastownhall/beads, 28k stars), Session History Search (slopus/happy, 24k stars) and Paseo Agent Handoff (getpaseo/paseo, 20k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Arch Init?

cluesmith (a GitHub organization) maintains it in cluesmith/codev, which has 288 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 6, 2026.

Source: cluesmith/codev on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.