agentleFS
hiromailyhiromaily/claude-forge/.claude/skills/docs-ssot/SKILL.md

docs-ssot

Skill3 starsChanged 8 months agoMITView on GitHub

Set up docs-ssot SSOT documentation structure — migrate existing docs, build, and validate

  • Installs packages

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Verify docs-ssot is installed:

    line 28
  2. Distinctive:

    Run a dry-run to see what sections will be created without writing any files:

    line 60
  3. Very specific:

    Create template files under template/pages/ with @include directives

    line 83
  4. Very specific:

    Create or update docsgen.yaml with build targets

    line 84
  5. Distinctive:

    Verify round-trip: build and compare output against originals

    line 85
  6. Distinctive:

    Check that all include directives resolve correctly:

    line 116
  7. Very specific:

    If duplicates are found, consolidate the content into one section file under template/sections/ and update the templates to reference it …

    line 132
  8. Distinctive:

    After migration, the ongoing workflow is:

    line 152
  9. Very specific:

    Run docs-ssot build to regenerate outputs

    line 155
  10. Distinctive:

    Add or remove targets to control which output files are generated.

    line 172

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

docs-ssot: Documentation SSOT Setup

This skill migrates existing Markdown documentation into a modular Single Source of Truth (SSOT) structure managed by docs-ssot, then builds and validates the output.

When to use this skill

  • You have existing documentation (README.md, CLAUDE.md, AGENTS.md, etc.) to manage as SSOT
  • You want to set up docs-ssot in a new or existing repository
  • You want to regenerate documentation after editing source templates

Workflow

Step 1 — Check prerequisites

Verify docs-ssot is installed:

docs-ssot version

If not installed:

# Homebrew (macOS/Linux)
brew tap hiromaily/tap && brew install docs-ssot

# or Go install
go install github.com/hiromaily/docs-ssot/cmd/docs-ssot@latest

Step 2 — Identify existing documentation files

List Markdown files in the repository root:

ls *.md

Common candidates: README.md, CLAUDE.md, AGENTS.md, CONTRIBUTING.md


Step 3 — Preview the migration plan

Run a dry-run to see what sections will be created without writing any files:

docs-ssot migrate --dry-run README.md CLAUDE.md

Review the output to understand:

  • How many sections will be created and their categories
  • Which sections are detected as duplicates (shared across files)
  • The proposed template structure under template/sections/ and template/pages/

Step 4 — Run the migration

Migrate the identified files:

docs-ssot migrate README.md CLAUDE.md AGENTS.md

This will:

  1. Split each file by H2 headings into section files under template/sections/<category>/
  2. Create template files under template/pages/ with @include directives
  3. Create or update docsgen.yaml with build targets
  4. Verify round-trip: build and compare output against originals

Step 5 — Review the generated structure

docs-ssot index

Inspect:

  • template/sections/ — modular section files (edit these, not the generated outputs)
  • template/pages/*.tpl.md — template files defining document structure
  • docsgen.yaml — build targets mapping templates to output files

Step 6 — Build documentation

Regenerate all output files from the templates:

docs-ssot build
# or, if a Makefile target exists:
make docs

Step 7 — Validate

Check that all include directives resolve correctly:

docs-ssot validate

Step 8 — Check for SSOT violations

Scan for near-duplicate sections that should be merged into a single source:

docs-ssot check

If duplicates are found, consolidate the content into one section file under template/sections/ and update the templates to reference it with @include.


Key Commands Reference

CommandPurpose
docs-ssot migrate <files>Decompose existing docs into SSOT section structure
docs-ssot migrate --dry-run <files>Preview migration without writing files
docs-ssot buildGenerate all output files from templates
docs-ssot validateCheck all include directives resolve
docs-ssot checkDetect near-duplicate sections (SSOT violations)
docs-ssot indexShow include relationships and orphan detection
docs-ssot include <template>Expand and print a template to stdout (debugging)

Editing documentation after migration

After migration, the ongoing workflow is:

  1. Edit source files in template/sections/
  2. Run docs-ssot build to regenerate outputs
  3. Verify with git diff README.md

Never edit README.md, CLAUDE.md, or AGENTS.md directly — they are overwritten on every build.


docsgen.yaml structure

targets:
  - input: template/pages/README.tpl.md
    output: README.md
  - input: template/pages/CLAUDE.tpl.md
    output: CLAUDE.md

Add or remove targets to control which output files are generated.


Include directive syntax

Templates use include directives to compose sections:

<!-- @include: sections/project/overview.md -->
<!-- @include: sections/development/ -->
<!-- @include: sections/**/*.md level=+1 -->

The optional level=+N parameter adjusts heading depth of the included content.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.