agent-markdown

Keeps Markdown served to AI agents in sync with Sanity page-builder section fields.

Updated Sep 6, 2026
One-click install
npx skills add https://github.com/malikkotb/shellpluscore --skill agent-markdown-malikkotb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-markdown
Source: https://github.com/malikkotb/shellpluscore/tree/main/.agents/skills/agent-markdown
Command: npx skills add https://github.com/malikkotb/shellpluscore --skill agent-markdown-malikkotb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When you add or rename a page-builder section field in a Sanity CMS project, the Markdown version served to AI agents via content negotiation can silently drift out of sync, causing bespoke content fields to disappear from agent-facing output without any error. ## Core Features & Use Cases - Drift Detection Guidance: Identifies which sectionContent fields are invisible to agents because they lack a GROQ projection alias and a serializer renderer. - Two-Seam Update Checklist: Walks through adding bespoke fields to both the AgentMarkdownSectionContentFragment projection and the ordered sectionRenderers list. - Use Case: You scaffold a new "stats" section with a custom fields array. This Skill tells you exactly which projection alias and renderer to add, then has you run sanity:typegen and checks so agents receive the new content after regeneration. ## Quick Start Ask the AI to update the agent Markdown serializer and query projection so the new section's custom fields are included in the Markdown served to agents.

Frequently Asked Questions about agent-markdown

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new Sanity section field to the Markdown served to AI agents?

Add an alias for the field to the AgentMarkdownSectionContentFragment in the agents query file, then add a renderer in the PROJECT block of the sectionRenderers list in the serializer. Run sanity:typegen and the project checks afterward.

Why is my new Sanity section field missing from the agent Markdown output?

Bespoke content fields are invisible to agents until added to both the GROQ projection fragment and the serializer's renderer list. Fields using the factory defaults like appRichText, appMedia, and appLink serialize automatically.

Does the agent Markdown serializer handle video or Lottie media?

No, non-image media such as video, Lottie, and Rive is not serialized today. Only the media caption carries over into the Markdown output served to agents.

When do serializer changes actually reach AI agents?

Because the Markdown is a stored field rather than serialized per request, changes reach agents only after each affected page is regenerated and published through the Agents tab Generate action.

What happens if I rename a field away from the factory defaults?

Renaming a field away from defaults like appRichText silently drops it from the Markdown with no error. Prefer keeping factory field names, or add explicit projection aliases and renderers for custom names.