AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
 
← Back to list

EGM Bootstrap (Contract README Generator)

Walks a repository subtree and auto-generates or repairs EGM-compliant README.md contracts documenting each directory's interface, invariants, and side effects.

Dev & CodingAdvanced★ 5,282⑂ 316AI score 7/10Last updated: Oct 29, 2026

What it does

  • Maps the target tree level-by-level (BFS) — never a recursive find/ls -R — skipping .git, node_modules, dist, test-only folders, and anything matched by .gitignore/.egmignore.
  • Classifies each surviving directory as a Peanut (component package with direct source files) or Hay (parent blueprint that rolls up child contracts) and applies the matching README template.
  • Spawns read-only goldfish-explorer scouts that extract Interface / Invariants / Side Effects and must cite [file:symbol] for every entry, suppressing speculative documentation.
  • Never blindly overwrites an existing README: it extracts legacy symbols, merges them with scout findings, and edits the file into EGM compliance while preserving developer prose. Use target_filename=EGM.md to leave human-maintained READMEs untouched.
  • Detects build manifests (package.json, Cargo.toml, go.mod, pyproject.toml, Makefile, BUILD) to fill in the correct verification command, including valid Bazel target syntax.
  • Ends with a mandatory verification pass that re-reads every created/modified file to check links, Markdown syntax, and code grounding.

Constraints: no functional code generation, no git add/git commit, and mandatory user approval when more than 15 subdirectories are discovered.

Who it's for

  • Developers and tech leads cleaning up undocumented or stale monorepos.
  • Teams that want a machine-readable "architecture contract" layer so AI assistants can navigate the codebase.
  • Platform teams enforcing explicit interface/invariant boundaries between packages.

Example uses

  1. Run with path=services/payments — every package gets a README with its public interface and side effects, and the root gets a blueprint index of child contracts.
  2. In a repo with hand-written READMEs, run with target_filename=EGM.md so contract files live alongside the originals instead of replacing them.
  3. On a 60-directory monorepo, the safety gate pauses to ask for approval, then fans out parallel sub-orchestrators per partition and compiles their JSON subtree indexes at the root.

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/google/elephant-goldfish-model/HEAD/distributions/claude/skills/egm-bootstrap/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on AI Skill Mart.
Copy the distributions/claude/skills/egm-bootstrap folder from the GitHub repo google/elephant-goldfish-model into my ~/.claude/skills/egm-bootstrap/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/google/elephant-goldfish-model.git && mkdir -p ~/.claude/skills && cp -r elephant-goldfish-model/distributions/claude/skills/egm-bootstrap ~/.claude/skills/

⚠ This is a third-party skill. Check the source repository before installing.

  1. Open a terminal.
  2. Clone the repository: git clone https://github.com/google/elephant-goldfish-model.git
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy the skill: cp -r elephant-goldfish-model/distributions/claude/skills/egm-bootstrap ~/.claude/skills/
  5. Confirm the bundled agents/, references/, and docs/ files came along — the templates and worker schema are required.
  6. Restart Claude Code and check that egm-bootstrap appears in your skill list.
  7. Invoke it explicitly with a target path, e.g. "Use the egm-bootstrap skill on src/" (model auto-invocation is disabled by design).
  8. Try a small subdirectory first, review the output with git diff, and commit yourself — the skill never commits for you.
View source on GitHub ↗License: Apache-2.0