| name | docsync | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| description | Auto-generate docs from code and detect documentation drift via git hooks. Free README gen + paid living docs. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| homepage | https://docsync-1q4.pages.dev | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| metadata |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| user-invocable | true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| disable-model-invocation | false |
DocSync generates documentation from your code and keeps it in sync automatically. It uses tree-sitter for multi-language AST parsing, lefthook for git hook integration, and difftastic for semantic change detection.
Generate a one-shot README or API doc for a single file or directory.
How to execute:
bash "<SKILL_DIR>/scripts/docsync.sh" generate <target>What it does:
- Parses the target file(s) with tree-sitter to extract symbols (functions, classes, exports, types, interfaces)
- Applies the appropriate template from
<SKILL_DIR>/templates/ - Generates a markdown documentation file alongside the source
Example usage scenarios:
- "Generate docs for src/utils/auth.ts" → runs
docsync generate src/utils/auth.ts - "Document this whole directory" → runs
docsync generate src/api/ - "Create a README for this project" → runs
docsync generate .
Scan for documentation drift — find where code has changed but docs haven't been updated.
How to execute:
bash "<SKILL_DIR>/scripts/docsync.sh" drift [directory]What it does:
- Validates license key from config
- Parses all source files with tree-sitter
- Compares extracted symbols against existing documentation
- Reports: new undocumented symbols, changed signatures with stale docs, deleted symbols still in docs
- Outputs a drift report with severity levels (critical/warning/info)
Install git hooks that automatically check for doc drift on every commit.
How to execute:
bash "<SKILL_DIR>/scripts/docsync.sh" hooks installWhat it does:
- Validates Pro+ license
- Copies lefthook config to project root
- Installs lefthook pre-commit hook
- On every commit: analyzes staged files, blocks commit if critical drift detected, offers auto-regen
Remove DocSync git hooks.
bash "<SKILL_DIR>/scripts/docsync.sh" hooks uninstallAuto-regenerate stale documentation for files with detected drift.
bash "<SKILL_DIR>/scripts/docsync.sh" auto-fix [directory]Generate a comprehensive onboarding guide for new developers.
bash "<SKILL_DIR>/scripts/docsync.sh" onboarding [directory]Generate architecture documentation showing module relationships and data flow.
bash "<SKILL_DIR>/scripts/docsync.sh" architecture [directory]DocSync uses tree-sitter grammars and supports:
- JavaScript / TypeScript (including JSX/TSX)
- Python
- Rust
- Go
- Java
- C / C++
- Ruby
- PHP
- C#
- Swift
- Kotlin
Users can configure DocSync in ~/.openclaw/openclaw.json:
{
"skills": {
"entries": {
"docsync": {
"enabled": true,
"apiKey": "YOUR_LICENSE_KEY_HERE",
"config": {
"outputDir": "docs",
"templateOverrides": {},
"excludePatterns": ["**/node_modules/**", "**/dist/**", "**/.git/**"],
"languages": ["typescript", "python", "go"],
"driftThreshold": "warning",
"autoFix": false
}
}
}
}
}- Free tier works immediately with no configuration
- Pro/Team tiers require a license key from https://docsync-1q4.pages.dev
- All processing happens locally — no code is sent to external servers
- License validation is offline — no network calls needed
- Git hooks use lefthook which must be installed (see install metadata above)
- tree-sitter and difftastic are optional but recommended for best results; the skill falls back to regex-based parsing if unavailable
- If tree-sitter is not installed, fall back to regex-based symbol extraction (less accurate but functional)
- If lefthook is not installed and user tries
hooks install, prompt to install it - If license key is invalid or expired, show clear message with link to https://docsync-1q4.pages.dev/renew
- If a language grammar is not available, skip that file with a warning
The user might say things like:
- "Generate docs for this file/project"
- "Are my docs up to date?"
- "Check for documentation drift"
- "Set up auto-docs on my commits"
- "Create an onboarding guide"
- "Document the architecture"
- "What's undocumented in this codebase?"