Skip to navigation

Skills for using Fern Docs

View as Markdown

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 Fern’s 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/quickstart-openapi.mdTurning an OpenAPI spec into a published docs site, including which publish command to use with and without a Fern account.
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.
references/translations.mdAdding or updating a translated version of the site.

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

Other Fern skills

The fern-api/skills repository ships three more skills covering the rest of a Fern project. Each is structured the same way: a SKILL.md index that routes to a task-specific reference.

SkillCovers
fern-specAuthoring and tuning the OpenAPI spec Fern consumes: operationId and schema hygiene, x-fern-* extensions, overlays versus overrides, auth and servers, and spec sync with fern api update.
fern-sdksConfiguring and generating SDKs: generators.yml, auth schemes, environments, .fernignore and Replay for custom code, and common generation failures.
fern-workflowsCI/CD that runs the Fern CLI: fern check on pull requests, docs previews and production publishes, SDK releases with pinned CLI and generator versions, and handling FERN_TOKEN and registry secrets safely.

Install any of them by swapping the --skill value:

npx skills add fern-api/skills --skill fern-spec -a claude-code

To install every Fern skill at once, omit --skill:

npx skills add fern-api/skills