pre-commit-docs

Validate staged code changes against documentation and CLAUDE.md references.

3|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/NimbusPowered/Nimbus --skill pre-commit-docs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit-docs
Source: https://github.com/NimbusPowered/Nimbus/tree/main/.claude/skills/pre-commit-docs
Command: npx skills add https://github.com/NimbusPowered/Nimbus --skill pre-commit-docs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents documentation and the CLAUDE.md project reference from drifting out of date with code changes, avoiding incorrect or stale guidance being committed.

Core Features & Use Cases

  • Staged-change impact analysis: Detects what code paths were modified in and around api, events, console commands, configuration, scaling, proxying, and related modules to determine which docs may need updates.
  • Targeted CLAUDE.md verification: Confirms key CLAUDE.md sections (modules, architecture tree, tech stack, configuration, patterns, and API details) still match the current codebase.
  • Minimal, precise doc updates: Flags only the documentation that actually contradicts or is missing information, instead of rewriting entire sections.
  • Pre-commit enforcement flow: Runs automatically on git commit via a PreToolUse hook, with a manual fallback invocation.

Quick Start

Commit your changes and ensure the documentation check runs automatically before the commit finalizes.

Frequently Asked Questions about pre-commit-docs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep CLAUDE.md and documentation in sync before a git commit?

To keep CLAUDE.md and documentation in sync before a git commit, use a pre-commit validation flow that analyzes staged changes across API, config, and module boundaries to detect discrepancies and produce minimal doc updates automatically.

Why does my project reference documentation drift out of date with code changes?

Project reference documentation drifts out of date because staged code modifications are not automatically mapped to their corresponding documentation targets. Validating specific CLAUDE.md sections against the codebase before finalizing commits prevents this stale guidance.

How to verify CLAUDE.md architecture and API sections match the current codebase?

To verify CLAUDE.md architecture and API sections match the current codebase, run a targeted verification check that compares modules, tech stack, configuration, and patterns against staged changes, flagging only contradictory or missing information for update.

Does pre-commit documentation checking work for API and config scaling changes?

Pre-commit documentation checking works for API and config scaling changes by detecting modified code paths in those areas, determining which docs need updates, and applying only the precise corrections required to maintain project synchronization.

What is the best way to enforce minimal documentation updates on git commit?

The best way to enforce minimal documentation updates on git commit is running a PreToolUse hook that maps changed code areas to specific documentation targets, ensuring only sections with actual discrepancies are rewritten instead of entire files.

Can I manually invoke documentation synchronization if the pre-commit hook fails?

You can manually invoke documentation synchronization as a fallback invocation if the automatic pre-commit hook does not run, ensuring staged changes are still analyzed for documentation and CLAUDE.md reference discrepancies before finalizing.