search-first
A development discipline ensuring deep code research before implementation to avoid assumptions and wasted effort.
Install
mkdir -p .claude/skills/search-first && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13951" && unzip -o skill.zip -d .claude/skills/search-first && rm skill.zipInstalls to .claude/skills/search-first
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
> ⚠️ **Anti-Pattern**: Concluding "feature X doesn't exist" based solely on empty grep results without reading the actual source file. This leads to incorrect analysis and wasted time.Key capabilities
- →Research codebase and documentation before proposing changes
- →Use `grep_search`, `find_by_name`, and `mcp_gitnexus_query` for understanding existing logic
- →Reference existing patterns for similar functionality
- →Cross-reference library documentation for best practices
- →Analyze change impact using `mcp_gitnexus_impact`
- →Cite specific files and line numbers in implementation plans
How it works
The skill enforces a workflow where developers must research the codebase and documentation using various search tools before planning or implementing any changes, especially verifying empty search results.
Inputs & outputs
When to use search-first
- →Investigating codebase logic
- →Researching API usage
- →Verifying feature existence
- →Analyzing change impact
About this skill
Search-First Development Skill
🎯 Goal
Ensure absolute context clarity by researching the codebase and documentation before proposing or implementing any changes.
🛠️ Instructions
- Stop and Research: Before writing a single line of code, use
grep_search,find_by_name, andmcp_gitnexus_queryto understand the existing logic. - Reference Existing Patterns: Identify where similar functionality exists and replicate established patterns.
- Cross-Reference Docs: Use
mcp_context7_query-docsorread_url_contentto check library documentation for the latest best practices. - Impact Analysis: Use
mcp_gitnexus_impactto see what will break if you change a symbol. - Evidence-Based Planning: Your
implementation_plan.mdmust cite specific files and line numbers found during research.
🚨 Verify Empty Results (MANDATORY)
When grep_search returns "No results found", NEVER trust it blindly. Always verify by:
- Read the file directly with
view_file— especially for files you've previously viewed or edited, or files under ~500 lines. - Check encoding/save state — the file may have unsaved changes or encoding issues that prevent grep from matching.
- Try alternative search terms — the function/variable may use a different naming convention than expected.
- Rule: If you previously saw content in a file and grep now says it doesn't exist, the grep result is wrong, not your memory. Always read the file to confirm.
⚠️ Anti-Pattern: Concluding "feature X doesn't exist" based solely on empty grep results without reading the actual source file. This leads to incorrect analysis and wasted time.
🏁 Workflow
- Query: Search for the concept/component.
- Trace: Follow the execution flow using
mcp_gitnexus_context. - Validate: Confirm assumptions with tool output. If grep returns empty but you expect results, READ the file.
- Execute: Only then, proceed to planning and implementation.
When not to use it
- →When the user is already certain about the codebase and documentation
- →When the user does not need to verify empty search results
- →When the user is concluding 'feature X doesn't exist' based solely on empty grep results
Limitations
- →Requires verification of empty search results
- →Mandates citing specific files and line numbers in plans
- →Aims to prevent incorrect analysis from incomplete search results
How it compares
This skill mandates a 'search-first' approach, requiring explicit verification of search results and documentation cross-referencing, unlike simply performing a search and assuming its completeness.
Compared to similar skills
search-first side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| search-first (this skill) | 0 | 4mo | No flags | Beginner |
| jupyter-notebook | 30 | 6mo | Review | Intermediate |
| external-model-selection | 2 | 8mo | Review | Intermediate |
| consult-zai | 1 | 6mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
jupyter-notebook
davila7
Use when the user asks to create, scaffold, or edit Jupyter notebooks (`.ipynb`) for experiments, explorations, or tutorials; prefer the bundled templates and run the helper script `new_notebook.py` to generate a clean starting notebook.
external-model-selection
MadAppGang
Choose optimal external AI models for code analysis, bug investigation, and architectural decisions. Use when consulting multiple LLMs via claudish, comparing model perspectives, or investigating complex Go/LSP/transpiler issues. Provides empirically validated model rankings (91/100 for MiniMax M2, 83/100 for Grok Code Fast) and proven consultation strategies based on real-world testing.
consult-zai
centminmod
Compare z.ai GLM 4.7 and code-searcher responses for comprehensive dual-AI code analysis. Use when you need multiple AI perspectives on code questions.
flow-next-rp-explorer
gmickel
Token-efficient codebase exploration using RepoPrompt CLI. Use when user says "use rp to..." or "use repoprompt to..." followed by explore, find, understand, search, or similar actions.
agent-test-long-runner
ruvnet
Agent skill for test-long-runner - invoke with $agent-test-long-runner
explore
Lee-SiHyeon
Contextual grep for codebases. Answers 'Where is X?', 'Which file has Y?', 'Find the code that does Z'. Fire multiple in parallel for broad searches. Specify thoroughness: quick/medium/very thorough. (Explore - oh-my-opencode port)