Publish agent skills
An Agent Skill is a folder with a SKILL.md file that teaches an agent how to do one task. If your project has a skills/ folder, docslit build publishes every valid skill on your site. Agents find them through a discovery file, and readers install them with one command.
What the build publishes
The build writes these files at the site root. It skips them in offline builds.
| File | Purpose |
|---|---|
.well-known/agent-skills/index.json |
The discovery index (Agent Skills discovery v0.2.0). Each skill has a name, type of skill-md, a description, a url and a digest of the form sha256:<hex> computed from the exact file bytes |
.well-known/agent-skills/<name>/SKILL.md |
Your skill, copied byte for byte |
.well-known/skills/index.json and .well-known/skills/<name>/SKILL.md |
The same skills in the older layout, for clients that haven't moved to the v0.2.0 index |
skill.md |
A generated skill that tells agents how to read your site |
.nojekyll |
An empty file that makes GitHub Pages serve the .well-known/ folder |
On hosts that read _headers or vercel.json (Netlify, Cloudflare Pages and Vercel), every response from a site with skills also carries a Link header that points at the index. See How agents read your site.
Add a skill
Put each skill in its own folder under skills/ in the project root:
A SKILL.md starts with YAML frontmatter that has a name and a description, followed by the instructions in Markdown:
Naming rules
A skill that breaks a rule is skipped with a build warning, and docslit validate reports it as skill-invalid.
- The file is named exactly
SKILL.md. nameis 1 to 64 characters: lowercase letters, digits and single hyphens. It must match the folder name.descriptionis 1 to 1024 characters.- The file is 1 MiB or smaller.
The generated skill.md
The build also writes skill.md, a skill about your site rather than a task. It tells an agent how to read your docs: use llms.txt, append .md to a page URL, send Accept: text/markdown, read sitemap.md and changes.md, and run npx -y docslit mcp <url>. It also lists your own skills and shows the install command.
Its name is the slugified site name plus -docs, without doubling the suffix. A site named "My Docs" gets my-docs.
If your project has no valid skills, both indexes list this generated skill instead, so agents always find something at the discovery URL.
Install a skill
Readers install your skills with the skills CLI. Pass the site URL:
Turn off skills output
Set agents.skills to false to skip all of the files above, including the Link header and the skill.md entry in llms.txt:
Limitation with basePath
When you set basePath, the .well-known/ folder sits under that subpath. Discovery tools normally look for well-known files at the domain root, so a tool that only checks the root won't find your skills. The same limit applies to agent.json. Host the site at the domain root if you need those tools to find it.
Next steps
- See every file a build exposes in How agents read your site
- Check skills with
docslit validate