/egm:egm-bootstrapfrom Elephant-Goldfish Model
Creates, updates, and verifies EGM README.md contracts (Interface, Invariants, Side Effects) across a directory tree, handling leaf packages and parent blueprint indexes.
Ships in Elephant-Goldfish Model. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
egm-bootstrap)When running in Codex or ChatGPT Work, first read Codex integration.
In Claude Code or Cowork, read ${CLAUDE_PLUGIN_ROOT}/docs/claude.md first.
Automates creating, updating, and verifying Elephant-and-Goldfish Model (EGM) README.md contracts (Interface, Invariants, Side Effects) across a directory tree: Peanuts (leaf package contracts) and Hay (parent blueprint indexes).
path: Target root directory to bootstrap (Required).is_worker: Internal; true when running as a Sub-Orchestrator (default: false).sub_tree_root: Internal; subtree partition root path.target_filename: Contract filename to generate or update (default: "README.md", or e.g. "EGM.md" when preserving human-written READMEs).${CLAUDE_PLUGIN_ROOT}/resources/execution_instructions.md; pathless <SKILL>: ~/.gemini/config/plugins/egm/resources/execution_instructions.md). Do not apply the egm-brainstorm/egm-draft/egm-review or drafting-only sections here. If file tools cannot read it, apply inline delegation: spawn fresh-context subagents (invoke_subagent / Agent / spawn_agent), use direct dispatch if nesting is unsupported (see harnesses.md), or run scout steps inline if no subagent tool exists.README.md / target_filename). Do not write or refactor functional source code, and do not perform version control commits (git add, git commit). Write all changes locally using standard file-writing tools; tracking and submitting stay with the human user.mktemp -d), never a fixed, shared path. If neither exists, skip them.npx prettier --write).Inspect the repo root manifest to record VerificationCommand:
package.json): npm test (or pnpm test / yarn test)Cargo.toml): cargo test | Go (go.mod): go test ./... | Python (pyproject.toml/pytest.ini/setup.py): pytest*.sln/*.slnx/*.csproj): dotnet testMakefile): make test | Bazel (BUILD/BUILD.bazel): bazel test //... | None: <test-command>If is_worker is true, jump to Step 4 for sub_tree_root. Otherwise run Step 2.
path level-by-level via a queue (never recursive find or ls -R). Keep intermediate folders and build manifests (package.json, Cargo.toml, go.mod, pyproject.toml, *.sln, *.csproj, Makefile, BUILD). Ignore symlinks, hidden/system directories (e.g., .git, .antigravity, node_modules, venv, dist, build, third_party), and patterns in .gitignore / .egmignore.is_multi_select: false):
question: "The target directory tree contains more than 15 subdirectories. This is a large execution scope: up to 5 parallel workers, and at least one scout per code directory (one per ~1,500 lines of source). Do you want to proceed with full-tree bootstrapping?"options: ["Yes, proceed with full tree bootstrapping", "No, abort execution"]
Wait for the user; abort immediately if declined..c, .cc, .cpp, .cxx, .h, .hh, .hpp, .rs, .go, .zig, .lean, .f, .f90, .f95, .f03, .f08, .hs), Managed (.java, .kt, .scala, .cs, .razor, .cshtml, .fs, .vb), Scripting (.py, .rb, .php, .lua, .sh, .bash, .ps1, .psm1, .psd1, .r, .R, .ex, .exs), Web/Mobile (.ts, .tsx, .js, .jsx, .mjs, .cjs, .swift, .m, .dart), Schemas/IDLs (.sql, .proto, .graphql, .gql, .thrift, .prisma), Infra (.tf, .hcl, .cue). Exclude manifests, lockfiles, fixtures, docs, and .csv/.tsv/.parquet.tests, testing, testdata, or dirs holding only *_test.*, *Test.*, test_*.*, *.spec.*.<= 5 pruned dirs): Run Step 4 inline on path, then Step 5.> 5 pruned dirs): Verify > 15 approval first if applicable. Partition via Adaptive Depth Partitioning:
depth = 1. Collect nodes at depth. If 3-5 nodes, use them as partition roots.< 3, increment depth (max 3) and re-check. If > 5, take the 3-4 largest branches separately and combine smaller ones into one fallback subtree.depth == 3 and still < 3, pick immediate children of root (or run sequentially).egm-bootstrap-orchestrator (agents/bootstrap_orchestrator.md, passing its absolute path if resolved from <plugin-root>, or a general-purpose subagent):
Prompt: "Run egm-bootstrap with path=[path], is_worker=true, sub_tree_root=[partition_root], target_filename=[target_filename]."subtree_index payloads, then proceed to Step 5.goldfish-explorer): Register (where runtime subagent definition is supported) or prompt a read-only scout (enable_write_tools: false, enable_subagent_tools: false) with:
You are a read-only codebase explorer. Analyze source files in the target directory and return a JSON object matching
{"interface": string[], "invariants": string[], "side_effects": string[]}. Do not write files. Never infer RPC methods, routes, status enums, or invariants from file or directory names alone; cite exact[file:symbol_or_flag]for every entry, and output["None"]if no explicit invariants or side effects exist in code.
D:
target_filename already exists in D, read it (never blindly overwrite), scan code via goldfish-explorer, extract legacy public symbols, invariants, and side effects as JSON ({"interface": string[], "invariants": string[], "side_effects": string[]}), merge with code-verified scout output, and edit target_filename preserving valid developer notes.goldfish-explorer per chunk in parallel, at most 5 at a time (queue the rest), give each chunk the file's imports and top-level definitions to judge visibility, and merge their JSON. Verify build-manifest deps and import / #include before attributing RPCs, schemas, or message types locally. Read order: (1) contracts, schemas, build manifests (.h, .hh, .hpp, .proto, .graphql, .gql, .thrift, .prisma, .sql DDL, interfaces; extract exact DDL tables and exported targets); (2) entry points (main.*, index.*, lib.*, mod.*, __init__.py, dir-named files) then source/query files alphabetically; (3) templates/configs <= 200 lines each (800 in config-only dirs), excluding .css/.scss; (4) ignore test files (*_test.*, *Test.*, test_*.*, *.spec.*) everywhere. On scout timeout/failure, log a warning and use ["(Details pending/documentation failed)"].interface summaries into parent P's scout prompt.VerificationCommand or the manifest in D or nearest ancestor (.NET: dotnet test on the nearest *.csproj). For Bazel, always emit bazel test or bazel build with valid targets (//[package_path]/... or //[package_path]:all; NEVER //[package_path]..., //[package_path]:..., or bare ...); use bazel run for runners.D has direct code (plus child contract links if any) and Intermediate Blueprint when D has only child contracts. Use relative links (./child/${target_filename}, ../sibling/${target_filename}) only for dirs existing in pruned subtree_index with real files (link ./child/SKILL.md for skill dirs or omit uncreated links), and repo/URL links for external cross-package refs. Format cleanly.subtree_index (path, summary, interface, invariants, side_effects). If is_worker is true, read Worker Return Interface Schema, return the matching JSON payload, and stop. Otherwise proceed to Step 5.subtree_index JSON results. On worker timeout/failure, insert [Subtree Root] (Documentation failed / Subagent execution timeout) in the root index and continue.path and partition roots bottom-up using the Intermediate Blueprint template and valid relative links.path): Always classify path as Repository Root (Blueprint / Hay) using the Repository Root Blueprint Template, rolling up all top-level subdirectory boundaries. Preserve existing top title/metadata/overview via Correction Policy if target_filename exists. If path has direct source files, scout them via goldfish-explorer into ## Local Interface & Invariants. Ensure root diagrams reflect only verified sync/async boundaries, operations, and stores from subtree_index, then write target_filename.subtree_index (including all child packages) and verify:
Interface, Invariants, and Side Effects sections cite verified [file:symbol_or_flag] entries (or None) without unverified claims./... or :all, never :...)../subdir/${target_filename}, ./subdir/SKILL.md) points to an existing file on disk (remove or fix broken links).is_multi_select: false):
question: "Do you want to run the EGM Drift Report on the generated contract updates to check for consistency with the codebase?"options: ["(Recommended) Yes, run drift report on modified contracts", "No, skip drift review"]
If selected, run egm-drift-report over modified contracts to check both missing code coverage and doc-to-code hallucinations (verifying every documented method, route, enum, database table, and invariant against local source files and recording discrepancies in the drift report for human triage).What SKILL.md sets; muted values are Claude Code's defaults
8 skills in this plugin
/egm-brainstormInteractive ideation and brainstorming skill for the Elephant & Goldfish Model (EGM). Helps turn half-baked concepts into structured hypotheses via clarifying questions, review, and iterative refinement. Produces an RFC summary for human review or more detailed design with egm-draft./egm-draftDrafts a design document section-by-section using the concepts brief from egm-brainstorm (or user notes). This is the second step in the Elephant-Goldfish (EGM) feature flow. Use when you are ready to write a design doc after aligning on requirements + solution./egm-drift-reportRuns drift detection on all design documents to check for document and code consistency. Produces an actionable report with differences. Use when the user asks to detect drift or check for consistency across all design documents or READMEs in a directory./egm-liteExecutes a lightweight 5-step EGM (Elephant-Goldfish-Model) protocol for small, rapid iterations, specification revisions, code refactors, and bug fixes. Use when the user invokes /egm-lite, issues a phase command (checklist, exec, review, goldfish), or resolves a subagent review response. Don't use for large multi-component features requiring a formal design doc (use egm-brainstorm)./egm-resolveThe Elephant resolution skill. Ingests flat deficiency reports from concurrent Goldfish reviewers, applies automated fixes for PROPOSE FIX items via UI multiple-choice gates, and presents interactive negotiation/re-sync checkpoints./egm-reviewOrchestrates the EGM Goldfish Review Protocol. Used as part of the EGM process to perform design document reviews. Executes five review phases: Initial Zoom Out Review, Comprehension Review, Design Critique, Intermediate Zoom Out Review, and Implementation Readiness.npx claudepluginhub google/elephant-goldfish-model --plugin egm3 plugins ship this exact skill · first indexed Nov 26, 2026
Other plugins' skills for the same job