| name | egg-template |
| description | 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 format. For fetching/pinning/syncing existing templates from a repo (egg template install, eggs.yml manifests, egg template sync/update), use egg-cli-guide instead.
|
egg 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 in run:" 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.yml exists
-
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>
egg template open <name>
egg template validate <path>
egg hatch preview <name> --macro-name value ...
egg hatch apply <applyToken>
References