Markform Agent Skill
Markform is structured Markdown for forms.
Files combine YAML frontmatter with HTML comment tags to define typed, validated fields.
Forms render cleanly on GitHub since structure is hidden in comments.
Getting Started
There are three ways to help a user get started with Markform:
- Run an example automatically:
markform examples copies bundled forms, then
markform run <form> fills one end-to-end with an LLM. Quickest demo.
- Agent-guided example tour: Walk the user through a specific bundled example step
by step—copy it, inspect the structure, fill fields, validate, and export.
Use
markform examples --list to pick an example, then --name <id> to copy it.
- End-to-end walkthrough playbook: Follow
examples/markform-demo-playbook.md to
design a research form from scratch, fill it with real data, validate, export, and
browse. The most thorough tour of all Markform features.
API Key Setup
Automated filling (markform fill --model, markform run) requires an LLM API key.
Set one of these environment variables (or add to .env):
OPENAI_API_KEY — for OpenAI models (e.g., openai/gpt-4o)
ANTHROPIC_API_KEY — for Anthropic models (e.g.,
anthropic/claude-sonnet-4-5-20250929)
Run markform models to see available providers and configured keys.
Bundled Examples
| Example |
Type |
Description |
movie-research-demo |
research |
Quick movie ratings lookup (IMDB, Rotten Tomatoes) |
simple |
fill |
Interactive demo of all field types |
twitter-thread |
fill |
Multi-stage content-to-Twitter-thread transformation |
movie-deep-research |
research |
Comprehensive movie analysis with multiple sources |
startup-deep-research |
research |
Startup intelligence: funding, team, market, press |
markform examples --list # See all examples
markform examples --list --format=json # Structured output for agents
markform examples --name <id> --forms-dir ./ # Copy a specific example
What Markform Does
- Structured Forms: Define typed fields (string, number, select, table, etc.)
in Markdown with validation constraints
- Role-Based Filling: Separate fields for humans (
role="user") and AI agents
(role="agent")
- Incremental Filling: Fill fields one at a time with immediate validation
- Agent-Driven Workflows: AI agents fill forms via CLI or programmatic API
- Multi-Format Export: Export filled data as JSON, YAML, or Markdown
Core CLI Commands
| Command |
Purpose |
markform inspect <form> |
Show form structure, progress, and issues |
markform validate <form> |
Check for constraint violations and errors |
markform set <form> <field> "value" |
Set a field value (auto-coerced) |
markform set <form> --values '{"k":"v"}' |
Batch set multiple fields |
markform next <form> |
Recommend the next field to fill |
markform fill <form> --interactive |
Interactive prompts for user fields |
markform fill <form> --model <model> |
AI agent fills form fields |
markform export <form> --format=json |
Export values as JSON |
markform export <form> --format=yaml |
Export values as YAML |
markform export <form> --format=markdown |
Full rendered markdown (includes instructions) |
markform report <form> |
Clean report markdown (values only, no instructions) |
markform schema <form> |
Export JSON Schema for form structure |
markform dump <form> |
Quick dump of current field values |
markform status <form> |
Show fill progress per role |
markform docs |
Show Markform syntax reference |
markform examples |
Copy built-in example forms |
markform serve <form> |
Web UI for browsing and editing |
Agent Workflow
When working with markform files:
- Inspect first:
markform inspect form.md to understand the form structure, see
which fields exist, their types, constraints, and current fill progress
- Check what’s next:
markform next form.md to see which field should be filled
next (respects priority, order, and role)
- Set values:
markform set form.md field_id "value" to fill fields one at a time,
or use --values for batch updates
- Validate:
markform validate form.md to check all constraints are met
- Export:
markform export form.md --format=json to extract filled data
Setting Field Values
The set command is the primary way to fill fields.
It auto-coerces values to the correct type:
# String fields
markform set form.md name "Alice Smith"
# Number fields (auto-coerced from string)
markform set form.md age 30
# Single select (by option ID)
markform set form.md rating high
# Multi select (JSON array of option IDs)
markform set form.md categories '["frontend","backend"]'
# Checkboxes (JSON object of {itemId: value})
markform set form.md tasks '{"research":"done","testing":"done"}'
# Table (append rows as JSON)
markform set form.md team --append '[{"name": "Alice", "title": "Engineer"}]'
# Batch set multiple fields
markform set form.md --values '{"name": "Alice", "age": 30, "rating": "high"}'
# Special operations
markform set form.md field_id --clear # Clear a field value
markform set form.md field_id --skip # Skip (mark as skipped)
markform set form.md field_id --abort # Abort (mark as aborted)
Global Options
All commands support:
| Option |
Description |
--format <fmt> |
Output format: console, json, yaml, plaintext, markform, markdown |
--verbose |
Enable verbose/debug output |
--quiet |
Suppress non-essential output |
--dry-run |
Show what would be done without changes |
--overwrite |
Overwrite existing field values |
File Conventions
| Extension |
Purpose |
.form.md |
Markform source and filled forms |
.fill.json |
Execution metadata (sidecar, auto-generated) |
.report.md |
Filtered human-readable output |
.schema.json |
JSON Schema export |
More Information
- Syntax reference:
markform docs
- Full specification:
markform spec
- API documentation:
markform apis
- Example forms:
markform examples
- End-to-end walkthrough:
examples/markform-demo-playbook.md
1---2name: markform3description: Markdown-based form system for structured data collection by AI agents and humans. Inspect, fill, validate, and export .form.md files with typed fields and role-based workflows. Use when working with .form.md files, filling forms, validating fields, exporting data, or when the user mentions markform, forms, form filling, structured data, or field validation.4---5# Markform Agent Skill67Markform is structured Markdown for forms.8Files combine YAML frontmatter with HTML comment tags to define typed, validated fields.9Forms render cleanly on GitHub since structure is hidden in comments.1011## Getting Started1213There are three ways to help a user get started with Markform:14151. **Run an example automatically:** `markform examples` copies bundled forms, then16 `markform run <form>` fills one end-to-end with an LLM. Quickest demo.172. **Agent-guided example tour:** Walk the user through a specific bundled example step18 by step—copy it, inspect the structure, fill fields, validate, and export.19 Use `markform examples --list` to pick an example, then `--name <id>` to copy it.203. **End-to-end walkthrough playbook:** Follow `examples/markform-demo-playbook.md` to21 design a research form from scratch, fill it with real data, validate, export, and22 browse. The most thorough tour of all Markform features.2324### API Key Setup2526Automated filling (`markform fill --model`, `markform run`) requires an LLM API key.27Set one of these environment variables (or add to `.env`):2829- `OPENAI_API_KEY` — for OpenAI models (e.g., `openai/gpt-4o`)30- `ANTHROPIC_API_KEY` — for Anthropic models (e.g.,31 `anthropic/claude-sonnet-4-5-20250929`)3233Run `markform models` to see available providers and configured keys.3435### Bundled Examples3637| Example | Type | Description |38| --- | --- | --- |39| `movie-research-demo` | research | Quick movie ratings lookup (IMDB, Rotten Tomatoes) |40| `simple` | fill | Interactive demo of all field types |41| `twitter-thread` | fill | Multi-stage content-to-Twitter-thread transformation |42| `movie-deep-research` | research | Comprehensive movie analysis with multiple sources |43| `startup-deep-research` | research | Startup intelligence: funding, team, market, press |4445```bash46markform examples --list # See all examples47markform examples --list --format=json # Structured output for agents48markform examples --name <id> --forms-dir ./ # Copy a specific example49```5051## What Markform Does52531. **Structured Forms:** Define typed fields (string, number, select, table, etc.)54 in Markdown with validation constraints552. **Role-Based Filling:** Separate fields for humans (`role="user"`) and AI agents56 (`role="agent"`)573. **Incremental Filling:** Fill fields one at a time with immediate validation584. **Agent-Driven Workflows:** AI agents fill forms via CLI or programmatic API595. **Multi-Format Export:** Export filled data as JSON, YAML, or Markdown6061## Core CLI Commands6263| Command | Purpose |64| --- | --- |65| `markform inspect <form>` | Show form structure, progress, and issues |66| `markform validate <form>` | Check for constraint violations and errors |67| `markform set <form> <field> "value"` | Set a field value (auto-coerced) |68| `markform set <form> --values '{"k":"v"}'` | Batch set multiple fields |69| `markform next <form>` | Recommend the next field to fill |70| `markform fill <form> --interactive` | Interactive prompts for user fields |71| `markform fill <form> --model <model>` | AI agent fills form fields |72| `markform export <form> --format=json` | Export values as JSON |73| `markform export <form> --format=yaml` | Export values as YAML |74| `markform export <form> --format=markdown` | Full rendered markdown (includes instructions) |75| `markform report <form>` | Clean report markdown (values only, no instructions) |76| `markform schema <form>` | Export JSON Schema for form structure |77| `markform dump <form>` | Quick dump of current field values |78| `markform status <form>` | Show fill progress per role |79| `markform docs` | Show Markform syntax reference |80| `markform examples` | Copy built-in example forms |81| `markform serve <form>` | Web UI for browsing and editing |8283## Agent Workflow8485When working with markform files:86871. **Inspect first:** `markform inspect form.md` to understand the form structure, see88 which fields exist, their types, constraints, and current fill progress892. **Check what’s next:** `markform next form.md` to see which field should be filled90 next (respects priority, order, and role)913. **Set values:** `markform set form.md field_id "value"` to fill fields one at a time,92 or use `--values` for batch updates934. **Validate:** `markform validate form.md` to check all constraints are met945. **Export:** `markform export form.md --format=json` to extract filled data9596## Setting Field Values9798The `set` command is the primary way to fill fields.99It auto-coerces values to the correct type:100101```bash102# String fields103markform set form.md name "Alice Smith"104105# Number fields (auto-coerced from string)106markform set form.md age 30107108# Single select (by option ID)109markform set form.md rating high110111# Multi select (JSON array of option IDs)112markform set form.md categories '["frontend","backend"]'113114# Checkboxes (JSON object of {itemId: value})115markform set form.md tasks '{"research":"done","testing":"done"}'116117# Table (append rows as JSON)118markform set form.md team --append '[{"name": "Alice", "title": "Engineer"}]'119120# Batch set multiple fields121markform set form.md --values '{"name": "Alice", "age": 30, "rating": "high"}'122123# Special operations124markform set form.md field_id --clear # Clear a field value125markform set form.md field_id --skip # Skip (mark as skipped)126markform set form.md field_id --abort # Abort (mark as aborted)127```128129## Global Options130131All commands support:132133| Option | Description |134| --- | --- |135| `--format <fmt>` | Output format: console, json, yaml, plaintext, markform, markdown |136| `--verbose` | Enable verbose/debug output |137| `--quiet` | Suppress non-essential output |138| `--dry-run` | Show what would be done without changes |139| `--overwrite` | Overwrite existing field values |140141## File Conventions142143| Extension | Purpose |144| --- | --- |145| `.form.md` | Markform source and filled forms |146| `.fill.json` | Execution metadata (sidecar, auto-generated) |147| `.report.md` | Filtered human-readable output |148| `.schema.json` | JSON Schema export |149150## More Information151152- Syntax reference: `markform docs`153- Full specification: `markform spec`154- API documentation: `markform apis`155- Example forms: `markform examples`156- End-to-end walkthrough: `examples/markform-demo-playbook.md`