// Intelligent command verification for documentation. Discovers all commands in markdown files, validates them using git diff-based cache invalidation, and ensures documentation accuracy with zero token cost after initial setup. Use when asked to verify commands, check documentation, or validate command references.
| name | command-verify |
| version | 0.2.0 |
| description | Intelligent command verification for documentation. Discovers all commands in markdown files, validates them using git diff-based cache invalidation, and ensures documentation accuracy with zero token cost after initial setup. Use when asked to verify commands, check documentation, or validate command references. |
| author | Claude Code |
| categories | ["documentation","validation","automation","git"] |
| keywords | ["command","verification","documentation","cache","git-diff","validation","automation"] |
| allowed-tools | Read,Glob,Grep,Bash |
This skill provides intelligent command verification for documentation with git-aware caching. It discovers commands in markdown files, validates them, and uses git diff to only revalidate affected commands.
Invoke this skill when the user asks to:
Discovers ALL commands across ALL markdown files in the codebase.
Supported formats:
bash, shell, console, shnpm run buildTracks:
File patterns:
**/*.mdnode_modules/**, .git/**, dist/**, build/**Git diff-based intelligent cache invalidation. Zero LLM tokens after initial run.
Core principle: Only revalidate commands when relevant files change.
Process:
Invalidation rules:
*.md changed โ Revalidate commands in that filepackage.json changed โ Revalidate ALL npm commandstsconfig.json changed โ Revalidate build/typecheck commandssrc/** changed โ Revalidate test commandsCargo.toml changed โ Revalidate cargo commandsrequirements.txt changed โ Revalidate pip commandsExpected cache hit rate: 90%+ after first run
Smart command categorization and validation:
Categories:
SAFE - Auto-validate, no risk
npm run build, test, lint, typecheckgit status, git logls, cat, find)CONDITIONAL - Ask before running
npm install (modifies node_modules)npm run format (modifies source)DANGEROUS - Never auto-run
rm -rfgit push --forcenpm run clean/clear--force or --delete flagsFor each command, track:
Location: .cache/command-validations
Files:
last-validation-commit.txt - Git commit hash of last validationcommands/*.json - One file per unique command (hashed filename)Cache entry format:
{
"command": "npm run build",
"locations": [
{"file": "README.md", "line": 45, "type": "code-block"},
{"file": "docs/guide.md", "line": 23, "type": "inline"}
],
"validation": {
"validated": true,
"category": "safe",
"success": true,
"duration": 2341,
"message": "Build completed successfully"
},
"cachedAt": "2025-10-29T10:00:00Z",
"commit": "a1b2c3d4e5f6"
}
This skill uses an auto-updating knowledge base at .claude/knowledge.json that learns from corrections and user feedback.
Implicit memory requests - Auto-detect when user is correcting or teaching:
Update triggers:
When user provides a correction:
.claude/knowledge.jsoncorrections.cliNames - For CLI name fixespatterns.commandPrefixes - For new command typesvalidationRules - For safety categorizationfilePatterns.rules - For invalidation ruleslearningLog.entries with timestamp and context{
"corrections": {
"cliNames": {"wrong-name": {"correct": "right-name", "reason": "..."}}
},
"patterns": {
"commandPrefixes": ["npm", "git", "claude"]
},
"validationRules": {
"safe": [...], "conditional": [...], "dangerous": [...]
},
"learningLog": {
"entries": [{"date": "...", "type": "correction", "from": "...", "to": "..."}]
}
}
When this skill is invoked:
Memory Check Phase (ALWAYS RUN FIRST)
.claude/knowledge.json to load learned correctionscorrections.cliNamespatterns.commandPrefixesDiscovery Phase
**/*.md files (excluding node_modules, .git, dist, build)Cache Analysis Phase
.cache/command-validations/last-validation-commit.txt existsgit diff <cached-commit>..HEAD --name-only to get changed filesValidation Phase
Reporting Phase
Cache Update Phase
last-validation-commit.txtcommands/<hash>.jsonFirst run:
Subsequent runs (no changes):
Subsequent runs (with changes):
User: "Verify all commands in the documentation"
Claude's actions:
Output format:
Command Verification Report
===========================
โ Total commands discovered: 25
โ Commands from cache: 22 (88%)
โ Commands validated: 3
โ Commands skipped (dangerous): 2
โ Commands failed: 1
Failed commands:
- `npm run nonexistent` in README.md:45
Error: Script "nonexistent" not found in package.json
Cache hit rate: 88%
Token usage: 0
Time: 2.3 seconds (saved ~8s vs full validation)