Skip to content
Skillpedia
General coding280k Β· #404

search-first

What it does

This tool helps find ready-made solutions before you write new code. It searches for existing tools in places like npm, PyPI, and GitHub to prevent you from 'reinventing the wheel'.

When to use it

  • βœ“When starting a new feature that might already exist.
  • βœ“When adding a new library or integration to your project.
  • βœ“Before creating a function or tool that others may have already built.

Skill link

https://github.com/affaan-m/ECC/blob/main/skills/search-first/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/affaan-m/ECC/blob/main/skills/search-first/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œSearch for a library to check for broken links in markdown files.”

5 new skills a week. 1 minute to read.

search-first: full guide

When you ask an AI agent to add a feature, it often starts writing code at once. The code may work, but a maintained package that does the same job might already exist. You then own extra code that you have to test, fix and explain to others.

This skill adds a research step before any coding. The agent first checks your own repository, then package registries, MCP servers, local skills and GitHub. It compares what it finds and recommends one of four actions: adopt, extend, compose or build. It also has to say honestly when a search channel was not available. It suits developers and non-programmers who direct an agent and want fewer custom parts to maintain.

Use cases

Checking a config file format

Your project has JSON config files and you want them validated against a schema. Instead of letting the agent write validation code, it searches first and may suggest an existing command-line validator plus one schema file that describes your own rules.

Adding retries to web requests

A script calls an outside service that sometimes fails. Before the agent writes its own retry loop, it compares HTTP libraries that already handle retries and timeouts, and tells you which one fits your language and why.

Picking up a new integration

You want your agent to connect to a database or a documentation source. The skill makes it check whether an MCP server already offers that connection before it builds a custom bridge, which saves setup and maintenance time.

Step by step

  1. 1Install the skill by placing the search-first folder in ~/.claude/skills/ (or your project's .claude/skills/) and start a new session.
  2. 2Describe the feature in plain words, for example 'I need to validate config files', and mention your language or framework if it matters.
  3. 3Ask the agent to run search-first before writing code. It checks which search tools it can actually use and tells you which ones it skipped.
  4. 4Read the comparison it returns. Each candidate is scored on features, upkeep, community, documentation, license and dependencies.
  5. 5Choose adopt, extend, compose or build. Then let the agent install the package or write only the small piece that is still missing.

Example

What to ask

β€œBefore you write anything, use search-first. I need a tool that rewrites our Markdown docs into clean, consistent formatting. We use Node. Compare options and recommend one.”

What you get

The agent first confirms npm and GitHub search work. It lists a few Markdown processing libraries with scores for upkeep, license and documentation, then recommends installing one and adding a short config file. It marks the decision as Adopt and writes no custom formatting code.

Tips

  • βœ“Give limits up front, such as language, allowed licenses or 'no heavy dependencies'. The comparison is only as good as the constraints you provide.
  • βœ“Do not accept 'nothing found' without checking the channel report. If GitHub or the package manager was unavailable, the search was incomplete and you should say so.
  • βœ“Avoid wrapping a library so heavily that you lose its benefits. If the agent proposes a thick wrapper, ask whether a thin one or direct use is enough.
  • βœ“For small changes the quick mode is enough: a few checks in the repo and registries. Keep the full researcher agent for bigger needs.

Alternatives

  • karpathy-guidelines

    Pick this when the code is already decided and you want the agent to keep it simple, clear and easy to verify.

  • executing-plans

    Pick this once research is done and you have a written plan the agent should carry out step by step with tests.

  • code-review

    Pick this after the code exists, to check changes against your repo's standards and the original spec before merging.

Questions and answers

Does search-first install packages automatically?

Only at the last stage. It researches and compares first, then proposes a decision. If you choose adopt or extend, the agent installs the package or configures the tool as part of implementation.

What if the search tools are not available?

The skill starts with a preflight check of each channel. If one is missing, such as GitHub access or a package manager, the agent should state that and fall back to web or docs search instead of claiming full coverage.

Is search-first worth using for small tasks?

Yes, in its quick mode. A few checks in your repo, registries, MCP settings and local skills take little time. The full researcher agent is meant for non-trivial functionality.

How it works

The tool checks various sources (like package stores and code repositories) to see if something already does what you need. If it finds something, it suggests using that ready-made solution; if not, it helps you understand what you need to build.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

/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

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  0. TOOL AVAILABILITY PREFLIGHT             β”‚
β”‚     Check search channels before relying on β”‚
β”‚     them; report skipped channels honestly   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  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

Step 0: Tool Availability Preflight

This is agent guidance, not an executable setup script. Check only the channels that are relevant to the task and project in front of you.

Channel Check If missing
Repository search rg --files and targeted rg queries State that only visible files were inspected
Package registry npm --version, python -m pip --version, or project package manager Use web/docs search and avoid claiming registry coverage
GitHub CLI gh auth status Use public web or local git history only
MCP/docs tools Available tool list or local MCP config Fall back to official docs/web search
Skills directory ls ~/.claude/skills ~/.codex/skills where applicable Say no local skill catalog was available

Quick Mode (inline)

Before writing a utility or adding functionality, mentally run through:

  1. Does this already exist in the repo? β†’ rg through relevant modules/tests first
  2. Is this a common problem? β†’ Search npm/PyPI
  3. Is there an MCP for this? β†’ Check ~/.claude/settings.json and search
  4. Is there a skill for this? β†’ Check ~/.claude/skills/
  5. 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:

Agent(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
")

Older Claude Code docs may call this Task(...); use the current agent/subagent tool name exposed by the active harness.

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/undici (Node)
  • Validation β†’ zod (TS), pydantic (Python)

…

FAQ

What are npm and PyPI?

They are like 'stores' where developers share ready-made code (packages or libraries) that others can use in their projects.

What does 'reinventing the wheel' mean?

It means creating something from scratch when a ready-made and tested solution that does the same thing already exists.

When should I use this tool?

Whenever you are about to write code for a new feature or to solve a common problem, it's a good idea to check if a ready-made solution doesn't already exist.

Details

Original description by the author

Research-before-coding workflow: search npm/PyPI, MCP servers, skills, and GitHub for existing tools before writing custom code, then adopt, extend, or build. Launches the researcher agent for non-trivial needs. Use when starting a feature, adding a dependency or integration, or about to write a utility that may already exist.

repo: affaan-m/ECC

Popularity

GitHub stars
280k
Ranking position
#404
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills