Docs Search Kit
Streamline your workflow with this search, auto, generated, codebase. Includes structured workflows, validation checks, and reusable patterns for ai maestro.
Documentation Search Kit
Overview
A skill that enables Claude Code to search and retrieve documentation from your project's codebase — finding function signatures, class definitions, API docs, inline comments, and README files. Ensures Claude understands existing patterns and APIs before writing new code, reducing errors and improving consistency.
When to Use
- Before implementing a feature that might already exist
- When working with unfamiliar parts of a large codebase
- To find function signatures and usage examples
- To understand API contracts before making changes
- To discover deprecated patterns and their replacements
- Before creating a new utility that might duplicate existing code
Quick Start
# Search for documentation on a function claude "Find docs for the authenticate() function" # Search for API patterns claude "How is pagination implemented in our API endpoints?" # Find type definitions claude "Show me the User interface and all its variants"
Core Principle
Receive instruction → Search docs first → Then implement
Always search before writing. This prevents:
- Duplicating existing utilities
- Breaking established patterns
- Using deprecated APIs
- Missing validation requirements
Search Strategies
1. Symbol Search
Find definitions by exact name:
# Find a function definition grep -rn "function authenticate" src/ grep -rn "export.*authenticate" src/ # Find a class definition grep -rn "class UserService" src/ # Find a type/interface grep -rn "interface.*UserProfile" src/ grep -rn "type.*UserRole" src/
2. Semantic Search
Find related code by concept:
# Find all authentication-related code grep -rn "auth\|login\|session\|jwt\|token" src/ --include="*.ts" # Find all validation patterns grep -rn "validate\|schema\|zod\|yup\|joi" src/ --include="*.ts" # Find error handling patterns grep -rn "throw.*Error\|catch\|CustomError" src/ --include="*.ts"
3. Documentation Search
Find inline documentation:
# Find JSDoc comments grep -rn "/\*\*" src/ --include="*.ts" -A 5 # Find TODO/FIXME comments grep -rn "TODO\|FIXME\|HACK\|XXX" src/ # Find deprecated markers grep -rn "@deprecated\|DEPRECATED" src/
4. Usage Search
Find how a function is actually used:
# Find all callers of a function grep -rn "authenticate(" src/ --include="*.ts" # Find all imports of a module grep -rn "from.*authService\|require.*authService" src/ # Find all instances of a pattern grep -rn "new UserService\|UserService\." src/
Document Types
| Type | Sources | Search Strategy |
|---|---|---|
| Function docs | JSDoc, docstrings, inline comments | Symbol search + @param, @returns |
| Class docs | Class-level comments, README | Symbol search + file-level docs |
| API docs | Route comments, OpenAPI specs | Search route files + swagger |
| Type definitions | TypeScript interfaces, enums | Search .d.ts and type files |
| Architecture docs | README, ADR files, docs/ folder | File search in docs directories |
| Changelog | CHANGELOG.md, release notes | Direct file read |
| Configuration | Config comments, .env.example | Search config files |
Search Workflow
Step 1: Understand the Question
Before searching, clarify what you need:
- A specific function signature?
- How a feature is currently implemented?
- What patterns exist for a similar task?
- Whether something already exists?
Step 2: Search Progressively
Start narrow, then broaden:
1. Exact name search → "calculateDiscount"
2. Related symbols → "discount", "pricing", "promo"
3. File-level search → Browse pricing-related files
4. Documentation → Check docs/ and README files
5. Git history → Search commit messages for context
Step 3: Verify Currency
Check if the found documentation is current:
# When was this file last modified? git log -1 --format="%ai %s" -- src/services/pricingService.ts # What changed recently? git log --oneline -10 -- src/services/pricingService.ts # Is there a deprecation notice? grep -n "deprecated\|DEPRECATED\|@deprecated" src/services/pricingService.ts
Integration with IDEs
VS Code
{ "search.exclude": { "**/node_modules": true, "**/dist": true, "**/coverage": true, "**/.next": true } }
Codebase Indexing
For large codebases, maintain a search index:
# Generate a symbol index ctags -R --exclude=node_modules --exclude=dist src/ # Search the index grep "authenticate" tags
Common Queries
| Question | Search Approach |
|---|---|
| "Does this function exist?" | Symbol search by name |
| "How is auth implemented?" | Semantic search + file browse |
| "What does this error mean?" | Search error message string |
| "What's the API for X?" | Search route files + tests |
| "Is this deprecated?" | Search for @deprecated tags |
| "What tests exist for X?" | Search *.test.ts files |
| "Who uses this function?" | Usage search (callers) |
| "What changed in this file?" | Git log for file |
Best Practices
- Search before creating — Always check if a utility or pattern exists
- Read the tests — Tests are often the best documentation
- Check recent changes — Documentation may be stale; verify with
git log - Follow import chains — Trace from entry point to understand architecture
- Read README files — Check each directory for local README/docs
- Search error messages — When debugging, search for the exact error string
- Use type definitions — TypeScript interfaces document contracts better than comments
- Check examples — Look in
examples/,tests/fixtures/, orscripts/for usage
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Full-Stack Code Reviewer
Comprehensive code review skill that checks for security vulnerabilities, performance issues, accessibility, and best practices across frontend and backend code.
Test Suite Generator
Generates comprehensive test suites with unit tests, integration tests, and edge cases. Supports Jest, Vitest, Pytest, and Go testing.
Pro Architecture Workspace
Battle-tested skill for architectural, decision, making, framework. Includes structured workflows, validation checks, and reusable patterns for development.