| name | update-template |
| description | Update an existing template in the local template store — edit body, change subject, scope, audience, or tags. Bumps the `updated` timestamp in frontmatter. |
Update Template
Steps
- List existing templates (
ls $DATA_ROOT/templates/*.md) and ask which to update if not specified.
- Read current frontmatter + body. Show the user what's there.
- Ask which fields to change. Common edits:
- Body (open the file for the user to edit, or accept new content inline)
- Subject template
- Scope (
global ↔ newsletter slug — validate against config.json)
- Audience / segment
- Tags
- Write back atomically (write
<file>.tmp, then mv). Update the updated timestamp; preserve created.
- Diff-style summary of what changed.
Renames
If the user wants to rename a template, treat as: copy → update → delete old. Confirm before deleting.
Deletes
Out of scope for this skill. If asked, delete via shell after confirming with the user.