Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

document-guideline

FreeNo executable scriptsNot checked

Instructs AI agents on documentation standards for design docs, folder READMEs, source code interfaces, and test cases

Synthesys-Labby Synthesys-Lab★ 71 GitHub stars19 installs in other catalogs

About this skill

Document Guideline

This skill instructs AI agents on how to maintain comprehensive documentation throughout the development lifecycle. It defines documentation standards that are enforced via pre-commit linting for structural requirements, while providing guidance on content quality and workflow integration.

Documentation Philosophy

Good documentation is:

  • Comprehensive: Covers all code files, folders, and high-level designs
  • Enforced: Structural requirements validated automatically via pre-commit linting
  • Design-first: Documentation written before implementation (following TDD approach)
  • Milestone-friendly: Documentation-code inconsistency acceptable during incremental development
  • Self-descriptive: Each file, folder, and component documents its purpose and interfaces

Documentation Types

This project maintains three levels of documentation:

  1. High-level design documents (docs/*) - Architecture and design decisions
  2. Folder organization (folder README.md files) - Purpose and file organization
  3. Code interface documentation (.md companions to source files) - External and internal APIs

High-Level Design Documentation

Location: docs/* directory

Purpose: Document architectural decisions, design rationale, and high-level project structure.

When to create/update:

  • During planning phase (before implementation)
  • When making architectural decisions
  • When introducing new subsystems or major features
  • When documenting workflows or processes

Not enforced by linting: Creating design documents requires human judgment about what constitutes a "high-level design" versus implementation details.

Content guidelines:

  • Focus on the "why" (design rationale) not just the "what"
  • Document alternatives considered and trade-offs
  • Include diagrams, workflows, or examples where helpful
  • Keep design docs synchronized with actual implementation

Examples of good design documents:

  • docs/git-msg-tags.md - Documents commit message tag standards
  • docs/developer.md - Developer workflow and contribution guidelines
  • docs/options.md - SDK configuration options and usage

When NOT to create design docs:

  • For simple implementation details (put in code .md files instead)
  • For temporary decisions or experiments
  • For information that duplicates existing documentation

Folder Organization Documentation

Requirement: Every folder (except hidden folders like .git) MUST have a README.md file.

Enforced by: Pre-commit linting (scripts/lint-documentation.sh)

Purpose: Document folder purpose and file organization so developers can quickly understand the codebase structure.

When to create:

  • When creating a new folder in the project
  • Before committing any code that introduces a new directory

Required content:

  1. Folder purpose: What is this folder for? (1-2 sentences)
  2. File organization: What types of files are in this folder?
  3. Key files: Brief description of important files (optional)

Examples of good folder README.md:

# Skills Directory

This directory contains all Claude Code skills that define AI agent behavior.

## Organization

Each skill is in its own subdirectory with a `SKILL.md` file:
- `commit-msg/` - Skill for creating meaningful git commits
- `fork-dev-branch/` - Skill for creating development branches
- `milestone/` - Skill for incremental implementation with milestone commits

## Adding New Skills

Create a new subdirectory and add a `SKILL.md` file with frontmatter defining
the skill name and description.

Format flexibility:

  • Can be brief (3-5 lines) for simple folders
  • Can be detailed for complex subsystems
  • Should reference key files if there are many files

Source Code Interface Documentation

Requirement: Every source code file MUST have a corresponding .md file documenting its interfaces.

File types requiring documentation (enforced by linting):

  • Python: *.py → *.md
  • C/C++: *.c, *.cpp, *.cxx, *.cc → *.md

Enforced by: Pre-commit linting (scripts/lint-documentation.sh)

Naming convention: Same prefix as source file

  • foo.py → foo.md
  • bar.cpp → bar.md
  • baz.c → baz.md

Required sections:

1. External Interfaces (Public APIs)

Document all interfaces exposed to external callers:

  • Public functions/methods with signatures
  • Public classes/structures with key attributes
  • Module-level exports or entry points
  • Expected inputs and outputs
  • Error conditions and exceptions

2. Internal Helpers (Private APIs)

Document internal implementation details:

  • Private functions and their purpose
  • Internal data structures
  • Helper utilities
  • Algorithms or complex logic explanations

Example interface documentation:

# validate_target_dir.sh

Script for validating target directories before SDK initialization.

## External Interface

### Command-line usage
```bash
./v
Full SKILL.md on GitHub

Install document-guideline in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

README.md

FAQ

What does the document-guideline skill do?

Instructs AI agents on documentation standards for design docs, folder READMEs, source code interfaces, and test cases

How do I install the document-guideline skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the document-guideline skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare document-guideline with