skills/dewey-docs/SKILL.md
Generate AI-agent-ready documentation and static doc sites using Dewey. Use when asked to "set up docs", "create documentation", "make docs agent-friendly", "generate AGENTS.md", "add llms.txt", or "create a doc site".
npx skillsauth add arach/dewey dewey-docsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Dewey generates AI-agent-ready documentation for software projects. It creates AGENTS.md, llms.txt, docs.json, install.md files, and can scaffold complete static doc sites from markdown.
Activate this skill when the user asks to:
pnpm add @arach/dewey
# or
npm install @arach/dewey
| Command | Purpose |
|---------|---------|
| dewey init | Create docs/ folder and dewey.config.ts |
| dewey audit | Check documentation completeness |
| dewey generate | Create AGENTS.md, llms.txt, docs.json, install.md |
| dewey create | Scaffold a static Astro doc site from markdown |
| dewey agent | Score agent-readiness (0-100 scale) |
# 1. Install
pnpm add @arach/dewey
# 2. Initialize
npx dewey init
# 3. Generate agent files
npx dewey generate
This creates:
docs/
├── overview.md
├── quickstart.md
├── AGENTS.md # Combined agent context
└── llms.txt # Plain text summary
dewey.config.ts # Configuration
dewey create scaffolds a complete static doc site from a folder of markdown:
npx dewey create my-docs --source ./docs --theme ocean
cd my-docs && pnpm install && pnpm dev
import { defineConfig } from '@arach/dewey'
export default defineConfig({
project: {
name: 'my-project',
tagline: 'A brief description',
type: 'npm-package', // or 'cli-tool', 'macos-app', 'react-library', 'monorepo', 'generic'
},
agent: {
// Critical rules agents MUST follow
criticalContext: [
'Always use TypeScript',
'Run tests before committing',
],
// Key directories for navigation
entryPoints: {
'Source': 'src/',
'Tests': 'tests/',
'Config': 'config/',
},
// Pattern-based instructions
rules: [
{ pattern: '*.test.ts', instruction: 'Use vitest for testing' },
{ pattern: 'src/api/*', instruction: 'Follow REST conventions' },
],
// Docs to include in AGENTS.md
sections: ['overview', 'quickstart', 'api'],
},
docs: {
path: './docs',
output: './',
required: ['overview.md', 'quickstart.md'],
},
// For install.md generation (installmd.org standard)
install: {
objective: 'Set up the development environment',
doneWhen: {
command: 'npm test',
expectedOutput: 'All tests passed',
},
prerequisites: ['Node.js 18+', 'pnpm'],
steps: [
{ description: 'Install dependencies', command: 'pnpm install' },
{ description: 'Run tests', command: 'pnpm test' },
],
},
})
| Type | Best For |
|------|----------|
| npm-package | Published npm packages |
| cli-tool | Command-line tools |
| macos-app | macOS applications |
| react-library | React component libraries |
| monorepo | Multi-package workspaces |
| generic | Other projects |
Combined documentation with critical context for AI agents:
Plain text summary optimized for LLM context windows:
Structured JSON for programmatic access:
LLM-executable installation instructions following installmd.org:
curl url/install.md | claudeEach doc page should have two versions:
docs/
├── overview.md # Human-readable (prose, examples)
├── agent/
│ └── overview.agent.md # Agent-optimized (dense, structured)
Agent versions should be:
Dewey provides 22 components for building documentation sites:
DocsApp - Complete docs site with routingDocsLayout - Main layout (sidebar, TOC, navigation)Header - Sticky header with theme toggleSidebar - Left navigation panelTableOfContents - Right minimap with scroll-spyMarkdownContent - Renders markdown with syntax highlightingCodeBlock - Code with copy buttonCallout - Alert boxes (info, warning, tip, danger)Tabs - Tabbed contentSteps - Numbered instructionsCard, CardGrid - Content cardsFileTree - Directory visualizerApiTable - Props/params tableBadge - Status indicatorsAgentContext - Collapsible agent content blockPromptSlideout - Interactive prompt editorCopyButtons - "Copy for AI" buttonDeweyProvider - Theme and component contextimport { DeweyProvider } from '@arach/dewey'
<DeweyProvider theme="neutral">
{/* Your docs */}
</DeweyProvider>
Available themes:
neutral | ocean | emerald | purple | dusk | rose | github | warm
Dewey includes LLM prompt templates for documentation workflows:
Reviews documentation quality, catches drift from codebase:
import { docsReviewAgent } from '@arach/dewey'
const prompt = docsReviewAgent.reviewPage
.replace('{DOC_FILE}', 'docs/api.md')
.replace('{SOURCE_FILES}', 'src/types/index.ts')
.replace('{OUTPUT_FILE}', '.dewey/reviews/api.md')
Critiques page structure and visual design — heading hierarchy, information density, component usage, visual rhythm, reading flow:
import { docsDesignCritic } from '@arach/dewey'
const prompt = docsDesignCritic.critiquePage
.replace('{DOC_FILE}', 'docs/quickstart.md')
.replace('{OUTPUT_FILE}', '.dewey/reviews/quickstart-design.md')
Generates install.md files following installmd.org standard.
Creates interactive prompt configs for PromptSlideout components.
npx dewey initdocs/docs/agent/*.agent.md with structured contentdewey.config.tsnpx dewey generate creates AGENTS.md, llms.txt, etc.npx dewey audit checks completenessnpx dewey agent rates agent-readiness (target: 80+)Human version (docs/api.md):
# API Reference
The API provides methods for managing users...
## createUser(options)
Creates a new user with the specified options.
### Parameters
- `name` - The user's display name
- `email` - Email address (must be unique)
Agent version (docs/agent/api.agent.md):
# API Reference
## createUser
| Param | Type | Required | Default |
|-------|------|----------|---------|
| name | string | yes | - |
| email | string | yes | - |
| role | 'admin' \| 'user' | no | 'user' |
Returns: `Promise<User>`
Throws: `DuplicateEmailError` if email exists
When setting up Dewey for a project:
dewey.config.ts with appropriate project typedewey init to scaffold docs structuredewey generatedewey agent (target score: 80+)documentation
Fetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
documentation
Maintain the OpenClaw memory wiki vault with deterministic pages, managed blocks, and source-backed updates.
documentation
Feishu knowledge base navigation. Activate when user mentions knowledge base, wiki, or wiki links.
documentation
Feishu permission management for documents and files. Activate when user mentions sharing, permissions, collaborators.