Patterns for finding and using project documentation at runtime...
This skill provides patterns for discovering and leveraging project-specific documentation at runtime. Use it to find existing solutions, understand patterns, and avoid reinventing the wheel.
Search codebase docs when:
Search these locations in order of priority:
| Location | Purpose |
|---|---|
CLAUDE.md |
AI-specific project instructions |
AGENTS.md |
AI agent guidelines |
projects/ |
Project-specific docs |
docs/ |
General project documentation |
docs/solutions/ |
Documented problem solutions |
docs/learnings/ |
Captured learnings |
| Location | Purpose |
|---|---|
README.md |
Project overview |
docs/guides/ |
How-to guides |
docs/architecture/ |
Architecture decisions |
playbook/ |
Workflow documentation |
| Location | Purpose |
|---|---|
*.md files in root |
Various documentation |
| Code comments | Inline documentation |
| Test files | Expected behaviors |
# Find all markdown files in standard locations
Glob: docs/**/*.md
Glob: **/README.md
Glob: **/CLAUDE.md
Glob: **/AGENTS.md
# Search for keywords in documentation
Grep: "keyword" in docs/
Grep: "error message" in docs/solutions/
Grep: "pattern name" in docs/
After finding matches, read the most relevant files to understand:
For learnings and solutions with YAML frontmatter, use targeted searches:
# Frontmatter schema for learnings
---
title: "Brief descriptive title"
date: YYYY-MM-DD
trigger: [chat-session|project-completion|blocker-overcome]
category: [performance|database|integration|workflow|debugging|design|generation|infrastructure]
tags: [relevant, searchable, keywords]
severity: [critical|high|medium|low]
module: "affected_module_name"
---
Grep: "category: performance" in docs/learnings/
Grep: "category: database" in docs/solutions/
Grep: "category: design" in docs/learnings/
Grep: "category: generation" in docs/learnings/
Grep: "category: infrastructure" in docs/learnings/
Grep: "tags:.*authentication" in docs/
Grep: "tags:.*caching" in docs/learnings/
Grep: "module: user_service" in docs/
Grep: "feature-name" in docs/Grep: "pattern" in docs/architecture/Grep: "category:.*relevant-category" in docs/learnings/Grep: "error message" in docs/solutions/Grep: "symptom" in docs/learnings/Glob: docs/**/troubleshoot*.mdGrep: "component-name" in docs/architecture/Grep: "decision" in docs/Glob: docs/patterns/**/*.mdIf documentation doesn't exist for your area:
/playbook:learnings after completing workThis skill is automatically used by:
/playbook:tech-plan - Searches for architecture docs and existing patterns/playbook:work - Searches for relevant learnings before starting tasks/playbook:debug - Searches for existing solutions to similar problemsThis skill triggers as an internal check, not a user-facing suggestion:
docs/ yetNo user prompt needed — search automatically as part of context gathering.
# Before implementing user authentication:
1. Search for existing auth docs:
Glob: docs/**/*auth*.md
Grep: "authentication" in docs/
2. Check for security patterns:
Grep: "security" in docs/architecture/
3. Look for related learnings:
Grep: "category: security" in docs/learnings/
Grep: "tags:.*auth" in docs/solutions/
4. Review findings and incorporate into planning
Good documentation search prevents duplicate work and leverages institutional knowledge.