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. ## When to Activate 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 - Evaluating whether to build custom code or adopt a library for a well-known problem domain - The planner or architect agent is about to choose a technology stack or integration pattern - Checking whether an MCP server already provides a capability before implementing it natively ## 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
search-patterns
Search implementation patterns: full-text search with Postgres tsvector, Typesense for production search, Elasticsearch for complex analytics, faceted search, autocomplete, typo tolerance, vector/semantic search, and relevance tuning.
market-research
Conduct market research, competitive analysis, investor due diligence, and industry intelligence with source attribution and decision-oriented summaries. Use when the user wants market sizing, competitor comparisons, fund research, technology scans, or research that informs business decisions.
zero-trust-patterns
Zero-Trust security patterns — mTLS between microservices (Istio/SPIFFE), SPIRE workload identity, OPA/Envoy authorization, NetworkPolicy default-deny-all, short-lived credentials, service mesh security, and Kubernetes RBAC hardening.
wireframing
Wireframing and prototyping workflow: fidelity levels (lo-fi sketch → mid-fi wireframe → hi-fi prototype), tool selection (Figma, Excalidraw, Balsamiq), user flow diagrams, wireframe annotation standards, information architecture (IA) mapping, and the handoff from wireframe to visual design. For developers who need to communicate UI structure before writing code.
webrtc-patterns
WebRTC patterns — peer connection setup, ICE/STUN/TURN configuration, signaling server design, SFU vs mesh topology, screen sharing, media track management, and reconnect/ICE restart handling.
webhook-patterns
Webhook patterns for receiving, verifying (HMAC), and idempotently processing third-party events. Covers Stripe, GitHub, and generic webhook patterns, delivery guarantees, retry handling, and testing.
web-performance
Web performance optimization: Core Web Vitals (LCP, CLS, INP), Lighthouse CI with budget configuration, bundle analysis (webpack-bundle-analyzer, vite-bundle-visualizer), hydration performance, network waterfall reading, image optimization (WebP/AVIF, srcset), and font performance.
wasm-performance
WebAssembly performance: wasm-opt binary optimization, size reduction (panic=abort, LTO, strip), profiling WASM in Chrome DevTools, memory management (linear memory, avoiding GC pressure), SIMD, and multi-threading with SharedArrayBuffer.
wasm-patterns
WebAssembly patterns: wasm-pack, wasm-bindgen (JS↔Wasm interop), WASI, Component Model, wasm-opt, Rust-to-WASM compilation, JS integration (web workers, streaming instantiation), and production deployment (CDN, Content-Type headers).
visual-testing
Visual Regression Testing: tool comparison (Chromatic/Percy/Playwright screenshots/BackstopJS), pixel-diff vs AI-based comparison, baseline management, flakiness strategies (masks, tolerances, waitForLoadState), CI integration with GitHub Actions, and Storybook integration.
visual-identity
Brand identity development: color palette construction (primary/secondary/semantic/neutral), logo concept brief writing, typeface pairings, brand voice definition, mood board direction, and Brand Guidelines document structure. Use when establishing or evolving a visual brand — not for implementing existing tokens.
ux-micro-patterns
UX micro-patterns for every product state: Empty States, Loading States (skeleton screens, spinners, optimistic UI), Error States, Success States, Confirmation Dialogs, Onboarding Flows, and Progressive Disclosure. These patterns apply to every feature — done wrong, they're the biggest source of user confusion.