agentleFS
valkyrianlabsvalkyrianlabs/payload-markdown-docs/skills/payload-markdown/claude/SKILL.md

payload-markdown

Skill4 starsChanged 4 days agoMITView on GitHub

Write elegant automated documentation with payload-markdown, and edit live Payload content through its MCP tools. Use when authoring, rewriting, auditing, or structuring docs with Payload Markdown directives, theme names, cards, callouts, steps, tabs, TOCs, buttons, badges, and layout primitives, or when updating pages, posts and markdown blocks in a Payload app via markdownRead/markdownWrite.

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
  1. Very specific:

    Use this skill to write documentation that renders well with payload-markdown (also published as @valkyrianlabs/payload-markdown.

    line 8
  2. Distinctive:

    Check for drift before relying on it:

    line 16
  3. Very specific:

    When the markdownGuide tool is available, compare the skill sha256 it lists for claude with sha256 in skill.json.

    line 19
  4. Very specific:

    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 …

    line 21
  5. Distinctive:

    Use normal Markdown for prose and use directives only where they improve scanning, sequencing, comparison, or calls to action.

    line 27
  6. Very specific:

    Prefer readable directive labels such as [Install] over legacy title="".

    line 28
  7. Distinctive:

    Keep examples copyable. Use long fences when documenting Markdown that contains code fences.

    line 29
  8. Very specific:

    Run scripts/check_payload_markdown_doc.py on changed docs before finishing when local shell access is available.

    line 30
  9. Very specific:

    When the markdownGuide, markdownRead, markdownValidate, markdownWrite and markdownPublish tools are available, edit Payload content …

    line 34
  10. Very specific:

    Read reference/automated-docs-workflow.md for source-driven docs generation and audit flow.

    line 44
  11. Very specific:

    Read reference/formatting.md for frontmatter, headings, links, prose, and fenced examples.

    line 45
  12. Very specific:

    Read reference/payload-markdown-directives.md for supported directive syntax and recipes.

    line 46
  13. Very specific:

    Read reference/quality.md before final review or docs drift audits.

    line 47
  14. Very specific:

    Read reference/mcp-content-workflow.md before editing live content through the MCP tools.

    line 48
  15. Distinctive:

    Use exactly one H1 per page.

    line 53
  16. Very specific:

    Put :::toc[On this page]{depth="3" theme="compact"} after the intro on long pages.

    line 54
  17. Very specific:

    Use :::callout for important notes, warnings, tips, and migration hazards.

    line 55
  18. Very specific:

    Use :::steps for setup, tutorials, and workflows.

    line 56
  19. Very specific:

    Use :::cards and :::card for page maps, feature groups, related links, and summary grids.

    line 57
  20. Very specific:

    Use ::badge and :::badges for Shields badges when package, build, release, license, or status metadata helps orient the page.

    line 58
  21. Very specific:

    Use :::tabs only for truly parallel alternatives such as package managers or framework variants.

    line 59
  22. Very specific:

    Use :::details for optional caveats, migration notes, or advanced branches.

    line 60
  23. Very specific:

    Use :::section, :::2col, :::3col, and :::cell sparingly for dense landing-style docs sections.

    line 61
  24. Distinctive:

    Avoid unsupported directives, MDX components, arbitrary HTML widgets, and runtime Tailwind classes in authored Markdown.

    line 63
  25. Distinctive:

    Run the helper on changed Markdown files:

    line 73
  26. Very specific:

    If the downstream project uses @valkyrianlabs/payload-markdown-docs, also run its docs validation command when available.

    line 81

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 Claude variant, installed at .claude/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 markdownGuide tool is available, compare the skill sha256 it lists for claude with sha256 in skill.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

  1. Inspect the source of truth before writing docs: code, README, existing docs, examples, tests, public API, and current package metadata.
  2. Choose a page shape: overview, installation, reference, migration, troubleshooting, release notes, or API guide.
  3. Use normal Markdown for prose and use directives only where they improve scanning, sequencing, comparison, or calls to action.
  4. Prefer readable directive labels such as [Install] over legacy title="".
  5. Keep examples copyable. Use long fences when documenting Markdown that contains code fences.
  6. Run scripts/check_payload_markdown_doc.py on changed docs before finishing when local shell access is available.

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), then:

claude mcp add --transport http payload http://localhost:3000/api/mcp --header "Authorization: Bearer <key>"

Reference Map

  • Read reference/automated-docs-workflow.md for source-driven docs generation and audit flow.
  • Read reference/formatting.md for frontmatter, headings, links, prose, and fenced examples.
  • Read reference/payload-markdown-directives.md for supported directive syntax and recipes.
  • Read reference/quality.md before final review or docs drift audits.
  • Read reference/mcp-content-workflow.md before editing live content through the MCP tools.
  • reference/directive-spec.json is 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 :::callout for important notes, warnings, tips, and migration hazards.
  • Use :::steps for setup, tutorials, and workflows.
  • Use :::cards and :::card for page maps, feature groups, related links, and summary grids.
  • Use ::badge and :::badges for Shields badges when package, build, release, license, or status metadata helps orient the page.
  • Use :::tabs only for truly parallel alternatives such as package managers or framework variants.
  • Use :::details for optional caveats, migration notes, or advanced branches.
  • Use :::section, :::2col, :::3col, and :::cell sparingly 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 .claude/skills/payload-markdown/scripts/check_payload_markdown_doc.py docs/**/*.md

The 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.