| name | template-creator |
| description | Create or update a reusable local Office artifact template from a Word document, PowerPoint presentation, or Excel workbook. Use when the user asks to make a reusable template from a `.docx`, `.pptx`, or `.xlsx` reference, or explicitly asks to update an existing artifact-template skill. Do not use for one-off artifact creation from an existing template. |
Template Creator
Create or update a reference-backed local template. The source Office file stays in the template so later work can clone or import it faithfully.
Routing
- Manage only direct-child template skills below
${OFFICE_ARTIFACT_HOME:-~/.office-artifact-tool}/skills.
- Create a new template by default. Use a numbered name instead of overwriting an existing template.
- Update only when the user explicitly identifies exactly one existing
artifact-template-* skill.
- Keep template creation local. Do not fetch remote templates or modify installed caches.
Create workflow
- Require exactly one
.docx, .pptx, or .xlsx reference unless the user explicitly requests a batch. For a batch, complete this workflow separately for every file.
- Infer a concise display name, intended-use description, and artifact kind from the reference and request.
- Create
preview.png before packaging:
- DOCX: render the reference and use a representative page PNG.
- PPTX: render the reference and use a representative slide PNG.
- XLSX: render the used range of the first visible non-empty sheet.
- Inspect the PNG. Stop if it is blank, clipped, corrupted, or not representative of the reference.
- Set
SKILL_DIR to this skill directory and pass shell-escaped values directly to the creator:
node "$SKILL_DIR/scripts/create-template-skill.mjs" \
--reference-path "/absolute/path/reference.docx" \
--preview-path "/absolute/path/preview.png" \
--display-name "Standup" \
--description "Run a structured daily standup with updates, blockers, and owners."
- Read the JSON result. Verify that the generated directory contains
SKILL.md, artifact-template.json, agents/agent.yaml, the retained assets/reference.<ext>, and assets/preview.png.
Update workflow
- Resolve the exact passed template and read its
SKILL.md, artifact-template.json, agents/agent.yaml, retained reference, and preview. Stop if it is not a direct child of the local skills directory or if more than one target was passed.
- Preserve the template folder name and every file or behavior the user did not ask to change.
- For reference or visual changes, edit a temporary copy of the retained reference using the matching Office artifact workflow, render a new preview, and inspect it. For display-name or intended-use changes, retain the existing reference and preview unless they also change.
- Pass every current or changed value to the creator explicitly:
node "$SKILL_DIR/scripts/create-template-skill.mjs" \
--mode "update" \
--skill-name "artifact-template-standup" \
--reference-path "/absolute/path/updated-reference.docx" \
--preview-path "/absolute/path/updated-preview.png" \
--display-name "Standup" \
--description "Run a structured daily standup with updates, blockers, and owners."
- The script validates the existing template kind, preserves additional template-owned files, and replaces the template atomically without changing its skill name.
- Verify every requested change and confirm that no staging or backup directories remain.
Response
Report the created or updated template's display name, artifact kind, and local path. State that the reference and preview remain with the template, and briefly describe how to invoke the returned template skill in the active agent environment. Do not emit product-specific cards, links, or sharing directives.
Constraints
- Do not create an intermediary request file; pass creator inputs through command-line flags.
- Do not delete or sanitize the retained reference; fidelity depends on retaining it verbatim.
- Do not change the artifact kind during an update.
- Do not modify global skill metadata or protocol files.