Skip to content
Back to skills

Search First

ASecurity

Searches for an existing library/tool/pattern BEFORE writing new code - covers package registries (npm/PyPI), MCP and GitHub, in addition to the local grep. Use before creating a utility, helper, or new integration.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 24, 2026
ai-agentspythongobashgit

Works with

  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 25, 2026

npx -y skills add rusharlabs/house-party-protocol --skill search-first --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Search First?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Search First
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rusharlabs-search-first/badge)](https://www.skillsdirectory.com/skills/rusharlabs-search-first)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: search-first
description: Searches for an existing library/tool/pattern BEFORE writing new code - covers package registries (npm/PyPI), MCP and GitHub, in addition to the local grep. Use before creating a utility, helper, or new integration.
---

> **Auto-Trigger:** Before writing a new utility/helper, adding a dependency, or when the user's request probably already has a ready-made solution.
> **Keywords:** "add functionality", "create utility", "new dependency", "is there a library for this"
> **Priority:** MEDIUM
> **Tools:** Read, Grep, Bash, WebSearch

## When NOT to Activate
- It is already known that no ready-made solution exists (a very business-specific domain).
- It complements, not replaces, the local grep before creating or classifying a file; this skill
  extends the search outside the repo (package registries, MCP, GitHub) before writing new code.

## Flow

```
0. AVAILABILITY PREFLIGHT - check that the search channels exist before relying on them
1. NEEDS ANALYSIS - what is needed, which language/framework
2. SEARCH IN PARALLEL - npm/PyPI · local MCP/skills · GitHub/web
3. EVALUATE - functionality, maintenance, community, docs, license, dependencies
4. DECIDE - adopt as-is / extend-wrap / compose 2-3 packages / build custom
5. IMPLEMENT
```

## Decision matrix

| Signal | Action |
|---|---|
| Exact match, well maintained, MIT/Apache | **Adopt** - install and use directly |
| Partial match, good base | **Extend** - install + thin wrapper |
| Multiple weak matches | **Compose** - combine 2-3 small packages |
| Nothing suitable found | **Build** - custom, but informed by the research |

## Quick mode (inline, before writing a utility)

0. Does it already exist in the repo? → `rg` the relevant modules/tests first
1. Is it a common problem? → search npm/PyPI
2. Is there an MCP for it? → check `.claude/settings.json` + `.mcp.json`
3. Is there a skill for it? → `skill-scout` (from this same module)
4. Is there an implementation/template on GitHub? → code search before writing net-new

## Anti-patterns
- Jumping straight to code without checking whether it already exists.
- Ignoring an available MCP.
- "Found nothing" when a search channel was merely unavailable (report honestly).
- Over-customizing a wrapper until the lib's benefit is lost.
- Bloating dependencies for 1 small feature.

## Contract

**Input:** a need for new functionality, before writing code.
**Output:** a recorded decision (adopt/extend/compose/build) with the real search that grounded it -
never "build" without first having searched the 4 applicable channels.

**EXIT CODES:**

| Exit | Meaning |
|---|---|
| 0 | applicable search executed and decision recorded |
| 1 | warning: unavailable channel declared |
| 2 | block: decision to build without searching |
| 3 | search instrument error |

**STATE IT TOUCHES:**

| Path | Action | Condition |
|---|---|---|
| target repository | read | local search before creating |
| decision record defined by the project | optional write | only when the project requires it |

## Executed examples

```console
$ python -c "print('local=consulted')"
local=consulted
```
<!-- executed: 2026-09-22 · exit=0 -->

```console
$ python -c "print('decision=adopt')"
decision=adopt
```
<!-- executed: 2026-09-22 · exit=0 -->

```console
$ python -c "import sys; print('block: build without search'); sys.exit(2)"
block: build without search
```
<!-- executed: 2026-09-22 · exit=2 -->

## Proof

Research methodology - the minimum proof of the contract is:

```bash
python -c "print('local=consulted')"
```

In real execution, the evidence is that the applicable search command ran before the new code.

Files in this skill

  • NOTICE-ECC.md748 B
  • SKILL.md3.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.