template-render
Render a Template + data + Style into a final artifact in one of HTML, PDF, PNG, SVG or PPTX. Use whenever the user asks for a concrete deliverable like "make me a poster", "render a card", "give me a one-pager".
- License 许可
- MIT
- 所属仓库
- clawic/Clawix
- 最近更新
- 2026-06-06
- Stars
- ★ 8
- Forks
- 0
01 前言 Front Matter
- name
- template-render
- keywords
- [ "render", "template", "output", "pdf", "png", "svg", "pptx", "deliverable" ]
- description
- Render a Template + data + Style into a final artifact in one of HTML, PDF, PNG, SVG or PPTX. Use whenever the user asks for a concrete deliverable like "make me a poster", "render a card", "give me a one-pager".
03 SKILL.md 正文
template-render
The standard recipe for producing a deliverable from a Template and a Style.
Procedure
- Pick a Template:
- If the user names a category ("a poster", "a card"), list candidates:
claw template list --category <cat>. - If they describe a use-case, match by tags or name.
- If the user names a category ("a poster", "a card"), list candidates:
- Pick a Style:
- If they reference a brand or saved style, use that.
- Otherwise default to the workspace's primary Style (often the first non-builtin or
claw).
- Compose data:
- Read the template's slots from
claw template get <id>. - For each slot, write a JSON field with
idas the key. - Respect
maxLength,maxItems,required.
- Read the template's slots from
- Render:
claw template render <templateId> --style <styleId> --data data.json --format pdf,png --out ./deliverable - Report back: the paths produced and a sentence describing what is in each.
Formats
| Format | Renderer | Notes |
|---|---|---|
| html | direct | Canonical, fastest, no deps. |
| svg | wraps html in <foreignObject> |
Use for scalable vector. |
| Playwright (Chromium) | Falls back to a minimal Node PDF if Playwright is unavailable. | |
| png | Playwright (Chromium) | 2x deviceScaleFactor. |
| pptx | OpenXML (Node only) | Minimal one-slide PPTX. Best for presentation category. |
Constraints
- Never hard-code style values into the data. The Style is the source of truth for color and typography.
- If the template declares
outputsand the requested format is not in the list, fail with a clear error. - Generated outputs go under
.claw/templates/<templateId>/outputs/unless--outis specified.
04 同仓库更多 Skills
visual-regression
Run and interpret Clawix UI geometry, screenshot, protected-surface, and debt-baseline checks without authorizing visual repair.
ui-performance-budget
Capture and compare Clawix UI performance budgets for critical flows before optimizing visible or runtime UI behavior.
ui-implementation
Implement functional Clawix UI wiring while respecting visual mutation boundaries, pattern contracts, protected surfaces, and debt baselines.
ui-canon-review
Review whether a Clawix UI pattern, visual decision, copy change, or component extraction belongs in canon, debt, exception, or protected-surface scope.
theme-factory
Produce variants of an existing Style by shifting tone (light/dark), density (compact/relaxed), or accent (palette rotation) while preserving the brand identity. Use when the user wants alternate themes derived from one brand.
surface-route-work
Work from a registered surface or transverse route by inspecting nodes, neighbors, edges, contracts, owners, tests, and gaps before editing.