DreamLake

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.

The surfaces

SurfaceOutputPurpose
Per-page markdown/<path>.md (this page: /guides/llms.md)Agents fetch exactly one page as clean markdown.
Index/llms.txtThe llmstxt.org map: brand, summary, every page with a blurb.
Full corpus/llms-full.txtWhole docs in one file for context stuffing.
Importable skillskills/<name>/{SKILL.md,reference/*.md} at the repo root (committed)Drop into a Claude skills directory.
Skill download/skills/<name>.zipSame 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 (<Callout> → blockquote, <Preview> → 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 (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), 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.

Serving details

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.

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 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, 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: `<Callout variant="info|warn" title="…">`, `<Preview>`,
  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:

---
name: dockit
description: Dockit is the DreamLake documentation shell — a Vike + React + Tailwind v4 component library and site framework with sidebar/TOC/search, MDX authoring conventions, and a versioned Netlify deploy pipeline. Use when: building or wiring a DreamLake docs site with @dreamlake/dockit; using or configuring the docs shell components (Topbar, Sidebar, TOC, SearchPalette, Callout, CodeBlock, Preview); authoring MDX doc pages — frontmatter, sections, tabs, code fences; theming or re-branding the docs shell (design tokens, dark mode, fonts); deploying or versioning a dockit docs site on Netlify (v-branches, versions.json); migrating an existing documentation site to dockit; generating Python API documentation with autodoc-py.
---
# DreamLake

> Dockit is the DreamLake documentation shell — a Vike + React + Tailwind v4 component library and site framework with sidebar/TOC/search, MDX authoring conventions, and a versioned Netlify deploy pipeline.

## Quickstart

```bash
pnpm add @dreamlake/dockit react react-dom @mdx-js/react vike vike-react
```

```ts
// vite.config.ts
import { defineConfig } from 'vite'
import { dockit } from '@dreamlake/dockit/vite'

export default defineConfig({ plugins: [...dockit()] })
```

```ts
// site.config.ts — imported for its side effect, FIRST, by both renderer entries
import { initDocs } from '@dreamlake/dockit'

const pages = import.meta.glob('./pages/**/+Page.mdx', { eager: true })
const rawPages = import.meta.glob('./pages/**/+Page.mdx', { eager: true, query: '?raw', import: 'default' })

initDocs({
  site: { brand: 'MyProject', subtitle: 'Docs', url: 'https://docs.example.com' },
  pages,
  rawPages,
})
```

Pages live at `pages/<slug>/+Page.mdx` with YAML frontmatter (`title`,
`section`, `order`, `description`); the sidebar and nav derive entirely from
frontmatter. Full walkthrough: `reference/get-started-quickstart.md`.

## Task routing

| Task | Read |
| --- | --- |
| Set up a new docs site | `reference/get-started-quickstart.md` |
| Migrate an existing docs site | `reference/get-started-migration.md` |
| Theme or brand the shell | `reference/guides-theming.md` |
| Author pages and frontmatter | `reference/guides-authoring.md` |
| Configure tabs, chips, sections | `reference/guides-site-config.md`, `reference/reference-config.md` |
| Configure the shell (Layout, Sidebar, TOC) | `reference/reference-components-shell.md` |
| Use or customize a component | `reference/reference-components-<name>.md` (topbar, callout, chip, code-block, preview, status-table; TabStrip is in topbar) |
| Configure search and SearchPalette | `reference/guides-search.md` |
| Generate LLM-readable surfaces (llms.txt, .md twins, a skill) | `reference/guides-llms.md` |
| Versioned releases / the version switcher | `reference/guides-releases.md` |
| Install or distribute the dockit skill | `reference/guides-llms.md` |
| Generate Python API documentation | `reference/python-autodoc.md`, `reference/python-autodoc-usage.md` |
| Release history | `reference/get-started-release-notes.md` |
| Exact API types | `reference/api-types.md` |

This skill bundles the DreamLake documentation. Read the reference
file that matches the question; each is a self-contained markdown page.

## Reference

**Getting started**

- `reference/overview.md` — Introduction: Build a documentation site with Dockit, look up its APIs, or generate Python reference pages with Autodoc.
- `reference/get-started-quickstart.md` — Quickstart: Install Dockit and its prerequisites, wire a Vike site, and build searchable static documentation.
- `reference/get-started-migration.md` — Migrate an existing site: Port a hand-rolled DreamLake docs site onto @dreamlake/dockit — what to delete, the old-to-new mapping, and the verification checklist.

**Build your site**

- `reference/guides-site-config.md` — Site config: Configure branding, version chips, tabs, sidebar ordering, and agent skill triggers with initDocs.
- `reference/guides-authoring.md` — Authoring pages: The +Page.mdx contract — frontmatter schema, routing, headings and TOC, code fences with file chips, callouts, previews, and page flags.
- `reference/guides-theming.md` — Theming & CSS: The --doc-template-* token table, dark-mode mechanics, the consumer app.css anatomy, re-branding, and ThemeToggle/ThemeProvider.
- `reference/guides-search.md` — Search: How search works — pagefind at build time, the fallback index in dev, the data-pagefind-* markers, and how to write searchable pages.

**Publishing**

- `reference/guides-llms.md` — AI-readable docs and skills: gen-llms.mjs derives every agent-facing surface from your MDX — .md twins, llms.txt, llms-full.txt, and an importable skill.
- `reference/guides-releases.md` — Releases & versioning: Version your docs deploys — the versions.json manifest, the set-version and version-branch scripts, Netlify branch deploys, and the prod/staging promotion flow.
- `reference/get-started-release-notes.md` — Release notes: What changed in each release of @dreamlake/dockit and its docs.

**API**

- `reference/reference-config.md` — Configuration: Reference for initDocs, SiteConfig (incl. skillTriggers), VersionChip, TabDef, PageMeta, and the init functions.
- `reference/reference-exports.md` — Package exports: The @dreamlake/dockit exports map — what each entry point is for, and everything the root export contains.

**Shell**

- `reference/reference-components-shell.md` — Shell reference: Layout, Sidebar, TOC, and DocFooter — composition, navigation, fullscreen pages, and rail configuration.
- `reference/reference-components-topbar.md` — Topbar: Brand cluster, version chips, git hash, breadcrumb merge, tabs, and the search field.

**Content components**

- `reference/reference-components-callout.md` — Callout: Inline admonition block — info and warn variants with an optional title.
- `reference/reference-components-code-block.md` — CodeBlock: The chrome around fenced code — language chip, filename, line-number toggle, copy button.
- `reference/reference-components-preview.md` — Preview: Live example frame with Preview/Source tabs — render a component and show its code from one source file.
- `reference/reference-components-status-table.md` — StatusTable: Render suite/example test results from a generated test-results.json — plus the inline TestStatus chip.
- `reference/reference-components-chip.md` — Chip: The canonical badge idiom — implementing chips with the Chip component, and every place badges can be injected into the shell.

**Python Autodoc**

- `reference/python-autodoc.md` — Python Autodoc: Generate Dockit API reference pages from Python source without importing the package.
- `reference/python-autodoc-usage.md` — Generate API docs: Install autodoc-py, configure generated routes and source links, and integrate versioned Python API docs into Dockit builds.
- `reference/python-autodoc-display.md` — Python API display: Python API reference for reference_demo
- `reference/python-autodoc-release-notes.md` — Release notes: Python Autodoc source releases, compatibility checks, and package distribution status.

## Canonical source

These docs live at https://dockit.dreamlake.ai. Each page is also fetchable as markdown
at `<page-url>.md`, and the full corpus at https://dockit.dreamlake.ai/llms-full.txt.