Claude Code toolbox
Two small public tools for working with coding agents: docs that stay current without model calls in git hooks, and a prompt-template generator.
- 2 Public tools
- 5 Hook scripts in auto-docs
- 53 Auto-docs test cases passing
- 0 Network calls in the auto-docs pre-commit path
github.com/pratikgh0se, 2026-10-27; auto-docs-skill hooks/, 2026-10-27; auto-docs-skill tests/run-tests.sh, 2026-10-27; auto-docs-pre-commit.sh, read in full, 2026-10-27
Run it past auto-docs
Pick a sample event, such as ending a session with uncommitted work, committing staged files, or running in a repo with a no-docs file, and see which auto-docs hook fires and what it does. A sample commit shows the changelog entry the pre-commit hook appends. Everything is simulated in the page, with no network.
Problem
Two small problems kept coming up when I worked with coding agents.
Project docs go stale. A hook can see that work happened, but it cannot decide what is worth writing down. A model has to decide that, and a git hook is the wrong place to call one (auto-docs-skill design spec, 2026-08-19).
The second is smaller. I wanted a quick way to turn a plain task description into a reusable prompt template, using Anthropic's published method instead of writing prompts from a blank page (meta-prompt-skill README).
Constraints
- Both are add-ons to Claude Code. I do not control the host, so I work through hooks and skills.
- A git hook must be deterministic. In auto-docs the pre-commit hook has no network path, and any model call waits for a person to say yes.
- The installer must not surprise anyone. It has a dry-run mode, writes backups and prints a rollback script.
- Nothing is switched on silently. Auto-docs honours a
.claude/no-docsfile. - Both repos are public.
Approach
auto-docs-skill
Auto-docs v2 splits the job by who is able to decide.
Claude finishes a turn
|
v
Stop hook: any git changes? -- no --> silent
| yes (once per repo and session)
v
Claude asks: "Document this work?"
| you say yes
v
auto-docs-write workflow updates the docs that apply
git commit
|
v
pre-commit hook: append a line to docs/CHANGELOG.md, no network
|
v
optional post-commit hook: update a bounded review block in an open GitLab MR
- Stop hook. It counts tracked, staged and untracked changes, tells Claude once per repository and session, and Claude asks
Document this work?before running the writer. - Pre-commit hook. It adds a deterministic line to
docs/CHANGELOG.mdand stages it in the same commit. It contains no network code. - Post-commit hook (optional). It replaces one bounded review block in an open GitLab merge request. It needs a
GITLAB_TOKENand only talks to hosts on an allowlist (AUTO_DOCS_GITLAB_HOSTS, defaultgitlab.com). - Opt out.
touch .claude/no-docsturns all of it off for a project. - Installer. Dry run, apply, and a rollback script that restores what was replaced and removes what was new. It is Bash, Node and
jq.
meta-prompt-skill
A Claude Code skill plus a Python script. You give it a task and, optionally, variable names, and it produces a prompt template with XML tags, examples and {$VARIABLE} placeholders, using Anthropic's metaprompt technique. The metaprompt text is Anthropic's, from the claude-cookbooks repository, and the repo credits it. update-metaprompt.py fetches the latest notebook from the cookbook, compares a SHA-256 of the text with the local copy, and updates it only if it changed (it also has a check-only mode).
The two repos are auto-docs-skill and meta-prompt-skill.
What shipped
- auto-docs-skill (created 2026-06-26): five hook scripts, the
auto-docs-writeworkflow, a skill file and an installer with dry run, apply and rollback. - meta-prompt-skill (created 2026-08-04): the skill, the generator script and the updater.
- A spec and plan for auto-docs, in its repo under
docs/superpowers/. - This Lab page, with a small toy that runs sample events past the auto-docs hooks.
Outcome
I ran the auto-docs test suite on 2026-10-27 and everything passed: 53 cases (tests/run-tests.sh). They cover the Stop hook, the pre-commit hook, the post-commit hook, the installer and rollback, and the workflow contract. They use disposable repositories and never call GitLab.
I have no usage numbers for either tool. These are test results, not measured outcomes.
What I learned
A hook that edits files must run before Git builds the commit. An earlier auto-docs hook ran late and could stage a second CHANGELOG edit after Git had captured the commit tree. So the pre-commit hook owns that edit, and a no-op prepare-commit-msg hook replaces the old one (auto-docs-skill README and design spec).
Text copied from upstream goes stale, so the meta-prompt repo has an updater that checks the upstream hash before it writes anything.
How AI built this
I built these with Claude Code agents, working from written specs and plans. auto-docs-skill has a docs/superpowers/ folder with a design spec (2026-08-19) and the implementation plan. meta-prompt-skill has no spec or plan in its repo.
auto-docs-skill has a test suite of 53 cases. The repo does not say who wrote those tests or whether the author had seen the code, so I make no claim about that. I have no record of which model wrote which file.