Sync documentation with code. Use when user asks to update docs, check docs, fix stale documentation, update changelog, or after code changes.
View on GitHubavifenesh/awesome-slash
sync-docs
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/avifenesh/awesome-slash/blob/main/plugins/sync-docs/skills/sync-docs/SKILL.md -a claude-code --skill sync-docsInstallation paths:
.claude/skills/sync-docs/# sync-docs
Unified skill for syncing documentation with code state. Combines discovery, analysis, and CHANGELOG update into a single workflow.
## Input
Arguments: `[report|apply] [--scope=all|recent|before-pr] [path]`
- **Mode**: `report` (default) or `apply`
- **Scope**:
- `recent` (default): Files changed since last commit to main
- `all`: Scan all docs against all code
- `before-pr`: Files in current branch, optimized for /next-task Phase 11
- `path`: Specific file or directory
## Architecture
This skill orchestrates all documentation sync operations:
```
sync-docs skill
|-- Phase 1: Detect project context
|-- Phase 2: Find related docs (lib/collectors/docs-patterns)
|-- Phase 3: Analyze issues
|-- Phase 4: Check CHANGELOG
|-- Phase 5: Return structured results
```
The skill MUST NOT apply fixes directly. It returns structured data for the orchestrator to decide what to do.
## Phase 1: Detect Project Context
Detect project type and find documentation files:
```javascript
const fs = require('fs');
const path = require('path');
const glob = require('glob');
// Detect documentation files
const docFiles = [];
const commonDocs = ['README.md', 'CHANGELOG.md', 'CONTRIBUTING.md', 'docs/**/*.md'];
for (const pattern of commonDocs) {
// Use glob to find matching files
const matches = glob.sync(pattern, { cwd: process.cwd() });
docFiles.push(...matches);
}
// Detect project type from package.json, Cargo.toml, go.mod, etc.
let projectType = 'unknown';
if (fs.existsSync('package.json')) projectType = 'javascript';
else if (fs.existsSync('Cargo.toml')) projectType = 'rust';
else if (fs.existsSync('go.mod')) projectType = 'go';
else if (fs.existsSync('pyproject.toml') || fs.existsSync('setup.py')) projectType = 'python';
const context = { docFiles, projectType };
```
This phase gathers context about the project without requiring external scripts.
## Phase 2: Find Related Documentation
Use lib/collectors/docs-patterns to find