Search First
Research before coding. Check for existing solutions before writing custom code.
Workflow
1. Need Analysis
- What functionality is needed?
- What are the constraints (size, license, dependencies)?
- Is this a solved problem?
2. Search Sources (in order)
- Package registries — npm, PyPI, crates.io for the relevant language
- MCP servers — Check if an MCP integration exists
- GitHub — Search for existing implementations
- Existing codebase — Check if something similar already exists in the project
3. Evaluate Candidates
Score on: functionality match, maintenance status, community size, documentation quality, license compatibility, dependency footprint.
4. Decision Matrix
| Situation |
Action |
| Exact match, well-maintained, MIT/Apache |
ADOPT as-is |
| Partial match, good foundation |
EXTEND with wrapper |
| Multiple weak matches |
COMPOSE from pieces |
| Nothing suitable |
BUILD custom (but informed) |
5. Implement
- If adopting: install, configure, write thin wrapper if needed
- If building: use discovered patterns as reference, not starting from scratch
Common Shortcuts
| Domain |
Go-to libraries |
| HTTP clients |
httpx (Python), got/ky (Node) |
| Validation |
pydantic (Python), zod (TypeScript) |
| Data processing |
pandas, polars |
| AI/LLM |
anthropic SDK, langchain (if needed) |
| Testing |
pytest, vitest |
| CLI |
click/typer (Python), commander (Node) |
Anti-Pattern
Writing 200 lines of custom code for something that pip install X solves in 3 lines. Always check first.
1---2name: search-first3description: Research-before-coding workflow. Use before implementing a feature to check for existing libraries, MCP servers, or patterns.4---56# Search First78Research before coding. Check for existing solutions before writing custom code.910## Workflow1112### 1. Need Analysis13- What functionality is needed?14- What are the constraints (size, license, dependencies)?15- Is this a solved problem?1617### 2. Search Sources (in order)181. **Package registries** — npm, PyPI, crates.io for the relevant language192. **MCP servers** — Check if an MCP integration exists203. **GitHub** — Search for existing implementations214. **Existing codebase** — Check if something similar already exists in the project2223### 3. Evaluate Candidates24Score on: functionality match, maintenance status, community size, documentation quality, license compatibility, dependency footprint.2526### 4. Decision Matrix2728| Situation | Action |29|---|---|30| Exact match, well-maintained, MIT/Apache | **ADOPT** as-is |31| Partial match, good foundation | **EXTEND** with wrapper |32| Multiple weak matches | **COMPOSE** from pieces |33| Nothing suitable | **BUILD** custom (but informed) |3435### 5. Implement36- If adopting: install, configure, write thin wrapper if needed37- If building: use discovered patterns as reference, not starting from scratch3839## Common Shortcuts4041| Domain | Go-to libraries |42|---|---|43| HTTP clients | httpx (Python), got/ky (Node) |44| Validation | pydantic (Python), zod (TypeScript) |45| Data processing | pandas, polars |46| AI/LLM | anthropic SDK, langchain (if needed) |47| Testing | pytest, vitest |48| CLI | click/typer (Python), commander (Node) |4950## Anti-Pattern51Writing 200 lines of custom code for something that `pip install X` solves in 3 lines. Always check first.