with one click
validate-docs
// Use when reviewing or validating documentation. Checks for clarity, completeness, broken links, undefined terms, and ensures beginners can follow guides without prior knowledge of the SDK.
// Use when reviewing or validating documentation. Checks for clarity, completeness, broken links, undefined terms, and ensures beginners can follow guides without prior knowledge of the SDK.
Use when adding a new method, function, or API endpoint to the SDK. Ensures consistent implementation across all SDKs (Python, TypeScript, Java, Rust CLI) with proper types, tests, and naming conventions.
Use when adding unit or integration tests. Provides test patterns, naming conventions, and fixtures for Python (pytest), TypeScript (vitest), Java (JUnit/Mockito), and Rust.
Use when CI/CD pipeline fails. Provides systematic diagnosis for lint, type, test, and build failures across Python, TypeScript, Java, Rust, and n8n SDKs.
Load ONLY for Python code Use when writing, reviewing, or refactoring Python to ensure adherence to LBYL exception handling patterns, modern type syntax (list[str], str | None), pathlib operations, ABC-based interfaces, absolute imports, and explicit error boundaries at CLI level. Also provides production-tested code smell patterns from Dagster Labs for API design, parameter complexity, and code organization. Essential for maintaining erk's dignified Python standards.
Use when running integration tests against a real Metadata instance. Guides setup of environment variables (AI_SDK_HOST, AI_SDK_TOKEN) and runs tests that make actual API calls.
| name | validate-docs |
| description | Use when reviewing or validating documentation. Checks for clarity, completeness, broken links, undefined terms, and ensures beginners can follow guides without prior knowledge of the SDK. |
Reviews documentation for clarity, completeness, and beginner-friendliness. Ensures technical people with no prior knowledge of the SDK can succeed.
/validate-docs [path]
If no path provided, validates all docs in docs/.
from_env() usage must be preceded by showing which env vars to setAI_SDK_HOST and AI_SDK_TOKEN is documented"https://your-org.getcollate.io" not "https://metadata.example.com"../ relative paths point to existing filesRun these to check docs:
# Check for broken relative links
cd docs && for f in *.md; do grep -o '\[.*\]([^)]*\.md)' "$f" | while read link; do
target=$(echo "$link" | sed 's/.*(\([^)]*\))/\1/')
[ ! -f "$target" ] && echo "$f: broken link to $target"
done; done
# Check for undefined env var usage
grep -r "from_env()" docs/ --include="*.md" -B5 | grep -v "AI_SDK_HOST\|AI_SDK_TOKEN\|export"
# Check for placeholder URLs that should be more explicit
grep -r "example\.com\|your-server\|your-instance" docs/ --include="*.md"
| Issue | Bad | Good |
|---|---|---|
| Unexplained env vars | config = AISdkConfig.from_env() | Show export AI_SDK_HOST=... first |
| Vague host URL | https://metadata.example.com | https://your-org.getcollate.io |
| Undefined terms | "Use your bot JWT token" | "Use your bot's JWT token (from Settings > Bots)" |
| Missing prereqs | Jump straight to code | Start with "Prerequisites" section |
| Broken link | [Examples](../examples/) | Remove if folder doesn't exist |
After validation, report:
## Documentation Validation Report
### Files Checked
- docs/README.md
- docs/quickstart.md
- ...
### Issues Found
#### Critical (must fix)
1. **docs/README.md:15** - Uses `from_env()` without showing which env vars to set
2. **docs/quickstart.md:42** - Links to non-existent `../examples/` folder
#### Warnings (should fix)
1. **docs/langchain.md:8** - No Prerequisites section
2. **docs/async.md:23** - Uses "Metadata server" instead of "OpenMetadata/Collate"
### Passed Checks
- All code examples have explicit credentials
- Troubleshooting section exists in quickstart.md
- ...
from_env() without showing the env vars first