Frontmatter Specification
YAML frontmatter format for Calvin PromptPack source files
Frontmatter Specification
Source Format: 1.0 | Updated: 2025-12-27
Calvin parses YAML frontmatter between --- delimiters. Frontmatter is required for:
.promptpack/actions/**/*.md.promptpack/policies/**/*.md.promptpack/agents/**/*.md.promptpack/skills/<id>/SKILL.md(skills entrypoint)
Skill supplemental files (anything else under .promptpack/skills/<id>/) do not need frontmatter and are copied as-is to outputs.
Minimal Example
---
description: Generate unit tests for a file
scope: project
targets: [claude-code, cursor]
---
# Generate Tests
Your prompt content here...Required Fields
description
Type: string
Required: Yes
A short description of the asset. Used by adapters for metadata (titles, summaries, listings).
description: Code style guidelines for TypeScriptOptional Fields
kind
Type: "action" | "policy" | "agent" | "skill"
Default: inferred from directory (or action)
Usually inferred from directory:
| Location | Inferred kind |
|---|---|
.promptpack/actions/ | action |
.promptpack/policies/ | policy |
.promptpack/agents/ | agent |
.promptpack/skills/<id>/SKILL.md | skill |
kind Support Matrix
| Platform | Action | Policy | Agent | Skill |
|---|---|---|---|---|
| Claude Code | ✅ | ✅ | ✅ (Sub-agents) | ✅ |
| Cursor | ✅ | ✅ | ❌ (Skipped) | ✅ |
| VS Code | ✅ | ✅ | ❌ (Skipped) | ❌ |
| Antigravity | ✅ | ✅ | ❌ (Skipped) | ❌ |
| Codex | ✅ | ✅ | ❌ (Skipped) | ✅ |
Notes:
- In
.promptpack/skills/<id>/SKILL.md,kind: skillis optional. If present, it must beskill.
kind: policyscope
Type: "project" | "user"
Default: "project"
Controls where outputs are deployed:
project: write to project directories (e.g.,./.claude/,./.codex/)user: write to home directories (e.g.,~/.claude/,~/.codex/)
scope: usertargets
Type: string[]
Default: all targets
List of platforms to compile for:
claude-code(alias:claude)cursorvscode(alias:vs-code)antigravitycodexall(meta-target that expands to all concrete targets)
targets:
- claude-code
- cursorapply
Type: string
Default: none
Glob pattern used by adapters that support conditional rules (primarily policies).
apply: "**/*.rs"Notes:
- Skills do not support
apply(Calvin errors if present inSKILL.mdfrontmatter). - Some targets ignore
apply.
allowed-tools (skill-only)
Type: string[] (YAML sequence)
Default: none
Optional list of allowed tools for skills. Calvin validates this list and surfaces warnings for risky tools (e.g. rm, sudo, curl).
allowed-tools:
- git
- catAgent-Specific Fields
The following fields are only used for agents (kind: agent). They configure Claude Code subagent behavior.
name
Type: string
Default: asset ID (filename stem)
Custom name for the agent. If not specified, uses the filename (e.g., reviewer.md → reviewer).
name: code-reviewertools
Type: string (comma-separated) or string[] (YAML list)
Default: inherit all tools
Whitelist of tools this agent can use. If not specified, the agent inherits all tools from the main thread.
tools: Read, Grep, Glob, BashCalvin also accepts the YAML list format:
tools:
- Read
- Grep
- GlobFor backward compatibility, the YAML list format is also accepted as agent-tools:
agent-tools:
- Read
- Grep
- Globmodel
Type: "sonnet" | "opus" | "haiku" | "inherit"
Default: none (uses default model)
Model override for this agent.
model: sonnetpermissionMode
Type: "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "plan" | "ignore"
Default: none
Controls how the agent handles permission prompts.
| Mode | Behavior |
|---|---|
default | Standard permission prompts |
acceptEdits | Auto-accept file edits |
dontAsk | Skip all permission prompts |
bypassPermissions | Full bypass (dangerous) |
plan | Planning mode only |
ignore | Ignore permission system |
permissionMode: acceptEditsCalvin also accepts kebab-case as permission-mode:
permission-mode: acceptEditsskills
Type: string (comma-separated)
Default: none
Skills to preload when this agent starts. Custom subagents do NOT inherit skills from the main thread by default.
skills: repo-navigation, engineering-standardsCalvin also accepts the YAML list format as agent-skills:
agent-skills:
- repo-navigation
- engineering-standardsSkill Example
---
description: Draft a conventional commit message from staged changes.
kind: skill
scope: user
targets:
- claude-code
- codex
allowed-tools:
- git
- cat
---
# Instructions
1. Run `git diff --cached --stat`
2. Suggest a conventional commit message
3. Consult `reference.md` if neededPlaceholder Variables
In the body content, you can include placeholders that are passed through to adapters:
| Placeholder | Description |
|---|---|
$ARGUMENTS | All arguments as a single string (Action/Agent) |
$1 - $9 | Positional arguments |
These are passed through unchanged; the target platform interprets them at runtime.
Platform-Specific Mapping (High Level)
Claude Code
- Source frontmatter is not used directly in outputs for actions/policies/agents (Calvin generates native files).
- Agents compile to
.claude/agents/<id>.mdwith YAML frontmatter. - Skills compile to
.claude/skills/<id>/SKILL.md(plus supplementals).
Cursor
- Policies compile to
.cursor/rules/<id>/RULE.md;applyis mapped toglobs, andalwaysApplyis derived. - Skills compile to
.claude/skills/<id>/SKILL.md(Cursor reads Claude's skills path). - Agents are not supported and are skipped.
VS Code (Copilot)
- Policies compile to
.github/copilot-instructions.mdand/or.github/instructions/<id>.md;applymaps toapplyTo. - Skills and Agents are not supported and are skipped.
Antigravity
- Policies and actions compile to
.agent/rules/and.agent/workflows/. - User scope:
~/.gemini/antigravity/global_rules/and~/.gemini/antigravity/workflows/. - Skills and Agents are not supported and are skipped.
Codex
- Prompts compile to
.codex/prompts/(project scope) or~/.codex/prompts/(user scope). - Skills compile to
.codex/skills/<id>/SKILL.md(project scope) or~/.codex/skills/<id>/SKILL.md(user scope). - Agents are not supported and are skipped.
Validation
Calvin errors on invalid frontmatter, including:
- missing frontmatter delimiters (
---) - invalid YAML / invalid types (e.g.,
allowed-toolsmust be a list) - missing required
description - invalid
kind,scope, ortargetsvalues - skills using unsupported fields (e.g.,
applyinSKILL.md)
When YAML contains : characters inside a string value, quote the string:
description: "My: Rule"