This skill helps you generate agent-ready project documentation using Dewey, creating AGENTS.md, llms.txt, and install.md for AI agents.
npx playbooks add skill arach/dewey --skill dewey-docs
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 @deweydocs/dewey
# or
npm install @deweydocs/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 @deweydocs/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 '@deweydocs/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](https://installmd.org):
curl -fsSL url/install.mdEach 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 '@deweydocs/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 '@deweydocs/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 '@deweydocs/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+)Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.