search-first
Skill16 starsChanged 7 months agoMITView on GitHub
Enforces research-before-coding. Before writing any new code, search the existing codebase for reusable patterns, existing implementations, and prior art. Prevents duplicated logic. Triggers on Automatically before any new feature implementation, or \"search first\" or \"check if this exists\".
42 other projects use a version of this.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- shimo4228/akc-cycletheir own version, first seen Nov 8, 2026
- pankaj-mahaur/Agent-Daemontheir own version, first seen Nov 6, 2026
- matheus-rib1108/meu-kit-claude-codetheir own version, first seen Nov 1, 2026
- TsinHzl/claude-code-configtheir own version, first seen Nov 1, 2026
- shimo4228/search-firsttheir own version, first seen Nov 1, 2026
Used with
Projects with it also use continuous-agent-loop, agent-harness-construction and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
junimnjwSkillcontinuous-agent-loop
Patterns for continuous autonomous agent loops with quality gates, evals, and recovery controls.
Also in 4 projects that use this
junimnjwSkillagent-harness-construction
Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates.
Also in 4 projects that use this
loulanyueSkillsafety-guard
Also in 3 projects that use this
loulanyueSkillrules-distill
Scan skills to extract cross-cutting principles and distill them into rules — append, revise, or create new rule files
Also in 3 projects that use this
dcs-soniSkillcodebase-onboarding
Help developers understand unfamiliar codebases quickly. Use when
Also in 3 projects that use this
MicrosoftSkillerror-handling
统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用。
Also in 3 projects that use this
- +2 more from junimnjw
Other versions42 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 42
- loulanyue/awesome-claude-notes★ 272same name
- songjiun10-collab/Senior-thinking-skills★ 87same name
- Fmarzochi/EGC★ 61same name
- LeeYudok/agents-scaffold★ 38same name
- jiten-singh-shahi/salesforce-claude-code★ 15same name
- sidiangongyuan/codex-skills-library★ 11same name
- frankxai/agentic-creator-os★ 10same name
- DetectHensenberg/RAG4JZDQ★ 8same name
- gongyijie85/dsh-ecc★ 8same name
- VoVuongThanhDat/agentflow★ 8same name
32 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- actSkill
- security-checkSkill
- environment-checkSkill
- run-verificationSkill
- refactorSkill
- debug-session-archivedSkill
- generate-guardsSkill
- check-anthropicSkill
- code-reviewerSkill
- code-reviewSkill
- debug-sessionSkill
- end-sessionSkill
- evolve-checkSkill
- evolveSkill
- fix-bugSkill
- forgetSkill
- frontend-designSkill
- guardSkill
- kit-healthSkill
- learnSkill
- map-codebaseSkill
- modeSkill
- parallel-prototypesSkill
- planSkill
- powershell-safeSkill
- product-riskSkill
- progress-reportSkill
- prototype-hypothesisSkill
- recallSkill
- refactoring-uiSkill
- scan-codebaseSkill
- scan-conventionsSkill
- search-memorySkill
- shadow-codeSkill
- skill-creatorSkill
- smart-resumeSkill
- start-sessionSkill
- strategic-compactSkill
- tourSkill
- ux-heuristicsSkill
- verification-loopSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 36 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Allowed Tools: Read, Glob, Grep, Bash
- Very specific: line 23
Check function indexes / API reference in .claude/memory/
- Distinctive: line 24
Check architecture docs for existing patterns
- Distinctive: line 53
Search memory indexes first (faster) before reading source files
- Distinctive: line 54
If a pattern appears in 3+ places, it should be extracted into a shared utility
- Distinctive: line 55
After finding existing code: check if it needs to be updated vs reused as-is
“Common” is measured: kept by at least 6 in 10 of the 36 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: search-first
Trigger: Automatically before any new feature implementation, or "search first" or "check if this exists"
Description: Enforces research-before-coding. Before writing any new code, search the existing codebase for reusable patterns, existing implementations, and prior art. Prevents duplicated logic.
Allowed Tools: Read, Glob, Grep, Bash
Steps
- Search existing code for similar functionality:
- Grep for method names, endpoint names, or key terms
- Does something already do what's being requested?
- Search memory indexes:
- Check function indexes / API reference in
.claude/memory/ - Check architecture docs for existing patterns
- Check function indexes / API reference in
- Search for existing patterns:
- Is there a helper or utility that already handles this?
- Can an existing function be extended rather than duplicating?
- Check for existing data fetching:
- Is there already an API endpoint that returns this data?
- Can the frontend reuse an existing call?
- Report findings:
- ✅ "Found existing:
[method/function]in[file]— reuse this, no new code needed" - ⚠️ "Partial match:
[method]— extend this instead of creating new" - 🆕 "No existing pattern found — safe to create new"
- ✅ "Found existing:
- Only proceed to plan/code after search is complete
Why This Matters
- Duplicate logic = two places to fix when bugs appear
- Searching takes 2 minutes and can save hours of debugging
- The best code is code you don't write
Notes
- Search memory indexes first (faster) before reading source files
- If a pattern appears in 3+ places, it should be extracted into a shared utility
- After finding existing code: check if it needs to be updated vs reused as-is
- This skill pairs with plan-before-coding — search → plan → confirm → code
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

