code-doc

Generate Markdown and JSON codebase documentation with AST parsing and complexity metrics.

9|3|Updated Oct 24, 2025
One-click install
npx skills add https://github.com/tylerburleigh/claude-sdd-toolkit --skill code-doc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-doc
Source: https://github.com/tylerburleigh/claude-sdd-toolkit/tree/main/skills/code-doc
Command: npx skills add https://github.com/tylerburleigh/claude-sdd-toolkit --skill code-doc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tree-sitter, tree-sitter-python, tree-sitter-javascript, tree-sitter-go, tree-sitter-html, tree-sitter-css, jsonschema.

What problem does it solve?

This Skill eliminates the manual burden of creating and maintaining codebase documentation, providing both human-readable Markdown and machine-readable JSON output across multiple programming languages. It helps you quickly understand unfamiliar codebases and generate optimized context for AI assistants.

Core Features & Use Cases

  • Multi-Language Support: Documents Python, JavaScript/TypeScript, Go, HTML, CSS, and more, with AST parsing and complexity metrics.
  • AI-Enhanced Documentation: Uses multi-agent AI consultation (e.g., Cursor-Agent, Gemini) to synthesize architecture and AI assistant context.
  • Code Metrics & Analysis: Includes AST parsing, dependency analysis, and complexity metrics to highlight code quality and refactoring needs.
  • Use Case: Onboard a new developer to a legacy project by generating comprehensive ARCHITECTURE.md and AI_CONTEXT.md files, giving them an instant, AI-synthesized overview of the system's design and key components.

Quick Start

Option 1 (Recommended): AI-Enhanced Documentation

Gathers research from AI tools, main agent synthesizes ARCHITECTURE.md and AI_CONTEXT.md

sdd doc analyze-with-ai <directory> --name ProjectName --version X.Y.Z --verbose

Option 2: Structural Documentation Only (no AI required)

Generates DOCUMENTATION.md and documentation.json

sdd doc generate <directory> --name ProjectName --version X.Y.Z --format both --verbose

Validate the generated JSON documentation

sdd doc validate-json ./docs/documentation.json