search-first
Research-before-coding workflow. Search for existing tools, libraries, and patterns before writing custom code. Invokes the researcher agent.
Best use case
search-first is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Research-before-coding workflow. Search for existing tools, libraries, and patterns before writing custom code. Invokes the researcher agent.
Teams using search-first should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/search-first/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How search-first Compares
| Feature / Agent | search-first | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Research-before-coding workflow. Search for existing tools, libraries, and patterns before writing custom code. Invokes the researcher agent.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# /search-first — Research Before You Code Systematizes the "search for existing solutions before implementing" workflow. ## Trigger Use this skill when: - Starting a new feature that likely has existing solutions - Adding a dependency or integration - The user asks "add X functionality" and you're about to write code - Before creating a new utility, helper, or abstraction ## Workflow ``` ┌─────────────────────────────────────────────┐ │ 1. NEED ANALYSIS │ │ Define what functionality is needed │ │ Identify language/framework constraints │ ├─────────────────────────────────────────────┤ │ 2. PARALLEL SEARCH (researcher agent) │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ npm / │ │ MCP / │ │ GitHub / │ │ │ │ PyPI │ │ Skills │ │ Web │ │ │ └──────────┘ └──────────┘ └──────────┘ │ ├─────────────────────────────────────────────┤ │ 3. EVALUATE │ │ Score candidates (functionality, maint, │ │ community, docs, license, deps) │ ├─────────────────────────────────────────────┤ │ 4. DECIDE │ │ ┌─────────┐ ┌──────────┐ ┌─────────┐ │ │ │ Adopt │ │ Extend │ │ Build │ │ │ │ as-is │ │ /Wrap │ │ Custom │ │ │ └─────────┘ └──────────┘ └─────────┘ │ ├─────────────────────────────────────────────┤ │ 5. IMPLEMENT │ │ Install package / Configure MCP / │ │ Write minimal custom code │ └─────────────────────────────────────────────┘ ``` ## Decision Matrix | Signal | Action | |--------|--------| | Exact match, well-maintained, MIT/Apache | **Adopt** — install and use directly | | Partial match, good foundation | **Extend** — install + write thin wrapper | | Multiple weak matches | **Compose** — combine 2-3 small packages | | Nothing suitable found | **Build** — write custom, but informed by research | ## How to Use ### Quick Mode (inline) Before writing a utility or adding functionality, mentally run through: 0. Does this already exist in the repo? → `rg` through relevant modules/tests first 1. Is this a common problem? → Search npm/PyPI 2. Is there an MCP for this? → Check `~/.claude/settings.json` and search 3. Is there a skill for this? → Check `~/.claude/skills/` 4. Is there a GitHub implementation/template? → Run GitHub code search for maintained OSS before writing net-new code ### Full Mode (agent) For non-trivial functionality, launch the researcher agent: ``` Task(subagent_type="general-purpose", prompt=" Research existing tools for: [DESCRIPTION] Language/framework: [LANG] Constraints: [ANY] Search: npm/PyPI, MCP servers, Claude Code skills, GitHub Return: Structured comparison with recommendation ") ``` ## Search Shortcuts by Category ### Development Tooling - Linting → `eslint`, `ruff`, `textlint`, `markdownlint` - Formatting → `prettier`, `black`, `gofmt` - Testing → `jest`, `pytest`, `go test` - Pre-commit → `husky`, `lint-staged`, `pre-commit` ### AI/LLM Integration - Claude SDK → Context7 for latest docs - Prompt management → Check MCP servers - Document processing → `unstructured`, `pdfplumber`, `mammoth` ### Data & APIs - HTTP clients → `httpx` (Python), `ky`/`got` (Node) - Validation → `zod` (TS), `pydantic` (Python) - Database → Check for MCP servers first ### Content & Publishing - Markdown processing → `remark`, `unified`, `markdown-it` - Image optimization → `sharp`, `imagemin` ## Integration Points ### With planner agent The planner should invoke researcher before Phase 1 (Architecture Review): - Researcher identifies available tools - Planner incorporates them into the implementation plan - Avoids "reinventing the wheel" in the plan ### With architect agent The architect should consult researcher for: - Technology stack decisions - Integration pattern discovery - Existing reference architectures ### With iterative-retrieval skill Combine for progressive discovery: - Cycle 1: Broad search (npm, PyPI, MCP) - Cycle 2: Evaluate top candidates in detail - Cycle 3: Test compatibility with project constraints ## Examples ### Example 1: "Add dead link checking" ``` Need: Check markdown files for broken links Search: npm "markdown dead link checker" Found: textlint-rule-no-dead-link (score: 9/10) Action: ADOPT — npm install textlint-rule-no-dead-link Result: Zero custom code, battle-tested solution ``` ### Example 2: "Add HTTP client wrapper" ``` Need: Resilient HTTP client with retries and timeout handling Search: npm "http client retry", PyPI "httpx retry" Found: got (Node) with retry plugin, httpx (Python) with built-in retry Action: ADOPT — use got/httpx directly with retry config Result: Zero custom code, production-proven libraries ``` ### Example 3: "Add config file linter" ``` Need: Validate project config files against a schema Search: npm "config linter schema", "json schema validator cli" Found: ajv-cli (score: 8/10) Action: ADOPT + EXTEND — install ajv-cli, write project-specific schema Result: 1 package + 1 schema file, no custom validation logic ``` ## Anti-Patterns - **Jumping to code**: Writing a utility without checking if one exists - **Ignoring MCP**: Not checking if an MCP server already provides the capability - **Over-customizing**: Wrapping a library so heavily it loses its benefits - **Dependency bloat**: Installing a massive package for one small feature
Related Skills
Research Proposal Generator
Generate high-quality academic research proposals for PhD applications following Nature Reviews-style academic writing conventions.
yt-research
Research competitor YouTube channels, niches, and trending topics for your content strategy. Use this skill whenever the user says "research channels", "analyze competitors", "find trending topics", "niche analysis", "competitive research", "what are other creators doing", "scrape YouTube channels", or wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.
creating-github-issues-from-web-research
This skill enhances Claude's ability to conduct web research and translate findings into actionable GitHub issues. It automates the process of extracting key information from web search results and formatting it into a well-structured issue, ready for team action. Use this skill when you need to research a topic and create a corresponding GitHub issue for tracking, collaboration, and task management. Trigger this skill by requesting Claude to "research [topic] and create a ticket" or "find [information] and generate a GitHub issue".
elasticsearch-index-manager
Elasticsearch Index Manager - Auto-activating skill for DevOps Advanced. Triggers on: elasticsearch index manager, elasticsearch index manager Part of the DevOps Advanced skill category.
clade-embeddings-search
Implement tool use (function calling) with Claude to let it execute actions, Use when working with embeddings-search patterns. query databases, call APIs, and interact with external systems. Trigger with "anthropic tool use", "claude function calling", "claude tools", "anthropic structured output with tools".
mgrep-code-search
Semantic code search using mgrep for efficient codebase exploration. This skill should be used when searching or exploring codebases with more than 30 non-gitignored files and/or nested directory structures. It provides natural language semantic search that complements traditional grep/ripgrep for finding features, understanding intent, and exploring unfamiliar code.
defold-assets-search
Searches the Defold Asset Store for community libraries and extensions. Use BEFORE writing custom modules for pathfinding, RNG, UI, save/load, localization, tweening, input handling, etc. Helps find, compare, and install Defold dependencies.
terraform-search-import
Discover existing cloud resources using Terraform Search queries and bulk import them into Terraform management. Use when bringing unmanaged infrastructure under Terraform control, auditing cloud resources, or migrating to IaC.
contract-first-agents
Contract-First Map-Reduce coordination protocol for native TeamCreate multi-agent teams. Wraps TeamCreate, Task (teammates), SendMessage with an upfront shared contract phase that eliminates 75% of integration errors. Based on 400+ experiment research proving 52.5% quality improvement over naive coordination.
Daily Paper Search Skill
## 功能描述
persona-researcher
Organize research — manage references, notes, and collaboration.
winmd-api-search
Find and explore Windows desktop APIs. Use when building features that need platform capabilities — camera, file access, notifications, UI controls, AI/ML, sensors, networking, etc. Discovers the right API for a task and retrieves full type details (methods, properties, events, enumeration values).