fern-docs skill

Beta
View as Markdown
Early access

Agent skills are in early access. Reach out to request specific skills.

The fern-docs agent skill teaches coding agents (Claude Code, Cursor, Codex, Copilot, and others) how to author and edit Fern Docs sites, including navigation, custom components, landing pages, changelog entries, and access control (authentication & RBAC). It ships in the fern-api/skills repository.

Your docs site can also host your own skills for your users to discover and install.

Install

From your project, run the command for your agent:

$npx skills add fern-api/skills --skill fern-docs -a claude-code

This skills command writes the skill into your repo at the correct location (.claude/skills/, .agents/skills/, etc.), along with a skills-lock.json lockfile. Commit these files so everyone working in the repo gets the skill. Your agent then loads it automatically whenever a task involves authoring or editing your Fern Docs.

Add -g to install globally. The skill then loads on relevant docs tasks across every project you work in.

You can also install this skill from the Install skills action in the page actions toolbar on this documentation site.

What the skill covers

The skill’s SKILL.md is an index that agents read first. It contains:

  • Link construction rules for building internal URLs from docs.yml config rather than file paths
  • URL preservation rules for setting up redirects when an edit moves, renames, or deletes a page
  • Cross-referencing guidelines for connecting related pages
  • Authentication and RBAC guidance for gating pages and inline content by role, wiring in an auth method, and understanding which config lives in the repo versus the Dashboard
  • Pointers to Fern resources the agent can query at runtime, like the MCP server and llms.txt, along with the convention for fetching any page as Markdown by appending .md to its URL

References

The skill routes agents to task-specific guides in a references/ directory. The agent loads only the reference matching its task, not the whole set.

ReferenceLoaded when
references/changelog.mdWriting or editing a changelog entry.
references/products.mdSetting up a product switcher, adding a product, or refactoring navigation into the products format.
references/redirects.mdMoving, renaming, or deleting a page, or any edit that changes a published URL.
references/authentication.mdRestricting pages or content by role (RBAC), or wiring docs into an auth method (password, SSO, JWT, OAuth).
references/snippets.mdEditing the same content across multiple pages, or adding generic/boilerplate content.

An agent writing a changelog entry loads references/changelog.md and skips the rest, keeping context small.