egm-bootstrap
What it does
This skill creates and checks README files for the folders in a code project, so each part has a clear description of its job. It is for teams using the Elephant and Goldfish design method.
When to use it
- ✓When a project's folders need README files written or updated.
- ✓When you want each folder's README to match the Elephant and Goldfish format.
- ✓When you want a parent README that summarizes the parts below it.
Skill link
https://github.com/google/elephant-goldfish-model/blob/main/distributions/claude/skills/egm-bootstrap/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Add README files to every folder in this project, following the Elephant and Goldfish format.”
5 new skills a week. 1 minute to read.
How it works
The AI starts separate reviewer helpers for each folder, writes or corrects its README and rolls the results into a parent index. The helpers work in fresh contexts so they can catch assumptions the author missed.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
EGM Peanuts and Hay Bootstrap (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.
Overview
This skill automates the creation, correction, formatting, and correctness
verification of Elephant-and-Goldfish Model (EGM) compliant README.md files
across a directory tree. It establishes clear architectural contracts
(interfaces, invariants, and side effects) for both human developers and AI
assistants.
- Peanuts: Leaf-level Component Package READMEs containing specific file contracts.
- Hay: Parent-level Repository Blueprints that roll up child interface contracts into high-altitude indexes.
Delegation
A Goldfish runs in a fresh context with no conversation history. Spawn each
subagent with your harness's subagent tool (Antigravity: invoke_subagent; Claude Code: Agent; Codex: spawn_agent). Each subagent is defined in agents/<file>.md, and its
frontmatter name (for example egm-zoom-out) is the subagent type to request
where your harness registers named subagents. Otherwise spawn a general-purpose
subagent and tell it to read that persona file first. Pass the prompt verbatim
and wait for the report. If your harness cannot nest subagents,
use direct dispatch instead of the synthesizer. See docs/harnesses.md.
If your harness has no subagent tool, run the scout steps inline.
Inputs
path: The target root directory path to bootstrap (Required).is_worker: Internal parameter.trueif executing as a worker Sub-Orchestrator (Optional, default:false).sub_tree_root: Internal parameter. The root path of the assigned subtree partition (Optional).target_filename: Target contract filename to generate or update (Optional, default:"README.md"). Supports alternate blueprint filenames such as"EGM.md"when pre-existing human-maintained READMEs must not be modified.
Execution Constraints (CRITICAL)
- No Code Generation: You are strictly limited to documentation. Do not write or refactor any functional source code.
- VCS Isolation: Do not perform any version control commits (
git commit,git add). All filesystem changes must be written locally using standard file-writing tools. Tracking and submitting is deferred to the human user. - Temporary File Isolation: Parallel workers sharing the workspace must perform all status tracking, check-pointing, and log writing in independent, worker-specific directories outside the project repository workspace.
- Tool Usage (CRITICAL): Use your shell, file-reading, file-writing, and file-editing tools for directory discovery and contract/README
generation. Adhere to clean Markdown formatting directly during generation
(standard headers, tables, and fenced code blocks). If a project markdown
formatter (e.g.
npx prettier --write) is explicitly configured in the repository, it may optionally be invoked. - Subagent Delegation: Spawn sub-orchestrator workers in parallel.
- Mandatory Safety Gate (CRITICAL): If you discover more than 15 subdirectories, you MUST immediately request user approval (using a structured question tool, if your harness has one, or plain chat) before proceeding with full-tree execution or unbounded subagent spawning.
Workflow
Step 0: Ecosystem & Verification Discovery
- Inspect the repository root for package/build manifests:
- Node.js / TypeScript:
package.json->npm test(orpnpm test/yarn test) - Rust:
Cargo.toml->cargo test - Go:
go.mod->go test ./... - Python:
pyproject.toml/pytest.ini/setup.py->pytest - C/C++ / Make:
Makefile->make test - Bazel:
BUILD/BUILD.bazel->bazel test //... - None found:
<test-command>
- Node.js / TypeScript:
- Record as
VerificationCommandto populate generated README contracts.
Step 1: Startup Branching Control
- Check the
is_workerinput parameter. - If
is_workeristrue, jump directly to Step 4: Sub-Orchestrator Worker Flow to process the assignedsub_tree_root. - If
is_workerisfalseor unset, proceed as the Root Orchestrator to Step 2: Incremental Scoping & Safety Gate.
Step 2: Incremental Scoping & Safety Gate (Root Orchestrator)
- **Incremental BFS Discov
FAQ
What is the Elephant and Goldfish model?
It is a design method that pairs a persistent main context with fresh-context reviewers to catch hidden assumptions.
Which tools does it work with?
It is written for agent tools that can start subagents, such as Claude Code, Codex or Antigravity.
What is a Peanut or Hay file?
A Peanut is a README for one leaf package, and a Hay is a parent README that indexes the parts below it.
Details
Original description by the author
Bootstrap directory README.md files across a repository subtree.
Popularity
- GitHub stars
- 10k
- Ranking position
- #11877
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
egm-brainstorm
10kHelps your agent turn a rough idea into a clear, reviewed concept summary through questions and critical review.
egm-draft
10kHelps your agent write a design document one section at a time, starting from an agreed concept summary or your notes.
egm-drift-report
10kChecks design documents against the code to find where the code no longer matches what the documents describe.
egm-resolve
10kHelps your agent work through review findings on a design document, applying clear fixes and asking you about the rest.
Similar skills
technical-documentation
394kHelps your agent write and review clear technical docs and agent instruction files, so people and AI tools can follow them easily.
architecture-decision-records
280kHas your agent record important project structure decisions. It helps to understand the reasoning behind choices and maintain a clear history of changes.
code-tour
280kLets your agent create step-by-step code walkthroughs with exact file and line references. Useful for intros, explanations, and reviews.