docs-init

A command that creates a Docusaurus documentation website, including its pages, navigation, theme, and configuration. Docusaurus is a tool for publishing developer documentation from files such as Markdown.

In plain words
What is it for?
Use it to start a Docusaurus 3 site with selectable templates, TypeScript, Mermaid diagrams, search, optional versioning, and a chosen output directory.
Why use it?
It removes the need to set up the documentation project structure and common options by hand. It can also connect the site to SpecWeave living documentation and generate navigation from folders.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/anton-abyzov/specweave/docs-init
Clone the repo
git clone --depth 1 https://github.com/anton-abyzov/specweave
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,715 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00023 $0.01715
Opus 5 $0.00012 $0.00857
Sonnet 5 $0.00005 $0.00343
Haiku 4.5 $0.00002 $0.00171

Measured 3d ago against content hash 86f86b74fa6a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs-init scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/specweave/commands/docs-init.md · 339 lines

How it starts

The opening of the file, as written. The whole thing — 339 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Initialize Documentation Site

Initialize a Docusaurus documentation site with spec-driven documentation structure, living docs integration, and SpecWeave-optimized configuration.

Usage

/docs:init [options]

What I Do

  1. Scaffold Docusaurus Site: Create standard Docusaurus 3.x structure
  2. Configure Plugins: Set up Mermaid diagrams, search, versioning
  3. SpecWeave Integration: Link to .specweave/docs/ living documentation
  4. Theme Customization: Apply professional theme with dark mode
  5. Sidebar Generation: Auto-generate sidebar from directory structure

Options

  • --template <template> - Template type: classic, material, custom (default: classic)
  • --typescript - Use TypeScript configuration (default: true)
  • --mermaid - Enable Mermaid diagram support (default: true)
  • --search - Add Algolia DocSearch or local search (default: local)
  • --versioning - Enable documentation versioning (default: false)
  • --output <path> - Output directory (default: ./docs-site)

Generated Structure

docs-site/
├── docs/                    # Documentation content
│   ├── intro.md
│   ├── features/
│   ├── api/
│   └── guides/
├── blog/                    # Optional blog
├── src/
│   ├── components/         # React components
│   ├── css/               # Custom styles
│   └── pages/             # Custom pages
├── static/                # Static assets
│   ├── img/
│   └── diagrams/
├── docusaurus.config.ts   # Main configuration
├── sidebars.ts            # Sidebar configuration
├── package.json
└── tsconfig.json

SpecWeave Integration

Living Docs Auto-Sync

Automatically imports content from .specweave/docs/:

// docusaurus.config.ts
module.exports = {
  plugins: [
    [
      '@docusaurus/plugin-content-docs',
      {
        id: 'specweave-docs',
        path: '../.specweave/docs',
        routeBasePath: 'specweave',
        sidebarPath: './sidebars.ts',
      },
    ],
  ],
};

Architecture Diagrams

Read the full file on GitHub · 339 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 339 lines · 23 tokens per session scan A 86f86b74fa6a

Subscribe to this mod's changes

docs-init is a command published in the GitHub repository anton-abyzov/specweave (159 stars, last pushed 3d ago), licensed MIT. It adds 23 tokens to every session and 1,715 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.