payload-markdown
Skill4 starsChanged 4 days agoMITView on GitHub
Write elegant automated documentation with payload-markdown. Use when Codex needs to author, rewrite, audit, or structure docs using Payload Markdown directives, theme names, cards, callouts, steps, tabs, TOCs, buttons, badges, and layout primitives.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- dev/AGENTS.mdAGENTS.md
- payload-markdown-docsSkill
- payload-markdownSkill
- payloadSkill
- vl-releaseSkill
- payload-markdown-docsSkill
- payload-markdownSkill
- vl-releaseSkill
- payload-markdownSkill
- payload-markdown-docsSkill
- payload-markdown-docsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. About 0 are common, 6 are distinctive, and 20 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
20
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill to write documentation that renders well with payload-markdown (also published as @valkyrianlabs/payload-markdown.
- Distinctive: line 16
Check for drift before relying on it:
- Very specific: line 19
When the markdownGuide tool is available, compare the skill sha256 it lists for codex with sha256 in skill.json.
- Very specific: line 21
If they differ, or skill.json is missing, tell the user the skill is out of date and suggest npx payload-markdown skill install, then …
- Distinctive: line 27
Use normal Markdown for prose and use directives only where they improve scanning, sequencing, comparison, or calls to action.
- Very specific: line 28
Prefer readable directive labels such as [Install] over legacy title="".
- Distinctive: line 29
Keep examples copyable. Use long fences when documenting Markdown that contains code fences.
- Very specific: line 30
Run scripts/check_payload_markdown_doc.py on changed docs before finishing.
- Very specific: line 34
When the markdownGuide, markdownRead, markdownValidate, markdownWrite and markdownPublish tools are available, edit Payload content …
- Very specific: line 40
Read reference/automated-docs-workflow.md for source-driven docs generation and audit flow.
- Very specific: line 41
Read reference/formatting.md for frontmatter, headings, links, prose, and fenced examples.
- Very specific: line 42
Read reference/payload-markdown-directives.md for supported directive syntax and recipes.
- Very specific: line 43
Read reference/quality.md before final review or docs drift audits.
- Very specific: line 44
Read reference/mcp-content-workflow.md before editing live content through the MCP tools.
- Distinctive: line 49
Use exactly one H1 per page.
- Very specific: line 50
Put :::toc[On this page]{depth="3" theme="compact"} after the intro on long pages.
- Very specific: line 51
Use :::callout for important notes, warnings, tips, and migration hazards.
- Very specific: line 52
Use :::steps for setup, tutorials, and workflows.
- Very specific: line 53
Use :::cards and :::card for page maps, feature groups, related links, and summary grids.
- Very specific: line 54
Use ::badge and :::badges for Shields badges when package, build, release, license, or status metadata helps orient the page.
- Very specific: line 55
Use :::tabs only for truly parallel alternatives such as package managers or framework variants.
- Very specific: line 56
Use :::details for optional caveats, migration notes, or advanced branches.
- Very specific: line 57
Use :::section, :::2col, :::3col, and :::cell sparingly for dense landing-style docs sections.
- Distinctive: line 59
Avoid unsupported directives, MDX components, arbitrary HTML widgets, and runtime Tailwind classes in authored Markdown.
- Distinctive: line 69
Run the helper on changed Markdown files:
- Very specific: line 77
If the downstream project uses @valkyrianlabs/payload-markdown-docs, also run its docs validation command when available.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Payload Markdown
Use this skill to write documentation that renders well with payload-markdown (also published as @valkyrianlabs/payload-markdown; same package and version, so use whichever name the project installed in imports), especially docs generated or maintained by agents for downstream @valkyrianlabs/payload-markdown-docs projects.
This skill is about authoring clean Markdown content with Payload Markdown directives, in files or live in a Payload app over MCP. It is not a Payload CMS implementation guide.
Keep This Skill Current
This skill ships with payload-markdown (the Codex variant, installed at .agents/skills/payload-markdown). skill.json next to this file records the package version it came from and a sha256 of the skill files.
Check for drift before relying on it:
- With shell access in a project that depends on the package, run
npx payload-markdown skill check. - When the
markdownGuidetool is available, compare the skillsha256it lists forcodexwithsha256inskill.json.
If they differ, or skill.json is missing, tell the user the skill is out of date and suggest npx payload-markdown skill install, then re-read this skill after it is updated. The installer refuses to overwrite local edits unless run with --force.
Workflow
- Inspect the source of truth before writing docs: code, README, existing docs, examples, tests, public API, and current package metadata.
- Choose a page shape: overview, installation, reference, migration, troubleshooting, release notes, or API guide.
- Use normal Markdown for prose and use directives only where they improve scanning, sequencing, comparison, or calls to action.
- Prefer readable directive labels such as
[Install]over legacytitle="". - Keep examples copyable. Use long fences when documenting Markdown that contains code fences.
- Run
scripts/check_payload_markdown_doc.pyon changed docs before finishing.
Live Content Over MCP
When the markdownGuide, markdownRead, markdownValidate, markdownWrite and markdownPublish tools are available, edit Payload content directly: guide → read → validate until ok → write a draft with ifUpdatedAt → share the preview → publish only when asked. Read reference/mcp-content-workflow.md first.
Quick setup when the tools are missing: the app registers @payloadcms/plugin-mcp with withPayloadMarkdownMcp() from payload-markdown/mcp, the user creates a key in the admin (MCP → API Keys), and the MCP client connects to <app URL>/api/mcp (Streamable HTTP) with the header Authorization: Bearer <key>.
Reference Map
- Read
reference/automated-docs-workflow.mdfor source-driven docs generation and audit flow. - Read
reference/formatting.mdfor frontmatter, headings, links, prose, and fenced examples. - Read
reference/payload-markdown-directives.mdfor supported directive syntax and recipes. - Read
reference/quality.mdbefore final review or docs drift audits. - Read
reference/mcp-content-workflow.mdbefore editing live content through the MCP tools. reference/directive-spec.jsonis the machine-readable directive spec generated from the renderer: directive names, open and close markers, attributes with types and allowed values, theme groups, badge types and targets, and parser constraints. Prefer it over memory when unsure whether an attribute or value exists.
Authoring Defaults
- Use exactly one H1 per page.
- Put
:::toc[On this page]{depth="3" theme="compact"}after the intro on long pages. - Use
:::calloutfor important notes, warnings, tips, and migration hazards. - Use
:::stepsfor setup, tutorials, and workflows. - Use
:::cardsand:::cardfor page maps, feature groups, related links, and summary grids. - Use
::badgeand:::badgesfor Shields badges when package, build, release, license, or status metadata helps orient the page. - Use
:::tabsonly for truly parallel alternatives such as package managers or framework variants. - Use
:::detailsfor optional caveats, migration notes, or advanced branches. - Use
:::section,:::2col,:::3col, and:::cellsparingly for dense landing-style docs sections. - Colour icons and directives with named palettes (
palette=,iconPalette=,@pack/icon palette=name), never CSS. - Avoid unsupported directives, MDX components, arbitrary HTML widgets, and runtime Tailwind classes in authored Markdown.
Examples
examples/docs-page.md: polished docs page with TOC, cards, steps, callouts, tabs, and details.examples/reference-page.md: API/reference style page with structured sections and warnings.examples/release-notes.md: release note page using cards, details, and migration callouts.
Validation
Run the helper on changed Markdown files:
python3 .agents/skills/payload-markdown/scripts/check_payload_markdown_doc.py docs/**/*.mdThe checker reads reference/directive-spec.json (falling back to built-in tables when it is missing) and reports unknown directives, attributes and values, text after a container marker that is not [label] or {…}, markers inside list items or blockquotes, stray closers, and unclosed containers.
If the downstream project uses @valkyrianlabs/payload-markdown-docs, also run its docs validation command when available.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

