---
title: Publish agent skills
description: Ship Agent Skills from your docs project so agents can discover them and install them with one command.
tag: AI and agents
readtime: 4 min read
---
> For AI agents: the complete documentation index is at [llms.txt](https://docs.docslit.com/0.3/llms.txt). This page as Markdown: [ai-and-agents/agent-skills.md](https://docs.docslit.com/0.3/ai-and-agents/agent-skills.md).


# Publish agent skills

An [Agent Skill](https://agentskills.io) 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](reading-agents#http-headers-and-discovery).

## Add a skill

Put each skill in its own folder under `skills/` in the project root:

```text
my-docs/
  docslit.json
  docs/
  skills/
    deploy-docs/
      SKILL.md
```

A `SKILL.md` starts with YAML frontmatter that has a `name` and a `description`, followed by the instructions in Markdown:

```markdown filename="skills/deploy-docs/SKILL.md"
---
name: deploy-docs
description: Build and deploy this documentation site. Use when the user asks to publish or release the docs.
---

# Deploy the docs

1. Run `npx docslit validate` and fix every error.
2. Run `npx docslit build`.
3. Run `npx docslit publish` to upload `dist/`.
```

### 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`.
- `name` is 1 to 64 characters: lowercase letters, digits and single hyphens. It must match the folder name.
- `description` is 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:

```bash
npx skills add https://docs.example.com
```

## 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`:

```json filename="docslit.json"
{
  "agents": {
    "skills": false
  }
}
```

## 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](reading-agents)
- Check skills with [`docslit validate`](../cli-reference/validation)
