Agent skill

Using Docs Kit

by lobehub in lobehub/lobe-ui

Set up and author a documentation site with @lobehub/docs-kit (the lobedocs CLI, React Router + Vite static docs used by ui.lobehub.com).

MITAuto-check passedFrontend & Design

Install Using Docs Kit

skills CLI
$ npx skills add lobehub/lobe-ui --skill using-docs-kit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install lobehub/lobe-ui using-docs-kit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/lobehub/lobe-ui.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/using-docs-kit .claude/skills/using-docs-kit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
using-docs-kit
GitHub stars
2.2k
Token cost
~2.8k tokens
SKILL.md length
741 words
Files
3
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Set up and author a documentation site with @lobehub/docs-kit (the lobedocs CLI, React Router + Vite static docs used by ui.lobehub.com).

  • Works in 6 steps: Repo layout → Install and scripts → Minimal docs.config.ts → …
  • DefineDocsConfig
  • SKILL.md covers 1. Repo layout, 2. Install and scripts, 3. Minimal docs.config.ts and 4. Writing a component page…, plus 3 more sections
  • Calls pnpm and tsx; reaches github.com and editor.lobehub.com

What it does

Using Docs Kit is an agent skill from lobehub/lobe-ui. Set up and author a documentation site with @lobehub/docs-kit (the lobedocs CLI, React Router + Vite static docs used by ui.lobehub.com). Covers consumer repo layout, docs.config.ts, package scripts, component doc pages (index.mdx frontmatter, ?demo imports, <Demo, <Api), guide pages, home page, changelog, and the build-time validations that reject bad docs. Trigger on docs-kit, lobedocs, defineDocsConfig, docs.config.ts, migrate from dumi, write component docs, add a demo, <Demo, <Api, index.mdx, 文档站, 写文档, 组件文档…

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `reference/config.md` and `reference/validations.md`).

It sits in Frontend & Design, covering Markdown, Static sites and blogs and Design systems. It works with React Router, Vite, React and TypeScript. The repository describes itself as: 🍭 Lobe UI - an open-source UI component library for building AIGC web apps. The licence is MIT.

When your agent uses it

  • DefineDocsConfig
  • Migrate from dumi
  • Write component docs

Example prompts

  • “/using-docs-kit”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Repo layout
  2. Install and scripts
  3. Minimal docs.config.ts
  4. Writing a component page (src//index.mdx)
  5. Guides, home, changelog
  6. Workflow for adding or migrating a page

What it can do on your machine

Read from SKILL.md and the folder at commit 6b4ecd3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm
    • tsx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com
    • editor.lobehub.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Using Docs Kit loads about 2.8k tokens when it runs. Until then it costs about 138 tokens; SKILL.md has 741 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~138
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from lobehub/lobe-ui at commit 6b4ecd3, republished under its MIT licence (© lobehub). 741 words, ~2,847 tokens.

Download SKILL.mdSave it as .claude/skills/using-docs-kit/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
using-docs-kit
description
Set up and author a documentation site with @lobehub/docs-kit (the `lobedocs` CLI, React Router + Vite static docs used by ui.lobehub.com). Covers consumer repo layout, docs.config.ts, package scripts, component doc pages (index.mdx frontmatter, `?demo` imports, <Demo>, <Api>), guide pages, home page, changelog, and the build-time validations that reject bad docs. Trigger on docs-kit, lobedocs, defineDocsConfig, docs.config.ts, migrate from dumi, write component docs, add a demo, <Demo>, <Api>, index.mdx, 文档站, 写文档, 组件文档, 迁移 dumi.

Using @lobehub/docs-kit

The consumer repo holds only content + docs.config.ts. The kit owns Vite and React Router config; do not add vite.config.ts or react-router.config.ts unless overriding (see reference/config.md).

lobe-ui itself is the reference consumer: docs.config.ts, docs/, src/*/index.mdx, src/*/demos/.

1. Repo layout

<repo>/
├── docs.config.ts          # defineDocsConfig({...}) — required
├── package.json            # lobedocs scripts
├── docs/
│   ├── index.mdx           # "/" — required (frontmatter feeds SEO even with a custom homePage)
│   ├── changelog.mdx       # "/changelog" — optional; else root CHANGELOG.md is used
│   └── home/home.tsx       # optional custom landing page (config.homePage)
├── src/
│   └── Button/
│       ├── index.ts        # barrel export — <Api> resolves props through it
│       ├── Button.tsx
│       ├── type.ts         # props with JSDoc
│       ├── index.mdx       # -> /components/button
│       └── demos/
│           ├── index.tsx   # default-export component
│           └── Variant.tsx
├── public/                 # static assets served at "/" (favicons, og images)
└── CHANGELOG.md

Hard rules the compiler enforces:

  • Only files named index.mdx under an atomDirs root become component pages (index.md and README.md are ignored).
  • Demo files must live under src/**/demos/** — standalone /~demos/:id routes and isolated demos are globbed from that path only.
  • Other docs/**/*.mdx files are not discovered unless listed in publicDocs.

2. Install and scripts

bash
pnpm add -D @lobehub/docs-kit @react-router/dev@8.2.0 react-router@8.2.0 vite@8.1.4 tsx
pnpm add react react-dom # ^19
json
{
  "scripts": {
    "docs:dev": "lobedocs dev",
    "docs:build": "lobedocs build",
    "postinstall": "lobedocs typegen"
  }
}

lobedocs build writes the static site to dist/ (Pagefind search, sitemap, /llms.txt, /skills.md are generated automatically). Node >= 22.22.

3. Minimal docs.config.ts

ts
export default {
  atomDirs: [{ dir: 'src' }],
  title: 'Lobe Editor',
  description: 'One sentence describing the library.',
  siteUrl: 'https://editor.lobehub.com',
  alias: { '@': 'src', '@lobehub/editor': 'src' }, // let demos import the package from source
  themeConfig: {
    apiHeader: {
      packageName: '@lobehub/editor', // defaults to @lobehub/ui — always set it
      github: 'https://github.com/lobehub/lobe-editor',
    },
    socialLinks: [
      { href: 'https://github.com/lobehub/lobe-editor', icon: 'github', label: 'GitHub' },
    ],
  },
};

The package's only stable JS entry is @lobehub/docs-kit/react-router-config; there is no root export for defineDocsConfig. It is an identity function, so export a plain object. (lobe-ui imports it from ./packages/docs-kit/src/config only because it is the workspace.)

Restart lobedocs dev after editing docs.config.ts — config is cached per process.

All fields (multiple atomDirs, subType, homePage, publicDocs, navItems, giscus, analytics, legacyRedirects) are in reference/config.md.

4. Writing a component page (src/<Name>/index.mdx)

Template:

mdx
---
title: Button
description: Button triggers an action. Supports variants, sizes, loading and icon slots.
category: General
order: -1
---

import Basic from './demos/index.tsx?demo';
import Variants from './demos/Variant.tsx?demo';

## Introduction

One or two paragraphs: what it is, when to use it, when to use something else.

## Basic Usage

<Demo of={Basic} title="Basic usage" layout="bare" />

## Variants

Explain the dimension first, then show it.

<Demo of={Variants} title="Variants" />

## API

<Api name="Button" />

Additionally, Button supports all props of antd's Button except `icon`.
Frontmatter
FieldRequiredEffect
titleyesH1, <title>, sidebar label. If PascalCase, the header shows import { Title } from '<packageName>' — match the export name
descriptionyesSubtitle, meta/OG description, search, llms.txt. One or two plain sentences, no markdown
categoryyes (component)Sidebar group inside the section. Reuse existing names; General sorts first
ordernoNumber, lower first within category; unset sorts last, then by title
statusnostable | beta | experimental | deprecated
sincenoVersion string
routenoOverride the URL; component pages must stay under /components/

Anything else (group, nav, apiHeader, dumi's hero) is ignored — remove it.

URL is derived from the folder: src/Button/index.mdx → /components/button, src/base-ui/Select/index.mdx → /components/base-ui/select (each segment kebab-cased).

Headings

The page already renders title as the H1. Start body sections at ##; a stray # is downgraded to H2. Every heading gets an anchor and appears in the outline and llms.txt, so use short, stable, noun-style headings (## Variants, ## Controlled, ## API).

Demos
mdx
import Basic from './demos/index.tsx?demo';

<Demo of={Basic} title="Basic usage" description="Optional caption." layout="center" />
PropDefaultUse
of—Required. The ?demo import (without ?demo you get the raw component and it fails)
title / description—Caption above the demo
layout'default''bare' no padding/frame (playgrounds, full-width); 'center' centered small elements
isolatedfalseRender in an iframe — for fixed/portal/global-CSS demos that would leak into the page
editabletrueSet false if the demo uses dynamic import(), workers, or odd local deps
height—Frame height, e.g. for isolated demos

Demo file rules:

  • Exactly one export default component; import the library by its package name (import { Button } from '@lobehub/editor') so the shown source is copy-pasteable — the alias maps it back to src/.
  • One idea per demo; name files after the idea (Variant.tsx, Controlled.tsx), index.tsx for the basic one.
  • Keep it self-contained: no fetching, no reliance on site state; mock data inline.
  • Interactive playgrounds (lobe-ui style) use StoryBook + useControls from @lobehub/ui/storybook with layout="bare".
Show full SKILL.md (265 more words)Show less
API table
mdx
<Api name="Button" />                      <!-- resolves via nearest index.ts barrel -->
<Api name="ChatItem" from=".." />          <!-- module path relative to this index.mdx -->

Only static name and from are allowed (data is compiler-owned; migrationKey in old lobe-ui pages is inert). Props are extracted from TypeScript, so the quality of the table is the quality of your types:

ts
export interface ButtonProps {
  /**
   * Adds a frosted-glass background.
   * @default false
   */
  glass?: boolean;
  /** @deprecated Use `variant="filled"` instead. */
  filled?: boolean;
}
  • The JSDoc body is the description; supported tags: @default, @deprecated, @since.
  • @default must match the runtime destructuring default, or the build fails.
  • any / unknown props fail the build — type them.
  • Props starting with _ are hidden; inherited React/HTML attributes collapse into a footnote.
Other MDX content
  • Globals available without import: only Demo and Api. Import anything else explicitly (e.g. import { Alert } from '@lobehub/ui').
  • GFM is on (tables, task lists, strikethrough). No ::: callout syntax.
  • Code fences are highlighted only — never executed. dumi's ```tsx | pure meta is harmless but meaningless; plain ```tsx is preferred for new pages.
  • .md files can be imported as components: import Changelog from '../CHANGELOG.md'.

5. Guides, home, changelog

  • Guide pages: add docs/<path>.mdx (frontmatter title + description) and list it in publicDocs: ['docs/<path>.mdx'] → served at /<path>. Guides get no sidebar entry; link to them via themeConfig.navItems.
  • Home: docs/index.mdx needs frontmatter. Without homePage, the default home is built from themeConfig.home (hero, features, install). With homePage: './docs/home/home.tsx', that module's default export renders instead and receives { description: string; getStartedPathname: string }.
  • Changelog: either docs/changelog.mdx importing ../CHANGELOG.md, or just a root CHANGELOG.md (no frontmatter needed).

6. Workflow for adding or migrating a page

- [ ] index.mdx exists at src/<Name>/index.mdx with title, description, category
- [ ] every <Demo of={X}> has a matching `import X from './demos/….tsx?demo'`
- [ ] demos default-export and import the package by name
- [ ] <Api name> matches an exported component; props typed with JSDoc
- [ ] dumi leftovers removed: <code src=…>, `group:`, `nav:`, `hero:`, `apiHeader:` frontmatter
- [ ] `lobedocs dev`, open the page, check demos + API table render
- [ ] `lobedocs build` passes (it runs all audits)

When the build fails, the error lists the offending file and rule; see reference/validations.md for every rule and the fix.

Additional resources

© lobehub, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in .agents/skills/using-docs-kit of lobehub/lobe-ui.

  • SKILL.md
  • reference/config.md
  • reference/validations.md

Open the folder on GitHubat commit 6b4ecd3

Used in 3 other repositories

We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders. This page covers the copy in lobehub/lobe-ui, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Using Docs Kit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Using Docs Kit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Using Docs Kit this skilllobehub/lobe-ui2.2k—~2.8kAutomated safety check: PassMIT
Cometchat React V7 Patternscometchat/cometchat-skills129—~1.2kAutomated safety check: NotesMIT
Admin Template Project Initializersouthliu/south-admin-react580—~519Automated safety check: PassMIT
South Admin CRUD Generatorsouthliu/south-admin-react580—~1.7kAutomated safety check: PassMIT
Redesign My Landingpageinstructa/agent-skills139—~1.8kAutomated safety check: PassNone
Devwaynesutton/markdown-site628—~854Automated safety check: PassMIT

Similar skills

  • Cometchat React V7 Patterns

    cometchat/cometchat-skills

    Framework wiring for the React v7 UI Kit across Vite, Create React App, Next.js, React Router (incl.

    129 GitHub stars~1.2k tokensUpdated 2 days ago
    Frontend & DesignAuto-check: notes
  • Admin Template Project Initializer

    southliu/south-admin-react

    Removes the south-admin-react template's demo pages, components and menu entries, after a dry-run preview and your confirmation, and cleans up the matching imports.

    580 GitHub stars~519 tokensUpdated 17 days ago
    Frontend & DesignAuto-check passed
  • South Admin CRUD Generator

    southliu/south-admin-react

    Generates a full CRUD page - page component, data model and API client - from the south-admin-react project's own VS Code snippet templates.

    580 GitHub stars~1.7k tokensUpdated 17 days ago
    Frontend & DesignAuto-check passed
  • Redesign My Landingpage

    instructa/agent-skills

    Build, critique, and iterate high-converting marketing or product landing pages using React + Vite + TypeScript + Tailwind and shadcn/ui components, with all icons sourced from Iconify.

    139 GitHub stars~1.8k tokensUpdated 8 days ago
    Frontend & DesignAuto-check passed
  • Dev

    waynesutton/markdown-site

    Full-stack Convex development guidelines covering React, Vite, TypeScript, mutations, auth, design system, and documentation practices.

    628 GitHub stars~854 tokensUpdated 4 mo ago
    Frontend & DesignAuto-check passed
  • Vite Shadcn Tailwind4

    IgorWarzocha/Opencode-Workflows

    Initialize shadcn/ui + Tailwind CSS v4 in Vite projects (Vite-specific, not Next.js/Remix).

    122 GitHub stars~1.3k tokensUpdated 8 mo ago
    Frontend & DesignAuto-check passed

More from lobehub/lobe-ui

  • Building With Lobe UI

    lobehub/lobe-ui

    Build UI with the LobeHub design ecosystem — @lobehub/ui (plus its base-ui, chat, mobile, awesome, brand, mdx, i18n namespaces), @lobehub/icons, @lobehub/charts, @lobehub/fluent-emoji and…

    2.2k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Local Testing

    lobehub/lobe-ui

    Local browser verification for the lobe-ui component library and documentation site.

    2.2k GitHub stars~2.1k tokensUpdated today
    Auto-check passed

Questions about Using Docs Kit

What does Using Docs Kit do?

Set up and author a documentation site with @lobehub/docs-kit (the lobedocs CLI, React Router + Vite static docs used by ui.lobehub.com). Using Docs Kit is an agent skill from lobehub/lobe-ui.com).

When should I use Using Docs Kit?

Using Docs Kit fits situations like: defineDocsConfig; migrate from dumi; write component docs.

How do I install Using Docs Kit in Claude Code?

Run `npx skills add lobehub/lobe-ui --skill using-docs-kit -a claude-code`. Or copy the skill folder (.agents/skills/using-docs-kit in lobehub/lobe-ui) into .claude/skills/using-docs-kit in your project. Claude Code loads it when a task matches its description.

How do I install Using Docs Kit in Codex?

Run `npx skills add lobehub/lobe-ui --skill using-docs-kit -a codex`. Or copy the skill folder (.agents/skills/using-docs-kit in lobehub/lobe-ui) into .agents/skills/using-docs-kit in your project. Codex loads it when a task matches its description.

Can I use Using Docs Kit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lobehub/lobe-ui --skill using-docs-kit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/using-docs-kit, .gemini/skills/using-docs-kit, .github/skills/using-docs-kit and .opencode/skills/using-docs-kit in your project.

What does Using Docs Kit need to run?

Going by SKILL.md and its folder, Using Docs Kit needs the command-line tools its instructions call (pnpm and tsx).

Does Using Docs Kit access the network?

SKILL.md names 2 domains. In commands or code: github.com and editor.lobehub.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Using Docs Kit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Using Docs Kit use?

Using Docs Kit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Using Docs Kit use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Using Docs Kit?

Skills that share tags, products or a category with Using Docs Kit: Cometchat React V7 Patterns (cometchat/cometchat-skills, 129 stars), Admin Template Project Initializer (southliu/south-admin-react, 580 stars), South Admin CRUD Generator (southliu/south-admin-react, 580 stars) and Redesign My Landingpage (instructa/agent-skills, 139 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Using Docs Kit?

lobehub (a GitHub organization) maintains it in lobehub/lobe-ui, which has 2,217 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 7, 2026.

Source: lobehub/lobe-ui on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.