search-first
Research-before-coding workflow. Search for existing tools, libraries, and patterns before writing custom code.
Overview
Use this skill when:
- Starting a new feature that likely already has existing solutions
- Adding a dependency or integration
- Creating a new utility, helper, or abstraction
- The user asks for functionality and implementation is about to begin
Workflow
- Define the capability that is needed.
- Identify language, framework, and project constraints.
- Search in parallel across package registries, MCP servers, skills, GitHub, and the web.
- Evaluate candidates for fit, maintenance, community health, docs, license, and dependency cost.
- Decide whether to adopt, extend, compose, or build custom.
- Implement the smallest viable solution.
Decision Matrix
| Signal | Action |
|---|---|
| Exact match, maintained, permissive license | Adopt directly |
| Partial match, strong base | Extend with a thin wrapper |
| Several weak matches | Compose small pieces |
| Nothing suitable | Build custom, informed by research |
Quick Checklist
Before writing code:
- Search the repo first with
rg. - Check package ecosystems like npm and PyPI.
- Check whether an MCP server already solves the problem.
- Check whether an existing skill already covers it.
- Check GitHub for maintained OSS implementations and templates.
Examples
Dead link checking
- Need: validate markdown links
- Search: existing CLI tools or lint rules
- Result: install a maintained checker instead of building one
HTTP client wrapper
- Need: retries and timeout handling
- Search: production-proven HTTP clients first
- Result: adopt an existing client and configure it
Config validation
- Need: validate config files against a schema
- Search: CLI schema validators
- Result: install a validator and add a project-specific schema
Anti-Patterns
- Writing a utility before checking whether it already exists
- Ignoring available MCP servers or skills
- Building a heavy wrapper around a solid library
- Adding large dependencies for a tiny need