# AI-readable docs and skills

One generator, `scripts/gen-llms.mjs`, reads `pages/**/+Page.mdx` —
the same single source of truth the site renders — and derives every
LLM consumption surface. Run it after documentation changes and check the committed output in CI to keep the site and artifacts in sync.

<span id="other-agent-surfaces" />

## The surfaces

| Surface | Output | Purpose |
| --- | --- | --- |
| Per-page markdown | `/<path>.md` (this page: `/guides/llms.md`) | Agents fetch exactly one page as clean markdown. |
| Index | [`/llms.txt`](/llms.txt) | The [llmstxt.org](https://llmstxt.org) map: brand, summary, every page with a blurb. |
| Full corpus | [`/llms-full.txt`](/llms-full.txt) | Whole docs in one file for context stuffing. |
| Importable skill | `skills/<name>/{SKILL.md,reference/*.md}` at the repo root (committed) | Drop into a Claude skills directory. |
| Skill download | `/skills/<name>.zip` | Same skill, fetchable from the site. |

The shell links the surfaces automatically: each page's `<head>` gets
`<link rel="alternate" type="text/markdown">` and the TOC rail gets a
"View as Markdown" link.

## What the generator does

- Strips frontmatter and imports; degrades MDX components to plain
  markdown (`> **Note:** ` → blockquote, `` → its inner code).
> - Rewrites internal links per surface — to `.md` twins on the web, to
>   `reference/*.md` inside the skill.
> - Excludes `noindex` pages from every artifact.
> - Reads `brand`, `url`, `summary`, `skill`, and
>   [`skillTriggers`](/reference/config.md) (the curated "Use when" phrases in the
>   skill's trigger list) from `site.config.ts`; on Netlify the deploy's
>   `URL` env var overrides the origin, so previews generate
>   self-consistent absolute links.
> 
> ## Wiring
> 
> The generator runs between prerender and pagefind (see the build
> steps in the [Quickstart](/get-started/quickstart.md)), plus two
> scripts:
> 
> ```bash
> pnpm gen:llms     # regenerate everything
> pnpm check:llms   # exit 1 if the committed skill drifted from pages/
> ```
> 
> The committed `skills/<name>/` directory is generated output — run
> `pnpm gen:llms` after editing pages, and let `check:llms` guard the
> repo in CI.
> 
> 
> `public/_headers` sets `text/markdown` on the twins and `text/plain`
> on the indexes; `public/_redirects` exact-matches them ahead of the
> SPA fallback so `curl https://…/guides/llms.md` returns markdown, not
> the app shell.

<span id="install" />

## Install the Dockit skill

The generated skill supplies a `SKILL.md` entry point and a `reference/*.md` file for each public page. Install it to let an agent consult Dockit setup, authoring, theming, and API guidance locally.

**Direct download** — grab [`/skills/dockit.zip`](/skills/dockit.zip)
and unzip it into your Claude Code skills directory:

```bash
curl -LO https://dockit.dreamlake.ai/skills/dockit.zip
unzip dockit.zip -d .claude/skills/dockit/
```

**Pebble marketplace** — DreamLake distributes its skills org-wide
through [dreamlake-ai/pebble](https://github.com/dreamlake-ai/pebble),
the canonical Claude Code skills marketplace for the org. If you are
inside DreamLake, install from pebble to pick up updates alongside
every other org skill.

## Orient your agents

Paste this fragment into your repo's `CLAUDE.md` so coding agents know
how the docs work without rediscovering it every session:

```markdown
## Docs (dockit)

- Doc pages live at `docs/pages/<slug>/+Page.mdx` (Vike file routing —
  nested folders nest URLs).
- Frontmatter: `{ title, section, order, description, draft?, hidden?,
  noindex?, tocLevel?, fullscreen? }`.
- The sidebar auto-derives from frontmatter. Never edit a nav config —
  there isn't one.
- MDX extras: ``, ``,
  and code fences with `file="…"` for a filename chip.
- Site config (brand, tabs, section order) is the `initDocs(...)` call
  in `docs/site.config.ts`.
- The docs build generates agent surfaces: `/llms.txt`, a `.md` twin
  per page, and a skill at `skills/<name>/` in the repo root — import
  that skill for deep dockit reference. Browsable at
  https://dockit.dreamlake.ai/guides/llms.
- Run `check:llms` before committing page changes, and commit the
  regenerated `skills/<name>/` with them.
```

## What's inside — SKILL.md

The committed entry point, verbatim:

<pre
  style={{
    maxHeight: '32rem',
    overflow: 'auto',
    padding: '1rem 1.25rem',
    background: 'var(--color-doc-template-code)',
    border: '1px solid var(--color-doc-template-faint)',
    borderRadius: 'var(--radius-doc-template-sm)',
    color: 'var(--color-doc-template-ink)',
    fontFamily: 'var(--font-doc-template-mono)',
    fontSize: '0.8125rem',
    lineHeight: 1.6,
    whiteSpace: 'pre-wrap',
  }}
>
  {skillMd}
</pre>
