Writing Markdoc with AI Agents
DeveloperHub pages are authored in Markdoc, a superset of Markdown with a set of typed custom tags. When you edit pages with an AI coding agent (in your IDE, a GitHub-synced repository, or a docs-as-code pipeline), the agent needs to emit DeveloperHub's exact Markdoc dialect. Emit a non-canonical shape and the edit churns on the first save, or silently drops content.
@developerhub/dh-skills is an open-source set of Agent Skills that teach your agent that dialect and the repository structure DeveloperHub expects, so the pages it writes round-trip cleanly. They can also move your existing docs into DeveloperHub from another tool.
The package is public and maintained by DeveloperHub: github.com/developerhub-io/dh-skills. It is released under the MIT licence.
What it is
The package ships three skills:
write-markdoc documents every DeveloperHub block and inline tag with its exact syntax, attributes, defaults, allowed values, and the round-trip rules that keep an edit lossless.
organize-docs-repo covers the repository layout: where each file goes, the navigation and settings files, images, API references, synced blocks, changelogs, and your site's look (logo, favicon, colours, and custom CSS), and how to add, move, nest, group, reorder, or hide pages without breaking the sync.
migrate-docs moves your docs from another tool, such as Docusaurus, MkDocs, Sphinx, GitBook, Mintlify, or ReadMe, into a folder you import with GitHub Sync. See Import from Any Tool with AI.
They use the portable Agent Skills format (Markdown with YAML frontmatter), so they work across Claude Code, Cursor, Codex, and other compatible agents.
When to use it
Reach for it whenever an agent, rather than the editor, is writing your pages:
Editing pages in a GitHub Sync repository or any docs-as-code workflow.
Any task where you want the agent to produce correct, lossless Markdoc the first time.
Moving your docs to DeveloperHub from another tool.
The in-product editor already knows the format, so this skill is for agents working on your pages from outside DeveloperHub.
Installing the skill
Claude Code
The repository doubles as a Claude Code plugin marketplace. This is the only install that keeps itself current as the format evolves:
The skills arrive namespaced, as dh-skills:write-markdoc, dh-skills:organize-docs-repo, and dh-skills:migrate-docs.
The plugin also connects Claude Code to the Editor MCP Server, so Claude can find, write and publish pages in your projects directly. The first time Claude uses it, you sign in to DeveloperHub and approve access, and it reaches only the projects where an admin has turned the server on.
Third-party marketplaces do not update themselves until you allow it, so turn that on once: run /plugin, open the Marketplaces tab, select developerhub, and choose Enable auto-update. Claude Code then refreshes the plugin in the background shortly after a session starts.
Cursor, Codex, and other agents
Use the skills CLI, which adds the skills to your agent's skills directory:
This copies the files in, so run npx skills update when you want a newer release.
Alternatively, copy the folders under skills/ from the repository into your agent's skills directory yourself (.claude/skills/, .cursor/skills/, and so on). Copy all three together, since migrate-docs relies on the other two.
The package is also on npm, for anyone who prefers to vendor the files as a dependency:
Using it
Once installed, your agent picks the skills up automatically when a task involves your DeveloperHub docs: writing a callout, code block, table, image, or tabs; or changing structure, such as adding, moving, or reordering pages. They give the agent the canonical shape for each tag and the correct file layout, so its changes import cleanly and do not churn or drop content on the next save.
For the reference write-markdoc is built on, see Markdoc Format, which lists every block with an example.
Migrating from Another Tool
To move your docs to DeveloperHub with migrate-docs:
Install the skills, then start a new session in your agent.
Ask your agent to migrate your docs to DeveloperHub, and point it at them: a folder or repository, an export, or the live site if there is nothing else.
Answer its questions about how to structure your content, and check the first few pages it converts.
Push the folder it produces to a GitHub repository and set up GitHub Sync with First sync set to Import.
For each step in detail, and what to do with the report and redirects it gives you, see Import from Any Tool with AI.
Feedback
Spotted an error, or want a block documented differently? Open an issue on the repository.
Need help? Visit our community forums or contact us.