search-first
> ⚠️ **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.
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.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.