| name | generate-doc-template |
| description | Generates on-brand document and deck templates — letterhead, slide, and
one-pager — as SVG from the active brand profile, with editable title,
subtitle, and body zones. Vector output needs no account, key, or network.
Use when a user asks for a letterhead, a slide or deck master, or a branded
one-pager.
Trigger with "make a letterhead", "branded slide", or "/brand-make letterhead".
|
| allowed-tools | Read, Write, Glob, Bash(node:*) |
| argument-hint | [kind] [title] [optional subtitle] [optional body] |
| version | 0.5.1 |
| author | localplugins <localplugins@proton.me> |
| license | MIT |
| compatibility | Designed for Claude Code |
| tags | ["branding","documents","svg","templates","design"] |
Generate Doc Template
Generates a branded, print- or screen-ready document template as SVG from the active brand profile, with editable content zones.
Overview
The generate-doc-template skill turns a title (and optional subtitle and body) into a
branded document or deck master. Output is vector SVG, so it scales cleanly, prints
crisply, and needs no account, key, or network call. The generator (lib/doctpl.mjs)
draws a shared margin grid, brand mark, and accent rules, then fills the requested
kind; the skill resolves the active profile, picks the kind, runs the generator, and
saves the file. Convert to PDF or PNG downstream with /brand-export.
Prerequisites
- An active brand profile created with
/brand-new (a brand/ directory, or brands/[slug]/). Read loads its color-system.json and typography.json.
- Node.js on the PATH — the generator runs as
node lib/doctpl.mjs.
- Write access to an
output/ directory in the working repository.
- A title string; subtitle and body are optional parameters.
Instructions
-
Run /brand-status to confirm the active brand; if none exists, tell the user to run /brand-new and stop.
-
Use Glob to locate the active brand directory, then Read and validate the profile with validateProfile. Stop with the offending field if validation fails.
-
Choose the kind — letterhead (default), slide, or one-pager. Ask the user when it is unclear.
-
Generate the template by running the node generator:
import { loadProfile } from '../../lib/brand.mjs';
import { buildDoc } from '../../lib/doctpl.mjs';
const profile = loadProfile(activeDir);
const { svg, kind } = buildDoc(profile, {
kind: 'letterhead',
title: ,
: ,
});