Template Seeding Script
Copies a skill's plugin template into the project for customization.
What Is It?
A helper script called by the pre-execution protocol Step C. When a skill resolves its template from the plugin source fallback, the protocol asks if you want a local copy. This script handles the file copy.
File Location
scripts/seed-template.sh
How It Works
- The pre-execution protocol resolves a skill's template using the 3-tier fallback
- If the template came from the plugin source (tier 3), the protocol asks: "Copy to project? [y/n]"
- If you accept, the protocol runs
seed-template.sh {skill-name} - The script copies
skills/{skill}/template.mdto$JAAN_TEMPLATES_DIR/jaan-to-{skill}.template.md - Future runs find the project copy at tier 1 and skip the offer
Usage
scripts/seed-template.sh <skill-name>
You don't call this directly. The pre-execution protocol invokes it when you accept the seeding offer.
Output
The script returns JSON to stdout:
| Status | Meaning |
|---|---|
{"status": "seeded", "path": "..."} | Template copied to project |
{"status": "skipped", "path": "..."} | Project template already exists |
{"status": "error", "message": "..."} | Plugin template not found |
Examples
First run of a skill (no project template):
$ scripts/seed-template.sh pm-prd-write
{"status": "seeded", "path": "jaan-to/templates/jaan-to-pm-prd-write.template.md"}
Second run (project template exists):
$ scripts/seed-template.sh pm-prd-write
{"status": "skipped", "path": "jaan-to/templates/jaan-to-pm-prd-write.template.md"}
Tips
- Delete a seeded template to re-trigger the offer on next skill run
- Edit the seeded file to customize how a skill structures its output
- The script respects
paths_templatesfromsettings.yamlfor custom template directories
Related
- Seed Files -- What gets seeded during bootstrap
- Pre-Execution Protocol -- Step C that triggers this script
- Customization Guide -- Template override options