egm-bootstrap
Skill này làm gì
Skill này tạo và kiểm tra file README cho các thư mục trong một dự án code, để mỗi phần có mô tả rõ ràng về nhiệm vụ của nó. Nó dành cho các nhóm dùng phương pháp thiết kế Elephant và Goldfish.
Khi nào nên dùng
- ✓Khi các thư mục của dự án cần có file README được viết hoặc cập nhật.
- ✓Khi bạn muốn README của mỗi thư mục khớp với định dạng Elephant và Goldfish.
- ✓Khi bạn muốn một README cha tóm tắt các phần nằm bên dưới nó.
Liên kết skill
https://github.com/google/elephant-goldfish-model/blob/main/distributions/claude/skills/egm-bootstrap/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Thêm file README cho mọi thư mục trong dự án này, theo định dạng Elephant và Goldfish.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
AI khởi động các trợ lý rà soát riêng cho từng thư mục, viết hoặc sửa README của thư mục đó và tổng hợp kết quả vào một chỉ mục cha. Các trợ lý làm việc trong ngữ cảnh mới nên có thể phát hiện những giả định mà tác giả bỏ sót.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Phương pháp Elephant và Goldfish là gì?
Đây là phương pháp thiết kế kết hợp một ngữ cảnh chính bền vững với các người rà soát dùng ngữ cảnh mới để bắt những giả định ẩn.
Nó hoạt động với những công cụ nào?
Skill được viết cho các công cụ agent có thể khởi động subagent, như Claude Code, Codex hoặc Antigravity.
File Peanut hoặc Hay là gì?
Peanut là README cho một gói lá, còn Hay là README cha lập chỉ mục cho các phần nằm bên dưới.
Chi tiết
Mô tả gốc của tác giả
Bootstrap directory README.md files across a repository subtree.
Độ phổ biến
- Sao GitHub
- 10k
- Vị trí xếp hạng
- #11877
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
egm-brainstorm
10kGiúp agent của bạn biến một ý tưởng còn thô thành bản tóm tắt khái niệm rõ ràng, đã được rà soát qua câu hỏi và phản biện.
egm-draft
10kGiúp agent của bạn viết tài liệu thiết kế từng phần một, bắt đầu từ bản tóm tắt khái niệm đã thống nhất hoặc từ ghi chú của bạn.
egm-drift-report
10kĐối chiếu tài liệu thiết kế với code để tìm chỗ code không còn khớp với những gì tài liệu mô tả.
egm-resolve
10kGiúp agent của bạn xử lý các phát hiện rà soát trên tài liệu thiết kế, áp dụng những sửa đổi rõ ràng và hỏi bạn về phần còn lại.
Skill tương tự
technical-documentation
394kGiúp agent của bạn viết và rà soát tài liệu kỹ thuật cùng file hướng dẫn cho agent, rõ ràng để mọi người và công cụ AI đều dễ làm theo.
architecture-decision-records
280kGiúp agent của bạn ghi lại các quyết định quan trọng về cấu trúc dự án, giúp hiểu lý do đằng sau các lựa chọn và giữ lịch sử thay đổi rõ ràng.
code-tour
280kGiúp agent của bạn tạo các hướng dẫn đọc code từng bước, có tham chiếu chính xác đến file và dòng, hữu ích cho phần giới thiệu, giải thích và rà soát.