docs-hook
Skill2 starsChanged 9 days agoMITView on GitHub
Lightweight git hook integration for updating agents-docs with minimal tokens. Use this skill when updating agents-docs on commit or merge events to sync documentation — even if they just say "update the docs" or "sync the agent docs". Not for learn, agents-md.
In this repository63 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/avoid-ai-writing/AGENTS.mdAGENTS.md
- .agents/skills/do-web-doc-resolver/AGENTS.mdAGENTS.md
- .agents/skills/skill-evaluator/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- accessibility-auditorSkill
- agent-browserSkill
- agentic-abstentionSkill
- agents-mdSkill
- api-design-firstSkill
- architecture-diagramSkill
- avoid-ai-writingSkill
- cicd-pipelineSkill
- cloudflare-worker-apiSkill
- codacySkill
- codeberg-apiSkill
- code-review-assistantSkill
- css-render-performanceSkill
- database-devopsSkill
- debuggerSkill
- delegateSkill
- dependency-upgradesSkill
- dist-channel-selectionSkill
- document-rendering-and-locatorsSkill
- dogfoodSkill
- dora-reportSkill
- do-web-doc-resolverSkill
- durable-objectsSkill
- eu-ai-act-complianceSkill
- git-github-workflowSkill
- goap-agentSkill
- implementerSkill
- intent-classifierSkill
- iterative-refinementSkill
- jules-delegatorSkill
- learnSkill
- lifecycle-managementSkill
- local-context-sanitizationSkill
- memory-contextSkill
- migration-refactoringSkill
- nested-build-isolationSkill
- privacy-firstSkill
- progressive-deliverySkill
- pwa-offline-syncSkill
- reader-ui-uxSkill
- readme-best-practicesSkill
- secrets-managementSkill
- secure-invite-and-accessSkill
- security-code-auditorSkill
- shell-script-qualitySkill
- skill-creatorSkill
- skill-evaluatorSkill
- static-analysisSkill
- testing-strategySkill
- test-runnerSkill
- triz-solverSkill
- turso-dbSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 59
Done: No ML, no logging, no metrics
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Docs Hook
Ultra-lightweight documentation sync via git hooks.
When to Use
- User asks to update agents-docs on commit or merge events
- Need to sync documentation with minimal tokens
- Even if they just say "update the docs" or "sync the agent docs"
Trigger
- "git hook", "on commit", "pre-commit"
- "sync docs", "update docs"
- "merge sync", "push docs"
Usage
# Full automatic sync (recommended):
./scripts/post-commit-docs-sync.sh
# Or use the lightweight docs-sync only:
./scripts/docs-sync.sh HEAD~1 HEADAutomatic Sync on Commit
The post-commit-docs-sync.sh script provides comprehensive documentation syncing:
- Skill table updates: Regenerates AGENTS.md skill table when
.agents/skills/changes - LLM context regeneration: Updates
llms.txtandllms-full.txtwhen markdown changes - Agent registry sync: Updates
AGENTS_REGISTRY.mdwhen agent configs change - Docs file sync: Copies changed docs to appropriate directories
- Commit amendment: Automatically amends commit with updated documentation
Configuration
Environment variables control behavior:
| Variable | Default | Description |
DOCS_SYNC_ENABLED | true | Enable/disable docs sync |
DOCS_SYNC_QUIET | false | Suppress output messages |
DOCS_SYNC_LLM_TXT | true | Regenerate LLM context files |
Minimal Token Workflow
- Diff: Get changed
.mdfiles between commits - Sync: Copy to target directory
- Done: No ML, no logging, no metrics
Working Scripts
scripts/post-commit-docs-sync.sh- Full documentation sync orchestratorscripts/docs-sync.sh- Lightweight file synchronization only
See Also
learn— Extract learnings into AGENTS.mdagents-md— AGENTS.md best practices
Rationalizations
| Rationalization | Reality |
| "Docs can sync manually, no need for automation" | Manual sync is forgotten within days. Automation ensures consistency. |
| "The hook is slow, I'll skip it" | A few seconds of sync time prevents hours of out-of-date documentation debt. |
| "Only production docs need syncing" | Stale developer docs cause onboarding confusion and incorrect assumptions. |
Red Flags
- Disabling the docs hook to speed up commits
- Manually copying docs instead of using the sync script
- Ignoring sync failures after documentation changes
Voice & Context
- Default:
professional+blog - Reference:
voice-profilesskill for definitions and auto-detection.
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
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.

