Claude-skill-registry cui-documentation
General documentation standards for README, AsciiDoc, and technical documentation
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/cui-documentation" ~/.claude/skills/majiayu000-claude-skill-registry-cui-documentation && rm -rf "$T"
skills/data/cui-documentation/SKILL.mdCUI Documentation Skill
Standards for writing clear, maintainable technical documentation in CUI projects.
Note: This skill covers general documentation. For code documentation, use:
for Java code documentationcui-javadoc
for JavaScript documentationcui-frontend-development/jsdoc-standards.md
Workflow
Step 1: Load Applicable Documentation Standards
CRITICAL: Load current documentation standards based on context.
-
Always load core documentation standards:
Read: standards/documentation-core.md -
Conditional loading based on context:
-
If creating or editing README files:
Read: standards/readme-structure.md -
If working with AsciiDoc files:
Read: standards/asciidoc-formatting.md -
If reviewing tone, style, or language (or comprehensive reviews):
Read: standards/tone-and-style.md -
If organizing, restructuring, or reviewing documentation structure:
Read: standards/organization-standards.md
-
-
Extract key requirements from all loaded standards
-
Store in working memory for use during task execution
Step 2: Analyze Existing Documentation
When to Execute: After loading standards
What to Analyze:
-
General Documentation Quality:
- Check tone and style (see documentation-core.md for requirements)
- Verify no marketing language or promotional wording
- Validate factual descriptions with sources
- Review technical precision
- Check for conciseness and clarity
-
Tone and Style (if tone-and-style.md loaded):
- Identify marketing language and subjective claims
- Check for qualification patterns ("production-proven", "extensively tested")
- Verify no transitional markers (status indicators, TODO items)
- Ensure objective vs subjective language compliance
- Review for promotional wording and self-praise
- Validate all claims are verifiable or attributed
-
Organization and Structure (if organization-standards.md loaded):
- Verify document follows single-aspect principle
- Check document size (50-400 lines)
- Validate file naming (kebab-case)
- Identify duplicate content across documents
- Check for transitional/status markers
- Assess cross-reference integrity
- Review logical document organization
-
AsciiDoc Format (if .adoc files):
- Verify document header with required attributes
- Check cross-reference syntax (
format)xref: - CRITICAL: Validate blank lines before all lists
- Review code block formatting with language specification
- Check section hierarchy and numbering
-
README Structure (if README files):
- Verify title and description
- Check Maven coordinates placement
- Review core concepts section
- Validate usage examples completeness
- Check configuration documentation
- Review best practices section
-
Content Quality:
- Only existing code/features documented
- All references verified to exist
- RFC references must be relevant (see documentation-core.md for verification requirements)
- Consistent terminology used
- Code examples from unit tests
- All public APIs documented
Step 3: Apply Documentation Standards
When to Execute: During documentation creation or review
What to Apply:
-
Core Documentation Principles:
- Professional, neutral, objective tone
- No marketing or promotional language
- Technical precision with verifiable sources
- Concise, clear language
- Document only existing features
- Use linking instead of duplication
-
AsciiDoc Formatting (if .adoc files):
README Files (README.adoc, */README.adoc):
- Use
(NOT:toc: macro
):toc: left - Place
manually where TOC should appeartoc::[] - Example header:
= Module Name :toc: macro :toclevels: 3 :sectnums: :source-highlighter: highlight.js Brief module description. toc::[] == Core Concepts
General Documentation Files (not READMEs):
- Use
for automatic left sidebar TOC:toc: left - Do NOT use
:toc: macro - Example header:
= Document Title :toc: left :toclevels: 3 :toc-title: Table of Contents :sectnums: :source-highlighter: highlight.js
All AsciiDoc Files:
- Use
for cross-referencesxref:path/to/file.adoc[Link Text] - ALWAYS add blank line before lists
- Specify language in code blocks
- Follow proper section hierarchy
- Use
-
README Structure (if README files):
- Title and brief description
- Maven coordinates immediately after description
- Core Concepts section
- Detailed Component Documentation with links to source
- Usage Examples (complete, working code)
- Configuration section
- Best Practices
- Technical Details
- Related Documentation
-
Code Examples:
- Must be complete and compilable (see documentation-core.md for requirements)
- Include all necessary imports
- Show proper error handling
- Follow project coding standards
- Be verified by unit tests
- Use clear variable names
- Include comments for complex steps
- Configuration placeholders must be clearly identified
Step 4: Verify Documentation Quality
When to Execute: After creating or updating documentation
Quality Checks:
-
Tone and Style Verification:
- Professional, neutral tone
- No marketing language
- Factual descriptions
- Technical precision
- Concise language
-
AsciiDoc Format Verification (if .adoc):
- Document header complete
- Cross-references use
syntaxxref: - Blank lines before all lists
- Code blocks have language specification
- Section hierarchy correct
-
README Structure Verification (if README):
- Title and description present
- Maven coordinates included
- Core concepts documented
- Usage examples complete
- Configuration documented
- Best practices included
-
Content Quality Verification:
- Only existing features documented
- All references verified
- Consistent terminology
- Code examples from tests
- All public APIs documented
-
Build Verification (if applicable):
# Verify documentation builds successfully mvn clean install -DskipTests
Step 5: Automated Validation (AsciiDoc)
When to Execute: After creating or updating AsciiDoc files
Available Validation Scripts:
This skill includes two validation scripts in the
scripts/ directory:
-
- Format validation scriptasciidoc-validator.sh- Validates AsciiDoc format compliance
- Checks for blank lines before lists
- Verifies section header formatting
- Detects list syntax issues
Usage:
# Validate a single file scripts/asciidoc-validator.sh path/to/file.adoc # Validate all files in a directory scripts/asciidoc-validator.sh directory/ -
- Link verification scriptverify-adoc-links.py- Validates cross-reference links
- Checks for broken file references
- Verifies anchor existence
- Detects deprecated syntax
Usage:
# Verify links in a single file python3 scripts/verify-adoc-links.py --file path/to/file.adoc --report target/links.md # Verify links in directory (non-recursive) python3 scripts/verify-adoc-links.py --directory directory/ --report target/links.md # Verify links recursively python3 scripts/verify-adoc-links.py --directory directory/ --recursive --report target/links.md
Validation Workflow:
-
Run format validation:
scripts/asciidoc-validator.sh target_file_or_directory 2>&1 -
Run link verification:
mkdir -p target/asciidoc-reviewer python3 scripts/verify-adoc-links.py --file target.adoc --report target/asciidoc-reviewer/links.md 2>&1 -
Distinguish link validation results:
- Syntax Valid + Target Exists: ✅ Link is correct
- Syntax Valid + Target Missing: ❌ Reference to non-existent file
- Common cause: Documentation for planned/future features
- Action: Either create the target document or remove the reference
- Do NOT leave references to non-existent files
- Syntax Invalid: ❌ Malformed cross-reference
- Fix syntax to use proper
formatxref:path[text]
- Fix syntax to use proper
-
Review validation output and fix issues
-
Re-run validation to confirm fixes
Script Paths:
- Scripts are located in the skill directory at:
andscripts/asciidoc-validator.shscripts/verify-adoc-links.py - When running from project root, use relative path from current working directory
- Scripts require execution from a location where relative paths to AsciiDoc files are correct
Step 6: Document Changes and Commit
When to Execute: After verification passes
Commit Standards:
- Follow standard commit message format
- Reference related issues
- Document significant documentation changes
- Add co-authored-by line for Claude Code
Common Documentation Patterns
AsciiDoc Document Header
= Document Title :toc: left :toclevels: 3 :toc-title: Table of Contents :sectnums: :source-highlighter: highlight.js == Purpose Brief description of the document's purpose. == Related Documentation * xref:other-document.adoc[Other Document] * xref:../category/document.adoc[Category Document]
README Structure Example
= Module Name Concise description of the module's purpose and key features. == Maven Coordinates [source, xml] ---- <dependency> <groupId>group.id</groupId> <artifactId>artifact-id</artifactId> </dependency> ---- == Core Concepts === Feature One * Capability details * Integration points * Key benefits == Usage Examples === Basic Usage [source,java] ---- // Complete code example ---- == Configuration === Property Configuration [source,properties] ---- # Configuration examples ----
Code Block with Language
[source,java] ---- @Test void shouldValidateToken() { // Test implementation } ----
Error Prevention
Common Documentation Issues
- Missing Blank Line Before List: AsciiDoc grammar requires blank line
- Wrong Cross-Reference Syntax: Use
notxref:link: - Missing Language Specification: Always specify language in code blocks
- Marketing Language: Use neutral, factual descriptions
- Incomplete Code Examples: Provide complete, compilable examples
Quality Violations
- Promotional Tone: "Our amazing feature" → "Feature X provides..."
- Incomplete Header: Missing required document attributes
- Invalid References: Links to non-existent files
- Speculative Documentation: Documenting planned features
- Duplicate Content: Copy-paste instead of cross-reference
Quality Verification
All documentation must pass:
- Professional, neutral tone
- Proper AsciiDoc formatting
- Complete code examples
- Verified references
- Consistent terminology
- No marketing language
- Documents only existing features
References
All documentation standards are located in the
standards/ directory:
- Core documentation principles: standards/documentation-core.md
- Tone and style requirements: standards/tone-and-style.md
- Organization and structure: standards/organization-standards.md
- AsciiDoc formatting guidelines: standards/asciidoc-formatting.md
- README structure patterns: standards/readme-structure.md