Sitemd write
Generate high-quality content for any page type. Usage: /write [type] [topic]. Types: page, docs, blog, changelog, roadmap.
git clone https://github.com/sitemd-cc/sitemd
T=$(mktemp -d) && git clone --depth=1 https://github.com/sitemd-cc/sitemd "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/write" ~/.claude/skills/sitemd-cc-sitemd-write-c44970 && rm -rf "$T"
.claude/skills/write/SKILL.mdWrite Content
Generate high-quality site content. Routes to the appropriate procedure based on content type.
Input
The user provides content type and optional topic as arguments:
$ARGUMENTS
Parse the first word as the content type:
page, docs, blog, changelog, or roadmap. Everything after is the topic. Accept doc as an alias for docs and change as an alias for changelog.
Staged-output mode
If
--output <dir> is present in the arguments, this skill is being invoked by another workflow (typically the release skill) that wants page writes redirected into a staging directory instead of the live pages/ tree. When this flag is set:
- All file writes (new pages and edits to existing pages) land under
, mirroring the relative path the file would normally have under<dir>/
. For example, a doc page that would normally be created atpages/
is instead written topages/docs/new-feature.md
(the<dir>/new-feature.md
itself already represents the docs subtree if used for<dir>
type).docs - When editing an existing page, first copy the live page from
topages/<path>
if a staged copy doesn't already exist, then edit the staged copy in place.<dir>/<path> - Do not call
in staged mode — it writes to the live tree and updates groups/nav. Write the file directly with the same frontmatter and body it would have produced.sitemd_pages_create - Do not call
in staged mode — validation happens when the staged file is promoted to the live tree by the calling workflow.sitemd_content_validate - Skip groups.md updates in staged mode for the same reason.
- Report results using the staged paths so the caller can present them to the user.
If no arguments are provided and this is a mid-conversation invocation (i.e. work was done earlier in the conversation), assume the user wants
docs written to cover the feature or change just completed. Summarize what you understand the recent work to be and ask the user to confirm before proceeding. The same applies to changelog — if invoked as /write changelog mid-conversation with no further args, generate the entry based on the work just completed rather than requiring git context. If invoked at the start of a conversation with no prior context, ask the user what type of content to write and the topic.
Procedure
Step 1: Gather Context
Call
sitemd_site_context with the detected contentType and topic, and gather context in parallel:
— site identity, conventions, type-specific statesitemd_site_context- Glob
— for cross-referencing and internal linkingpages/**/*.md - Read
— for group configuration and sidebar orderingsettings/groups.md
Read the results carefully. Note the site name, existing pages in the target group, and any type-specific state (current changelog version, roadmap sections). The
syntax field in the response contains all available markdown components with examples.
Using Components
sitemd pages support rich components beyond plain markdown. When writing content, actively use these where appropriate:
- CTAs and navigation — use
syntax instead of bare links for calls to actionbutton: - Feature grids — use
blocks to present features, services, or options in a responsive gridcard: - Media — use
for multiple images,gallery:
for side-by-side,image-row:
for video/audioembed: - Interactivity — use
for supplementary content,modal:
for inline definitions[text]{tooltip} - Image styling — use modifiers (
,+width:N
,+circle
) instead of raw HTML+expand
Refer to the
syntax field from sitemd_site_context for exact patterns and copy-pasteable examples.
Step 2: Route to Content Type
Based on the content type, follow the corresponding procedure below.
Type: page
Write a general-purpose page (landing, feature, about, etc.).
Structure
- H1 — a clear, compelling headline (not the page title — the reader-facing hook)
- Opening paragraph — one sentence stating what this page is about
- 2-5 H2 sections developing the main points
- CTA or next step at the end (button or link to a related page)
Voice Rules
- Second person ("you", "your")
- Present tense
- No hedging words: never use "might", "could", "helps to", "it's worth noting"
- No stock phrases: never use "in today's world", "it's no secret", "at the end of the day"
- Lead with what the reader gets, not what the feature is
- Short paragraphs (3-4 sentences max)
Frontmatter
title: Page Title description: Under 160 characters, SEO-friendly slug: /page-slug # use "/" for the home page sidebarGroupShown: none
Quality Gates
- Description under 160 characters
- At least one internal link to another page
- No placeholder or lorem ipsum text
Create the Page
Call
sitemd_pages_create with the title, description, slug, and content.
Type: docs
Write documentation for a sitemd feature.
Context Gathering
Before writing, you MUST:
- Read all existing docs in
to match tone and avoid duplicationsitemd/pages/docs/ - Check
for the current docs items listsitemd/settings/groups.md
If no topic was provided, run
git log --oneline -20 to find recent features with code changes but no matching doc updates. Report the gaps and let the user choose which to document, or document the one with the most changes.
Structure
- H1 — feature name (matches the page title without suffix)
- One-line summary — a single sentence stating what the feature does
- User-facing interface first — show the settings file format, the markdown syntax, or the command to run
- How it works — explain the mechanics
- Reference tables — settings, options, parameters
- Related pages — links to docs that reference or relate to this feature
Voice Rules
- Imperative mood for instructions: "Add the field" not "You should add the field"
- No marketing language: never use "powerful", "seamless", "elegant", "robust"
- Show what to type, not abstract concepts
- Use code blocks with language hints for every example
- Use tables for reference material (setting names, options, defaults)
- Keep examples real — use actual values from the project, not lorem ipsum
- Prefer question-based H2 headings when the section answers a question: "How does X work?" rather than "X Mechanics" — AI systems match user queries to headings
- Start every section with a direct, standalone answer sentence that works as a citation on its own
Frontmatter
title: Feature Name description: Under 160 characters slug: /docs/feature-slug updated: YYYY-MM-DD sidebarGroupShown: docs groupMember: - docs
Include
updated: with today's date. Search engines and AI systems use this as a freshness signal.
Quality Gates
- Has
andsidebarGroupShown: docsgroupMember: [docs] - Every code example uses real values
- At least one code block with a language hint
- Links to at least one related doc page
- Description under 160 characters
Create the Page
- Call
with the content (includesitemd_pages_create
— this automatically adds the page to the docs group sidebar)groupMember: ["docs"] - Add nested anchors to
— everysitemd/settings/groups.md
becomes an 8-space-indented anchor under the page item:## headingitems: - Feature Name: /docs/feature-slug - Section One: #section-one - Section Two: #section-two - Review the docs group item ordering in
(which usessitemd/settings/groups.md
) and place the new page where it fits in a logical user journey: getting started → core concepts → content components → interactive features → integrations/services → tooling/deployment → advanced topics. Reorder existing items if needed to maintain this flow.itemOrder: manual
Cross-Reference
After creating the doc, check if any existing doc pages should mention or link to this feature. If so, edit the page file directly at
pages/{slug}.md to update them naturally (not as an appendix). Default to both — create a new page AND update existing pages unless the feature is too small for its own page. When updating existing pages, add a section or paragraph. Don't restructure what's already there.
Type: blog
Write a blog post.
Structure
- H1 — the title (engaging, not clickbait)
- Date line —
(use today's date)**Month DD, YYYY** - Opening paragraph — state the thesis. What is this post arguing or explaining? Be specific.
- 3-5 H2 sections developing the argument
- No explicit "Conclusion" section — the last paragraph should land the point naturally
Voice Rules
- Opinionated but grounded — take a stance, support it with evidence
- First-person plural ("we") sparingly, only when representing the team
- Short paragraphs (3-4 sentences max)
- No listicles unless the structure genuinely demands it
- The thesis must be non-obvious — "X is good" is not a thesis; "X solves Y in a way that Z doesn't" is
- Include specific numbers, measurements, or comparisons when available — AI systems prioritize content with verifiable data over vague claims
Frontmatter
title: Post Title description: Under 160 characters slug: /blog/post-slug sidebarGroupShown: blog groupMember: - blog
Quality Gates
- 400-1200 words
- Has a date line in
format with today's date**Month DD, YYYY** - The thesis is non-obvious and stated in the opening paragraph
- At least one internal link
- Description under 160 characters
Create the Page
- Call
with the content (includesitemd_pages_create
— this automatically adds the page to the blog group sidebar)groupMember: ["blog"]
Type: changelog
Generate a changelog entry from git history.
Context Gathering
- Read
to get the current version and formatsitemd/pages/changelog.md - Run
since the latest version tag to review recent commitsgit log --oneline - Review the categorized commits: Added, Changed, Fixed, Removed
Structure
Prepend a new version section to the existing changelog body. Format:
## vX.Y.Z — Month DD, YYYY ### Added - Item one - Item two ### Changed - Item one ### Fixed - Item one ---
Only include sections that have items. Use
--- as a separator between versions.
Version Bump Rules
- All items are fixes → patch bump (0.0.x)
- Any new features (Added items) → minor bump (0.x.0)
- Breaking changes → major bump (x.0.0)
Voice Rules
- Terse, factual — each item is a single line
- Start each item with a noun or action: "Blog section with index page" not "Added a blog section"
- No editorializing: never use "exciting", "awesome", "long-awaited"
- Each item must be verifiable against an actual code change
Quality Gates
- Version number increments correctly from the previous version
- Every item corresponds to an actual commit
- No duplicate entries (check against existing changelog)
- Date is today's date
Update the Page
Edit the changelog page file directly at
pages/changelog.md to prepend the new version section (including the trailing ---).
Type: roadmap
Update the product roadmap.
Context Gathering
- Read
for current itemssitemd/pages/roadmap.md - Read
to verify shipped itemssitemd/pages/changelog.md - If
flag is present and GitHub is configured (check--sync
), fetch issues from GitHubsitemd_status
Structure
Three sections, each with bullet items:
## Shipped - **Feature name** — One-sentence description --- ## In Progress - **Feature name** — One-sentence description --- ## Planned - **Feature name** — One-sentence description
GitHub Sync (when --sync flag is used)
If
content.githubRepo is configured:
- Fetch issues from GitHub using the configured token
- Map issue labels to roadmap sections using
fromroadmapLabels
:sitemd/settings/content.md- Labels matching
values → Shippedshipped - Labels matching
values → In ProgressinProgress - Labels matching
values → Plannedplanned - Issues with no matching labels → skip (not everything is roadmap-worthy)
- Labels matching
- Each issue becomes:
- **{title}** — {first sentence of body} - Cross-reference shipped items against the changelog — flag any without a changelog entry
Voice Rules
- Present tense for shipped items
- Progressive tense for in-progress items
- Future tense for planned items
- No dates on planned items (they become stale)
- Keep descriptions to one sentence
Quality Gates
- Shipped items correspond to actual features (verify against changelog)
- No duplicate items across sections
- Items flow between sections (planned → in progress → shipped), not added directly to shipped
Update the Page
Edit the roadmap page file directly at
pages/roadmap.md with the full updated body.
Step 3: Validate
After creating or updating the page, call
sitemd_content_validate with the page slug. Fix any failed checks before reporting success.
Step 4: Report
Report what was created or updated:
- File path and slug
- Content type and word count
- Group assignment (if any)
- Any validation warnings
- Remind the user that the dev server auto-rebuilds, or suggest
if not running/launch
Rules
- No permission required — Execute immediately without asking
- Match existing tone — Read existing pages of the same type before writing
- Real content only — No placeholder text, no lorem ipsum, no "coming soon"
- Today's date — Use the actual current date for blog posts and changelog entries
- Frontmatter field order — title, description, slug, sidebarGroupShown, groupMember