migrate

A migration command that detects and converts an older version-one .guild directory into the version-two layout. Migration means changing stored project files to a newer structure.

In plain words
What is it for?
Use it to inspect a repository, preview the conversion, convert one repository, or process all child repositories in a workspace.
Why use it?
It provides a dry-run plan and a verified snapshot before changing the directory, reducing the risk of losing the old layout.

Command

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 commands/lookatitude/guild/migrate
Clone the repo
git clone --depth 1 https://github.com/lookatitude/guild
Per session 67 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,497 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.00067 $0.01497
Opus 5 $0.00034 $0.00749
Sonnet 5 $0.00013 $0.00299
Haiku 4.5 $0.00007 $0.00150

Measured 2d ago against content hash c45c2fdc337f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

migrate 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 2d 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.

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.

commands/migrate.md · 118 lines

How it starts

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

/guild:migrate — v1→v2 .guild converter

Detects, snapshots, and converts a v1 .guild/ directory to the v2 layout.

Usage

/guild:migrate                          dry-run scan of cwd (default, safe)
/guild:migrate --mode=migrate           in-place v1→v2 conversion (snapshot first)
/guild:migrate --root=/path/to/repo     target an explicit repo root
/guild:migrate --mode=dry-run           explicit dry-run (same as default)
/guild:migrate --mode=skip              detect + log intent; no snapshot, no convert
/guild:migrate --workspace              fan-out over all child repos in a workspace
/guild:migrate --accept-grades          accept reviewed wiki importance grades (the human gate)

Args

  • --root=<path> — path to the repo root containing .guild/. Defaults to cwd.
  • --mode=migrate|dry-run|skip — conversion mode (default dry-run).
    • dry-run — detect + print the conversion plan + write the report only; NO mutation. Safe default.
    • migrate — snapshot .guild/ → convert to v2 layout → write report. The snapshot is sha256-verified before conversion proceeds; a verify-abort exits non-zero and leaves .guild/ untouched.
    • skip — detect + report intent; no snapshot, no conversion.
  • --workspace — treat --root as a workspace root; fan-out per child .guild/ (SC-5, depth fixed at 1).
  • --accept-grades — the human-gate accept verb for the wiki importance backfill (below). Strips the importance_draft/graded_by review markers from every drafted wiki page, keeping the (possibly operator-edited) importance: grade. No detect/convert runs; idempotent.

Gates

  • dry-run and skip modes: R (read-only; never mutate).
  • migrate mode: I — always confirm before writing. The snapshot verify-abort is a hard non-zero exit; no partial-write is possible.

Output

Stdout summary per child (workspace mode) or single root:

classification=v1 action=migrated
  snapshot: .guild-snapshots/v1-2026-05-30T12:34:56Z (42 file(s), verified)
  converted: 12 artifact(s) rewritten to v2 schema

Read the full file on GitHub · 118 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. 2d ago First seen · 118 lines · 67 tokens per session scan A c45c2fdc337f

Subscribe to this mod's changes

migrate is a command published in the GitHub repository lookatitude/guild (7 stars, last pushed 2d ago), licensed MIT. It adds 67 tokens to every session and 1,497 once invoked, about $0.0003 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.