Agent skills

Beta
以 Markdown 格式查看

The fern-docs agent skill teaches coding agents (Claude Code, Cursor, Codex, Copilot, and others) how to author and edit Fern Docs sites. It ships in the fern-api/skills repository.

Early access

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

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.

What the skill covers

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

  • Voice and writing principles for technical documentation (concise, dry, no marketing language)
  • Link construction rules for building internal URLs from docs.yml config rather than file paths
  • Cross-referencing guidelines for connecting related pages
  • 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 references in a references/ directory. Each reference is a focused guide for one type of docs task. The agent reads the matching reference before writing, rather than working from the index alone.

ReferenceLoaded when
references/changelog.mdWriting or editing a changelog entry: file naming, frontmatter tags, entry format, and the docs-link Button pattern.
references/products.mdSetting up a product switcher, adding a product, or refactoring navigation into the products format.

This routing keeps context small. An agent writing a changelog entry loads references/changelog.md and skips the products guide entirely.