/codebase-intelligence:search-before-buildingfrom codebase-intelligence
Checks codebase, package registries, and MCP servers before building new utilities or adding dependencies. Prevents redundant work and guides reuse-vs-build decisions.
Ships in codebase-intelligence. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Before implementing new functionality, verify it does not already exist and that the best option has been considered.
Run in order. Stop when you find a satisfactory answer.
Search the current codebase before anything else:
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?
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:
Check whether an MCP server already provides this capability:
# List currently configured MCP servers
cat .mcp.json 2>/dev/null || cat ~/.claude/settings.json | grep -A5 '"mcpServers"'
Check the Agent Powerups catalog for MCP configs:
apx list --type mcp-config
If a server covers the need, prefer configuring it over writing code.
Before adopting a package, verify:
npm audit / pip-audit / cargo audit)| Finding | Action |
|---|---|
| Exact match in repo | Reuse — import and use; refactor only if the interface is incompatible |
| Exact external match, acceptable risk | Adopt — install and use directly; do not wrap unless the API is hostile |
| Partial match | Wrap — install, write a thin adapter; keep the adapter < 50 lines |
| Multiple weak matches | Compose — combine 2–3 small packages; document why |
| No suitable option | Build — write custom code; document the gap search found |
This check is mandatory before:
If time-boxed, spend at most 5 minutes on Steps 1–2 before deciding.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub yeaight7/agent-powerups --plugin codebase-intelligence5 skills in this plugin
/context-retrieval-loopUse when starting work in an unfamiliar area of a codebase, spawning a subagent that needs targeted file context, a first search pass missed the relevant file, or the file scope of a task is unclear./local-rag-mcpUse when querying, ingesting, or maintaining a local RAG MCP corpus for semantic document retrieval with privacy controls./managed-codebase-contextUse when connecting to a managed codebase-context MCP/session service, checking stale maps, or safely using MCP-provided repository context./structured-code-search-mcpUse when designing or using MCP-backed structured code search with search, AST query, symbol inventory, and bounded extraction workflows.2 plugins in one repository ship this exact skill · first indexed Jul 28, 2026
Other plugins' skills for the same job