Thank you for contributing to the Enhanced Claude Code Documentation Mirror!
This project extends ericbuess/claude-code-docs as a native Claude Code plugin:
Core Principle: Plugin-First Architecture
- All user-facing features delivered via Claude Code plugin (skills, commands, hooks)
- Shell scripts in skills provide search capabilities — zero Python dependency for users
- Python modules in
scripts/are CI-only (fetching docs, building search index, validation) - Single installation path: plugin marketplace
Design Goals:
- Zero dependencies: Plugin works with just Claude Code — no Python, jq, or curl required on user machines
- Skill-based search: Content search and fuzzy matching via shell scripts in plugin skills
- CI integrity: Python scripts continue powering GitHub Actions workflows unchanged
- Testing: CI test suite covers Python modules; plugin skills tested manually
This project uses clear URL conventions:
For functional purposes, use costiash/claude-code-docs:
- Installation scripts
- Issue tracking and bug reports
- GitHub Actions / CI/CD
- Pull requests
- Status badges
Examples:
# Installation
curl -fsSL https://raw.githubusercontent.com/costiash/claude-code-docs/main/install.sh | bash
# Issues
https://github.com/costiash/claude-code-docs/issues
# Actions
https://github.com/costiash/claude-code-docs/actionsFor attribution and credit, use ericbuess/claude-code-docs:
- "Built on" acknowledgments
- "Forked from" references
- Upstream compatibility notes
- Contribution guidance to original project
Examples:
Built on [ericbuess/claude-code-docs](https://github.com/ericbuess/claude-code-docs)
For upstream contributions, see [ericbuess/claude-code-docs](https://github.com/ericbuess/claude-code-docs)Required for all contributors:
- Git
- Bash
- Basic understanding of Claude Code
For Python features:
- Python 3.9+
- pip package manager
# Fork on GitHub, then:
git clone https://github.com/YOUR_USERNAME/claude-code-docs.git
cd claude-code-docs
# Add upstream remote
git remote add upstream https://github.com/costiash/claude-code-docs.gitWorking on search skills, commands, or hooks:
cd claude-code-docs
# Test search scripts manually
DOCS_DIR=./docs ./plugin/skills/claude-docs/scripts/content-search.sh "hooks"
DOCS_DIR=./docs ./plugin/skills/claude-docs/scripts/fuzzy-search.sh "agent sdk"
DOCS_DIR=./docs ./plugin/skills/claude-docs-validate/scripts/validate-paths.sh --quick
# Test the plugin in Claude Code
# Install from local source:
/plugin install claude-docs@/path/to/claude-code-docs/pluginFiles to work on:
plugin/commands/docs.md—/docscommand routerplugin/skills/claude-docs/SKILL.md— Search skill instructionsplugin/skills/claude-docs/scripts/— Search shell scriptsplugin/skills/claude-docs-validate/— Validation skillplugin/skills/claude-docs-course/— Interactive course generator (Obsidian & Amber theme)plugin/skills/claude-docs-changelog/— Changelog report generatorplugin/hooks/— SessionStart sync hook
Working on documentation fetching, search indexing, or CI validation (these run in GitHub Actions, not on user machines):
# Setup Python virtual environment
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install in development mode
pip install -e ".[dev]"
# Run tests (REQUIRED before submitting PR)
pytest tests/ -v # All tests must pass
# Test specific changes
python scripts/lookup_paths.py "your test query"
python scripts/fetch_claude_docs.py --helpFiles to work on:
scripts/fetch_claude_docs.py- Documentation fetcher with auto-regenerationscripts/lookup_paths.py- Search & validationscripts/build_search_index.py- Full-text search indexingtests/- Test suite (runpytest --collect-only -qto see current count)
Style Guide:
- Use
set -euo pipefailat top - Sanitize ALL user inputs (alphanumeric + safe chars only)
- Comment complex logic
- UPPERCASE for environment variables
- Test on both macOS and Linux
Example:
#!/bin/bash
set -euo pipefail
# Claude Code Docs Helper
# Handles documentation lookups with feature detection
DOCS_DIR="${HOME}/.claude-code-docs/docs"
TOPIC="${1:-}"
# Sanitize input to prevent injection
TOPIC="$(echo "$TOPIC" | tr -cd '[:alnum:]-_')"
if [[ -z "$TOPIC" ]]; then
echo "Usage: $0 <topic>"
exit 1
fi
# Implementation...Style Guide:
- Python 3.9+ features encouraged
- Type hints required on all function signatures
- Docstrings required (Google style)
- Follow PEP 8 (max line length: 100 chars)
- Descriptive variable names (lowercase_with_underscores)
- Format with
black(optional but recommended)
Example:
#!/usr/bin/env python3
"""
Path search and validation tool.
Provides fuzzy search and HTTP validation for Claude documentation paths.
"""
from typing import List, Optional
import json
def search_paths(query: str, limit: int = 20, category: Optional[str] = None) -> List[str]:
"""
Search for documentation paths matching the query.
Uses fuzzy matching with Levenshtein distance for relevance ranking.
Args:
query: Search term (supports partial matches)
limit: Maximum results to return (default: 20)
category: Optional category filter (e.g., "core_documentation")
Returns:
List of matching paths, sorted by relevance score
Raises:
ValueError: If query is empty or limit is negative
Example:
>>> search_paths("prompt engineering", limit=5)
['/en/docs/build-with-claude/prompt-engineering/overview', ...]
"""
if not query:
raise ValueError("Query cannot be empty")
if limit < 0:
raise ValueError("Limit must be non-negative")
# Implementation...
return []All documentation files follow a consistent naming convention:
# Claude Code CLI docs (from code.claude.com)
claude-code__<page>.md
# Platform docs (from platform.claude.com)
docs__en__<section>__<page>.md
| Source URL | Filename |
|---|---|
code.claude.com/docs/en/hooks |
claude-code__hooks.md |
platform.claude.com/en/docs/api/messages/create |
docs__en__api__messages__create.md |
platform.claude.com/en/docs/agent-sdk/python |
docs__en__agent-sdk__python.md |
- Lowercase only
- Double underscores for path separators
- No special characters except alphanumeric, hyphens, underscores
- Keep
.mdextension - Place in
docs/directory claude-code__prefix for CLI docs,docs__en__prefix for platform docs
Test search scripts on both macOS and Linux:
# Content search
DOCS_DIR=./docs ./plugin/skills/claude-docs/scripts/content-search.sh "hooks"
# Fuzzy search
DOCS_DIR=./docs ./plugin/skills/claude-docs/scripts/fuzzy-search.sh "agent sdk"
# Validation (quick mode)
DOCS_DIR=./docs ./plugin/skills/claude-docs-validate/scripts/validate-paths.sh --quick
# Or install the plugin locally and test via /docs command
/plugin install claude-docs@/path/to/claude-code-docs/pluginAll new Python code must have unit tests.
Running tests:
# Run all tests
pytest
# Run specific test suites
pytest tests/unit/
pytest tests/integration/
pytest tests/validation/
# Check coverage
pytest --cov=scripts --cov-report=html
pytest --cov=scripts --cov-report=term
# Run specific test file
pytest tests/unit/test_lookup_functions.py -v
# Verbose output
pytest -v
# Stop on first failure
pytest -xWriting tests:
# tests/unit/test_search.py
import pytest
from scripts.lookup_paths import search_paths
def test_search_paths_basic():
"""Test basic path search functionality."""
results = search_paths("hooks")
assert len(results) > 0
assert any("hooks" in path.lower() for path in results)
def test_search_paths_empty_query():
"""Test that empty query raises ValueError."""
with pytest.raises(ValueError, match="Query cannot be empty"):
search_paths("")
def test_search_paths_with_limit():
"""Test limit parameter."""
results = search_paths("mcp", limit=5)
assert len(results) <= 5Current test status:
Run pytest tests/ -v — all tests must pass before submitting a PR.
[scope] Brief description
Examples:
[fix] Update outdated path counts in helper script
[feat] Add full-text content search
[docs] Clarify installation methods in README
[test] Add tests for auto-regeneration feature
## Summary
[Brief description of changes]
## Changes Made
- Change 1
- Change 2
- Change 3
## Testing
- [ ] All tests pass (pytest)
- [ ] Coverage maintained or improved
- [ ] Manual testing completed
- [ ] Works without Python (if touching shell scripts)
- [ ] Works with Python 3.9+ (if touching Python code)
## Documentation
- [ ] Updated relevant docs (README, CLAUDE.md, etc.)
- [ ] Added docstrings to new functions
- [ ] Updated examples if needed
## Related Issues
Fixes #123- Automated Checks: CI/CD runs tests automatically
- Code Review: Maintainer reviews code quality
- Testing: Functionality verified on macOS and Linux
- Documentation: Changes must be documented
- Merge: Approved PRs merged to main branch
| Feature Type | Documentation Required |
|---|---|
| Plugin skills | Update SKILL.md, add/update examples |
| Course/changelog design | Update references/design-system.md or interactive-elements.md |
| Shell scripts | Update relevant SKILL.md |
| Python CI scripts | Update docstrings |
| Architecture changes | Update CLAUDE.md |
| User-facing changes | Update README.md |
When to release:
- Bug fixes merged
- Documentation updates
- No breaking changes
Process:
# Update version in install.sh
# Update CHANGELOG.md
# Tag release
git tag v0.x.x
git push origin v0.x.xWhen to release:
- New Python features complete
- All tests passing (
pytest tests/) - Documentation updated
Process:
# Ensure tests pass
pytest
# Update versions
# Edit install.sh, README.md
# Test both basic and Python features
./install.sh
pytest tests/ -v
# Tag release
git tag v0.x.x-feature
git push origin v0.x.x-featureQuestions:
Bug Reports:
- GitHub Issues
- Use bug report template
- Include: OS, Python version, reproduction steps
Feature Requests:
- GitHub Issues
- Label:
[Feature Request] - Explain: what, why, and which features (shell or Python)
Expected Behavior:
- Be respectful and inclusive
- Welcome newcomers
- Accept constructive criticism gracefully
- Focus on what's best for the project
- Show empathy
Unacceptable Behavior:
- Harassment or discrimination
- Trolling or derogatory remarks
- Personal attacks
- Publishing others' private information
Reporting: Report to maintainers via GitHub Issues or email.
By contributing, you agree to license your contributions under the MIT License. See LICENSE for details.
- ericbuess/claude-code-docs - Original implementation
- Anthropic - Claude Code and documentation
Ready to contribute? Fork the repository and start coding! We're excited to see your contributions.