search-before-buildinglisted
Install: claude install-skill yeaight7/agent-powerups
# Search Before Building
Before implementing new functionality, verify it does not already exist and that the best option has been considered.
## When to Use
- About to add a new helper, utility, or abstraction
- Task says "add X" and X sounds like a solved problem
- Considering a new external dependency
- Agent proposes writing something from scratch without checking first
## Four-Step Check
Run in order. Stop when you find a satisfactory answer.
### Step 1 — Repo-first
Search the current codebase before anything else:
```bash
rg "<keyword>" src/ lib/ --type ts --type js -l
rg "<keyword>" --glob "*.py" -l
```
Check: Does equivalent logic already exist? Is it importable as-is, or would it need wrapper work?
### Step 2 — Package registry
Search the relevant registry for the project language:
| Language | Registry | Search method |
|----------|----------|---------------|
| TypeScript/JS | npm | `npm search <keyword>` or npmjs.com |
| Python | PyPI | `pip index search <keyword>` or pypi.org |
| Go | pkg.go.dev | web search `site:pkg.go.dev <keyword>` |
| Rust | crates.io | `cargo search <keyword>` |
Score each candidate:
- Maintenance: last commit < 1 year, open issues ratio
- Popularity: weekly downloads or GitHub stars
- License: MIT / Apache-2.0 / BSD preferred; check for GPL/commercial constraints
- Size: avoid heavy packages for a single feature
### Step 3 — MCP / tool servers
Check whether an MCP server already provides this capability:
```bash
# List curre