Content lifecycle

Prompt Templates

YAML files in your site's `prompts/` directory that give agents the right instructions for each content task.

What they are

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
Built-in templates

Five templates, one lifecycle

migrate

sonnet

Convert existing markdown or docs to kazam YAML. Handles front matter, heading hierarchy, and component mapping. Use when onboarding existing content.

add-page

sonnet

Scaffold 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

sonnet

Review a page against its sources_of_truth, flag stale sections, and propose concrete edits. Use on your regular review cadence.

audit

haiku

Fast, cheap voice and structure consistency check across the whole site. Compares pages against kazam.yaml voice rules. Use periodically or before releases.

review

opus

Full content review for accuracy, completeness, and tone. Thorough — costs more, misses less. Use before shipping or after major changes.

The loop

Create → validate → publish → refresh → audit

The templates map onto a repeating cycle. Pick an entry point based on where you are.

StageCommandTemplate
Bring in existing contentkazam prompt show migratemigrate
Write something newkazam prompt show add-pageadd-page
Check before buildingkazam validate .
Publishkazam build .
Track freshnessfreshness block in page YAML
Review stale pageskazam prompt show refreshrefresh
Site-wide consistencykazam prompt show auditaudit
Pre-ship reviewkazam prompt show reviewreview
Decision matrix

Which template for which situation

ScenarioTemplateModel
Importing a Notion export or markdown wikimigratesonnet
Starting a new page from scratchadd-pagesonnet
A freshness banner fired on a pagerefreshsonnet
Auditing tone before a product launchaudithaiku
Full site review after a rebrandaudithaiku
Checking accuracy before a releasereviewopus
Stakeholder review of a new sectionreviewopus
Usage modes

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
MCP integration

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:

ToolWhat it does
list_pagesEnumerate all pages in the site
read_pageGet a page's full YAML source
searchFull-text search across page content
write_pageUpdate a page's YAML in place
get_configRead kazam.yaml site configuration
How templates use MCP

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.

Integrations

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

engineering

Sprint status, project roadmaps, release notes, team workload. Uses list_issues, list_projects, get_status_updates.

Slack

all teams

Decision logs, channel digests, FAQ compilation, runbook extraction. Uses read_channel, search_public, read_thread.

HubSpot

sales

Pipeline reviews, customer health, account overviews, win/loss reports. Uses search_crm_objects, get_crm_objects.

Attention

sales

Customer voice, competitive intel, deal call history, coaching insights. Uses search_calls, ask_attention.

Granola

all teams

Meeting recaps, decision logs, action item tracking, stakeholder briefings. Uses query_granola_meetings, get_meetings.

Gmail

ops

Communication summaries, email-to-doc conversion, thread digests. Uses search_threads, get_thread.

Google Calendar

all teams

Meeting prep pages, team schedule overviews, recurring meeting trackers. Uses list_events, get_event.

Not sure which templates to start with? Find your role.

RoleStart withAlso useful
EngineeringLinear, GitHub Actions (build-and-check)Slack, Granola
SalesHubSpot, AttentionGranola, Gmail, Calendar
ProductLinear, Granola, SlackAttention (customer voice)
Ops / SupportSlack (runbooks), GmailCalendar, Granola
LeadershipGranola (decisions), Slack (announcements)HubSpot (pipeline), Attention (call insights)
Automation

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/
Required secrets

Add ANTHROPIC_API_KEY to your repo secrets. Product-specific keys go in MCP config or as additional secrets.

Customization

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:

NameUse case
changelogDraft release notes from merged PRs and closed issues
api-docDocument an endpoint from OpenAPI spec or source code
onboardingGenerate onboarding pages from a role description and team wiki
incidentCapture incident timelines and action items in standard format
sync-roles

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 in kazam.yaml with 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.