/ultra-doc:ultra-doc runs instead · from ultra-doc
AI-driven documentation system that analyzes, writes, maintains, and validates documentation automatically. Detects code changes, finds errors, and keeps docs synced with your codebase.
This skill never runs in Claude Code
It ships in ultra-doc at skills/, but /ultra-doc:ultra-doc (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
This skill enables you to intelligently manage documentation through analysis, validation, and automated fixes.
Activate this skill when:
/ultra-doc commandSingle Command, Interactive Flow:
/ultra-docHybrid Approach:
on /ultra-doc:
check_version()
analyze_current_state()
if not_installed:
present_installation_offer()
if user_accepts:
install_system()
else:
exit
else:
findings = gather_findings()
present_findings(findings)
menu = generate_contextual_menu(findings)
choice = ask_user_choice(menu)
execute_action(choice)
generate_changelog_and_report()
report_results()
System is "installed" if these exist:
context_for_llms/SECTIONS.json.ultra-doc.config.jsonIf either is missing → offer installation.
Plugin installation registers this skill but does not create project files.
The deterministic Node orchestrator does not implement an install action.
Use this conversational setup flow or the executable local example.
Preserve the target project's existing CLAUDE.md and source documentation.
When system is not installed:
Message to user:
Ultra-Doc is not installed in this repository.
Would you like to install it? I'll ask 3 quick questions to set it up.
(yes/no)
If yes, ask these questions:
Question 1: Setup Level
What level of documentation do you want?
1. Minimal - Just CLAUDE.md and basic structure
2. Standard - CLAUDE.md + core docs + JSON overlays (recommended)
3. Comprehensive - Full system with all scripts
Choose (1-3) or press Enter for Standard:
Question 2: Audience Balance
Who is the primary audience?
1. Balanced - Humans, AI, maintainers equally (recommended)
2. Human-first - Optimized for human readers
3. AI-first - Optimized for AI assistants
4. Maintainer-first - Long-term maintenance focus
Choose (1-4) or press Enter for Balanced:
Question 3: CI Integration
Add documentation validation to CI?
(yes/no) or press Enter for no:
Default to "no" if no CI system detected (.github/workflows, .gitlab-ci.yml).
After collecting answers:
1. Create config file .ultra-doc.config.json:
{
"setup_level": "standard",
"audience": "balanced",
"ci_integration": false,
"installed_at": "2026-11-06T00:00:00Z",
"version": "2.0.0"
}
Use the selected setup level and audience, the current installation time, and
the plugin version. ci_integration records the setup choice; creating and
verifying a CI job is a separate action for the agent. These fields do not
configure deterministic document filtering or humanizer tone.
2. Create directory structure:
context_for_llms/
(real source Markdown; overlays are generated by metadata sync)
context_for_humans/
reports/
scripts/ultra-doc/
(all .mjs scripts copied together from this skill)
3. Create or update CLAUDE.md at repo root (use the appropriate template
without replacing unrelated project instructions). Add source documentation to
context_for_llms/ based on the actual project.
4. Run initial analysis:
ULTRA_DOC_AUTO_ACTION=sync node scripts/ultra-doc/orchestrator.mjs
node scripts/ultra-doc/analyze-coverage.mjs
Run from the target project root. Inspect the exit code and
context_for_llms/VALIDATION.json before reporting success; Sync Complete
applies to the metadata stage and can precede a validation failure. The humanizer
is deterministic and requires review; semantic prose changes require the agent
to read the source. See the operations guide for
workflow side effects and recovery.
5. Report completion:
✓ Ultra-Doc installed successfully!
Created:
- CLAUDE.md (main documentation entry point)
- context_for_llms/ (documentation directory)
- scripts/ultra-doc/ (automation scripts)
Run /ultra-doc again to see analysis and choose actions.
When system IS installed:
Run these checks:
If JSON files don't exist yet, generate them:
node scripts/ultra-doc/analyze-doc-state.mjs
node scripts/ultra-doc/analyze-coverage.mjs
node scripts/ultra-doc/validate-accuracy.mjs
Format findings clearly (see reference.md - Findings Presentation Format for detailed format).
Based on findings, present ONLY relevant options:
If critical errors found:
What would you like me to do?
1. Fix critical errors automatically
2. Update docs for changed code files
3. Document undocumented functions
4. Run full refresh (all updates)
5. Just show detailed analysis
Choose (1-5):
If no errors but gaps exist:
Documentation is healthy! Optional improvements:
1. Document undocumented functions (5 found)
2. Enhance incomplete sections
3. Run full refresh
4. Show detailed analysis
Choose (1-4):
If everything is perfect:
✓ Documentation is 100% healthy!
No errors, no gaps, everything current.
Optional actions:
1. Run validation anyway
2. Generate coverage report
3. Exit
Choose (1-3):
Based on user's choice, execute the corresponding workflow.
What it does:
Process:
autofix-linting.mjs for deterministic fixesauto_fixable: true:
AI Safety Rules:
See reference.md - Example Fixes for detailed fix workflows.
What it does:
Process:
track-code-changes.mjs to get list of changed filesSee reference.md - Code Change Update Example for detailed workflow.
What it does:
Process:
See reference.md - Function Documentation Template for detailed template.
What it does:
Process:
sync-doc-metadata.mjs (updates timestamps, indexes, linter)generate-human-doc.mjs (translates/updates human docs)generate-changelog.mjs and generate-report.mjsWhat it does:
See reference.md - Full Analysis Report Format for complete output format.
Validation follows explicit links in CODE_POINTERS.json rather than searching blindly.
Validation Process:
Why This Works:
See reference.md - CODE_POINTERS Structure for detailed JSON schema.
For claims requiring understanding, use the validation prompt template.
If validation fails (accurate: false), add to VALIDATION.json for fixing.
See reference.md - Validation Prompt Templates for detailed prompt format.
Type 1: Factual Errors (Deterministic)
Type 2: Semantic Errors (AI)
Type 3: Completeness Errors (Hybrid)
Type 4: Staleness (Deterministic)
Type 5: Broken Examples (Hybrid)
NEVER write documentation without reading code first.
Rules:
See reference.md - Citation Format for examples.
Validation After Writing: After AI writes documentation:
Analysis Scripts:
analyze-doc-state.mjs → DOC_STATE.jsonanalyze-coverage.mjs → COVERAGE.jsonvalidate-accuracy.mjs → VALIDATION.jsontrack-code-changes.mjs → Updates DOC_STATE.jsonAuto-Fix Scripts:
autofix-linting.mjs → Fixes structure, formattingOrchestrator:
orchestrator.mjs → Selects sync, quick, validate, or summary via
ULTRA_DOC_AUTO_ACTION; there is no positional action parsersync-doc-metadata.mjs → Runs the metadata pipelineSee reference.md - Scripts Reference for complete details.
Use conventional commits for all documentation changes.
See reference.md - Commit Message Formats for examples.
After executing action, report clearly with changes made, validation results, and commit message.
See reference.md - Action Completion Report for format.
The system uses three main JSON files for tracking documentation state:
See reference.md - JSON Data Structures for complete schemas.
Single command: /ultra-doc
Interactive flow: Analyze → Present → Ask → Execute → Report
Hybrid approach: Scripts for mechanics, AI for cognition
Narrow validation: Follow CODE_POINTERS links
Hallucination prevention: Always read code, cite sources, validate
Contextual menus: Only show relevant options
This skill transforms documentation from a manual task into an automated, validated, always-current system.
reference.md (opens in a new tab)scripts/add-code-pointers.mjs (opens in a new tab)scripts/analyze-coverage.mjs (opens in a new tab)scripts/analyze-doc-state.mjs (opens in a new tab)scripts/autofix-linting.mjs (opens in a new tab)scripts/check-external-links.mjs (opens in a new tab)scripts/doc-health-hook.mjs (opens in a new tab)scripts/generate-changelog.mjs (opens in a new tab)scripts/generate-code-pointers.mjs (opens in a new tab)scripts/generate-human-doc.mjs (opens in a new tab)scripts/generate-llm-index.mjs (opens in a new tab)scripts/generate-report.mjs (opens in a new tab)scripts/generate-section-index.mjs (opens in a new tab)scripts/lint-documentation.mjs (opens in a new tab)scripts/optimize-docs.sh (opens in a new tab)scripts/orchestrator.mjs (opens in a new tab)scripts/project-fs.mjs (opens in a new tab)scripts/render-relationships.mjs (opens in a new tab)scripts/sync-doc-metadata.mjs (opens in a new tab)scripts/track-code-changes.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub justfinethanku/ultra-doc --plugin ultra-docOther plugins' skills for the same job