D

Docs Search Kit

Streamline your workflow with this search, auto, generated, codebase. Includes structured workflows, validation checks, and reusable patterns for ai maestro.

SkillClipticsai maestrov1.0.0MIT
0 views0 copies

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

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/

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"

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/

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

TypeSourcesSearch Strategy
Function docsJSDoc, docstrings, inline commentsSymbol search + @param, @returns
Class docsClass-level comments, READMESymbol search + file-level docs
API docsRoute comments, OpenAPI specsSearch route files + swagger
Type definitionsTypeScript interfaces, enumsSearch .d.ts and type files
Architecture docsREADME, ADR files, docs/ folderFile search in docs directories
ChangelogCHANGELOG.md, release notesDirect file read
ConfigurationConfig comments, .env.exampleSearch 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

QuestionSearch 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

  1. Search before creating — Always check if a utility or pattern exists
  2. Read the tests — Tests are often the best documentation
  3. Check recent changes — Documentation may be stale; verify with git log
  4. Follow import chains — Trace from entry point to understand architecture
  5. Read README files — Check each directory for local README/docs
  6. Search error messages — When debugging, search for the exact error string
  7. Use type definitions — TypeScript interfaces document contracts better than comments
  8. Check examples — Look in examples/, tests/fixtures/, or scripts/ for usage
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates