Prompt Templates
YAML files in your site's `prompts/` directory that give agents the right instructions for each content task.
Standardized agent instructions
Each template is a YAML file with a name, description, model recommendation, system prompt, and tool list. They live in prompts/ inside your site directory and are versioned with your content.
Templates are not executed by kazam — they're read by your agent. The CLI just makes them easy to inspect and pipe.
# See all templates in the current site
kazam prompt list
# Print a template's system prompt
kazam prompt show refresh
# JSON output for programmatic use
kazam prompt show refresh --json
Five templates, one lifecycle
migrate
sonnetConvert existing markdown or docs to kazam YAML. Handles front matter, heading hierarchy, and component mapping. Use when onboarding existing content.
add-page
sonnetScaffold a new page from a topic description. Produces a complete YAML file with shell, freshness block, and components stubbed out. Use when adding new content.
refresh
sonnetReview a page against its sources_of_truth, flag stale sections, and propose concrete edits. Use on your regular review cadence.
audit
haikuFast, cheap voice and structure consistency check across the whole site. Compares pages against kazam.yaml voice rules. Use periodically or before releases.
review
opusFull content review for accuracy, completeness, and tone. Thorough — costs more, misses less. Use before shipping or after major changes.
Create → validate → publish → refresh → audit
The templates map onto a repeating cycle. Pick an entry point based on where you are.
| Stage | Command | Template |
|---|---|---|
| Bring in existing content | kazam prompt show migrate | migrate |
| Write something new | kazam prompt show add-page | add-page |
| Check before building | kazam validate . | — |
| Publish | kazam build . | — |
| Track freshness | freshness block in page YAML | — |
| Review stale pages | kazam prompt show refresh | refresh |
| Site-wide consistency | kazam prompt show audit | audit |
| Pre-ship review | kazam prompt show review | review |
Which template for which situation
| Scenario | Template | Model |
|---|---|---|
| Importing a Notion export or markdown wiki | migrate | sonnet |
| Starting a new page from scratch | add-page | sonnet |
| A freshness banner fired on a page | refresh | sonnet |
| Auditing tone before a product launch | audit | haiku |
| Full site review after a rebrand | audit | haiku |
| Checking accuracy before a release | review | opus |
| Stakeholder review of a new section | review | opus |
Manual, semi-automated, or fully automated
Copy the system prompt into your agent's context window.
kazam prompt show refresh
# copy output → paste into agent's context
Pipe directly to your agent. The template becomes the system prompt.
# Pipe to Claude Code
kazam prompt show refresh | claude -p
# Pipe to any CLI-accessible model
kazam prompt show audit | llm -s -
Schedule a daily or weekly action to run the refresh template on stale pages.
name: refresh-stale-pages
on:
schedule:
- cron: "0 9 * * 1" # every Monday at 9 AM
jobs:
refresh:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install kazam
run: cargo install --git https://github.com/tdiderich/kazam
- name: Build and collect stale pages
run: kazam build .
- name: Run refresh template on stale pages
run: |
kazam prompt show refresh | claude -p \
"Read _site/stale.md. For each stale page, open its YAML source
and sources_of_truth. Propose and apply updates."
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
- name: Open PR with changes
uses: peter-evans/create-pull-request@v6
with:
title: "content: refresh stale pages"
branch: refresh/stale-pages
End-to-end with the kazam MCP server
Start the MCP server pointing at your site directory. When an agent has MCP access, templates can work end-to-end — reading pages, fetching sources, writing updates — without manual copy-paste.
# Start the MCP server (stdio transport)
kazam mcp ./docs
Tools the MCP server exposes:
| Tool | What it does |
|---|---|
| list_pages | Enumerate all pages in the site |
| read_page | Get a page's full YAML source |
| search | Full-text search across page content |
| write_page | Update a page's YAML in place |
| get_config | Read kazam.yaml site configuration |
The refresh template calls read_page to get the current content, get_config to check voice rules, and write_page to commit the update. The audit template calls list_pages + read_page for every page, then get_config for the voice baseline. No shell glue required.
Product-specific templates
Each product template knows the exact tool shapes, authentication patterns, and data-to-component mappings for its product. Pick the ones your team uses.
These templates use MCP tools directly. Configure the MCP server for each product, and the agent can read/write data without API keys or shell scripts.
Linear
engineeringSprint status, project roadmaps, release notes, team workload. Uses list_issues, list_projects, get_status_updates.
Slack
all teamsDecision logs, channel digests, FAQ compilation, runbook extraction. Uses read_channel, search_public, read_thread.
HubSpot
salesPipeline reviews, customer health, account overviews, win/loss reports. Uses search_crm_objects, get_crm_objects.
Attention
salesCustomer voice, competitive intel, deal call history, coaching insights. Uses search_calls, ask_attention.
Granola
all teamsMeeting recaps, decision logs, action item tracking, stakeholder briefings. Uses query_granola_meetings, get_meetings.
Gmail
opsCommunication summaries, email-to-doc conversion, thread digests. Uses search_threads, get_thread.
Google Calendar
all teamsMeeting prep pages, team schedule overviews, recurring meeting trackers. Uses list_events, get_event.
Not sure which templates to start with? Find your role.
| Role | Start with | Also useful |
|---|---|---|
| Engineering | Linear, GitHub Actions (build-and-check) | Slack, Granola |
| Sales | HubSpot, Attention | Granola, Gmail, Calendar |
| Product | Linear, Granola, Slack | Attention (customer voice) |
| Ops / Support | Slack (runbooks), Gmail | Calendar, Granola |
| Leadership | Granola (decisions), Slack (announcements) | HubSpot (pipeline), Attention (call insights) |
GitHub Actions
Most kazam sites live in a GitHub repo. These workflow templates automate the content lifecycle — copy them to .github/workflows/ and configure your secrets.
build-and-check
Build site, detect stale pages and broken links. Runs on push, PR, and weekday schedule.
scheduled-refresh
Refresh stale pages weekly using the refresh prompt template. Opens a PR with changes.
audit-on-release
Voice and structure audit on YAML changes. Catches consistency issues before deploy.
product-sync
Sync content from a product (e.g., Linear sprint status) on a schedule. Adapt for any integration.
# Copy a workflow to your repo
cp prompts/actions/scheduled-refresh.yaml .github/workflows/
Add ANTHROPIC_API_KEY to your repo secrets. Product-specific keys go in MCP config or as additional secrets.
Creating custom templates
Scaffold a new template with kazam prompt init. The generated file includes all required fields and placeholder content.
# Scaffold a new template
kazam prompt init changelog
# Scaffolds prompts/changelog.yaml — edit system_prompt and tools
Common custom templates:
| Name | Use case |
|---|---|
| changelog | Draft release notes from merged PRs and closed issues |
| api-doc | Document an endpoint from OpenAPI spec or source code |
| onboarding | Generate onboarding pages from a role description and team wiki |
| incident | Capture incident timelines and action items in standard format |
Sync roles from your team directory
The sync-roles prompt reads your team directory via Gmail + Slack MCPs (or a Google Directory MCP) and updates the roles: block in kazam.yaml to match your actual org. It also generates an org chart page using the Tree component.
Requires: Gmail MCP and Slack MCP (or Google Directory MCP). The template will not run with partial data sources — both must be configured and accessible.
kazam prompt show sync-roles | claude -p
The command produces two outputs:
- Updated roles config — overwrites the
roles:block inkazam.yamlwith ids, labels, descriptions, and hrefs derived from your directory. - Org chart page — generates or refreshes a YAML page using the Tree component so the structure is immediately browsable on your site.