egg-template
Create or update egg templates. Use when user wants to: (1) create a new template from scratch, (2) add/modify/remove macros, (3) update template files or lifecycle hooks, (4) convert files to Stencil
SKILL.mdskills/egg-template/SKILL.md
GitHubegg Template
Operation Detection
| User Intent | Operation |
|---|---|
| "create template", "new template" | Create |
| "add macro", "modify", "rename", "remove" | Update |
| Template name/path + changes | Update |
| "install this template repo", "add/pin/sync templates from a repo", "keep templates up to date across machines" | Not this skill — use egg-cli-guide's egg template install (one-shot fetch) or eggs.yml manifest + egg template sync/update (declarative, reproducible) |
Create Workflow
Ask setup questions (AskUserQuestion - all at once):
- Template name
- Location: Project (
./.eggs/) | Global (~/.eggs/) | Repository - Mode: config.yml only | Full scaffolding
Define macros → See references/config-spec.md
Configure lifecycle hooks (optional) → See references/lifecycle.md. When writing
run:commands, read its "Shell Quoting inrun:" section first — wrapping___MACRO___or${{ ... }}in your own quotes silently corrupts the value.Configure hatch: output, excludes
Generate config.yml
Scaffolding (if full mode) → See references/template-files.md
Validate:
egg template validate <path>
Update Workflow
Locate template:
- By name:
egg template detail <name> - By path: Verify
config.ymlexists
- By name:
Analyze: Read config.yml, list files
Check dependencies → See references/update.md
Apply changes
Validate:
egg template validate <path>
Key Commands
egg template detail <name> # Show info
egg template open <name> # Open in Finder
egg template validate <path> # Validate
egg hatch preview <name> --macro-name value ... # Test as a transaction (no writes yet)
egg hatch apply <applyToken> # Commit the test run
References
- references/config-spec.md - config.yml syntax, macro types
- references/lifecycle.md - pre_hatch/post_hatch hooks, step outputs
- references/template-files.md - Native vs Stencil syntax
- references/create.md - initial questions, location, scaffolding, repository structure
- references/update.md - dependency checks before modifying an existing template
- references/update.md - dependency checking, rename/remove operations