Option

search-first

affaan-m/ECC affaan-m/ECC

Informieren Sie sich mithilfe eines Forschungsagenten über bereits vorhandene Tools, Bibliotheken und Muster, bevor Sie eigenen Code schreiben.

...Alle erweitern
0
Zeit aktualisiert 2. Oktober 2026

/search-first — Erst recherchieren, dann programmieren

Systematisiert den Arbeitsablauf „Suche nach bestehenden Lösungen vor der Implementierung“.

Auslöser

Wende diese Fähigkeit an, wenn:

  • Sie eine neue Funktion entwickeln, für die es wahrscheinlich bereits Lösungen gibt
  • eine Abhängigkeit oder Integration hinzufügst
  • Der Nutzer fragt nach der „Funktionalität X“ und Sie sind dabei, Code zu schreiben
  • Bevor du ein neues Dienstprogramm, einen neuen Helper oder eine neue Abstraktion erstellst

Ablauf

┌─────────────────────────────────────────────┐
│  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               │
└─────────────────────────────────────────────┘

Entscheidungsmatrix

Signal Aktion
Exakte Übereinstimmung, gut gepflegt, MIT/Apache Übernehmen – direkt installieren und nutzen
Teilweise Übereinstimmung, gute Grundlage Erweitern – installieren + einfachen Wrapper schreiben
Mehrere schwache Übereinstimmungen Zusammenstellen – 2–3 kleine Pakete kombinieren
Nichts Passendes gefunden Erstellen – maßgeschneidert schreiben, aber auf der Grundlage von Recherchen

Anleitung

Schritt 0: Vorabprüfung der Tool-Verfügbarkeit

Dies ist eine Anleitung für Agenten, kein ausführbares Einrichtungsskript. Überprüfen Sie nur die Kanäle, die für die vorliegende Aufgabe und das vorliegende Projekt relevant sind.

Kanal Prüfen Falls nicht vorhanden
Repository-Suche rg --files und zielgerichtete rg Abfragen Angabe, dass nur sichtbare Dateien überprüft wurden
Paket-Registry npm --version, python -m pip --versionoder Projekt-Paketmanager Verwenden Sie die Suche in Web/Dokumenten und vermeiden Sie die Angabe einer Registrierungsabdeckung
GitHub-CLI gh auth status Verwenden Sie ausschließlich die öffentliche Web- oder lokale Git-Historie
MCP-/Dokumenten-Tools Liste der verfügbaren Tools oder lokale MCP-Konfiguration Fallen Sie auf die offizielle Suche in der Dokumentation oder im Web zurück
Kompetenzverzeichnis ls ~/.claude/skills ~/.codex/skills sofern vorhanden Angenommen, es wäre kein lokaler Kompetenzkatalog verfügbar

Schnellmodus (inline)

Bevor du ein Dienstprogramm schreibst oder eine Funktion hinzufügst, gehe im Kopf folgende Schritte durch:

  1. Gibt es das bereits im Repo? → rg zuerst die relevanten Module/Tests durchgehen
  2. Ist das ein häufiges Problem? → Suche in npm/PyPI
  3. Gibt es dafür ein MCP? → Überprüfen ~/.claude/settings.json und suche
  4. Gibt es dafür ein Skill? → Prüfen ~/.claude/skills/
  5. Gibt es eine GitHub-Implementierung/Vorlage? → Führe eine GitHub-Code-Suche nach gepflegter OSS durch, bevor du komplett neuen Code schreibst

Vollmodus (Agent)

Für nicht-triviale Funktionen starte den Researcher-Agenten:

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

Ältere Claude-Code-Dokumentationen bezeichnen dies möglicherweise als Task(...); verwenden Sie den aktuellen Namen des Agenten/Subagenten, der vom aktiven Harness bereitgestellt wird.

Suchverknüpfungen nach Kategorie

Entwicklungswerkzeuge

  • Linting → eslint, ruff, textlint, markdownlint
  • Formatierung → prettier, black, gofmt
  • Testen → jest, pytest, go test
  • Pre-Commit → husky, lint-staged, pre-commit

KI-/LLM-Integration

  • Claude SDK → Context7 für die neuesten Dokumentationen
  • Prompt-Verwaltung → MCP-Server prüfen
  • Dokumentenverarbeitung → unstructured, pdfplumber, mammoth

Daten & APIs

  • HTTP-Clients → httpx (Python), ky/undici (Node)
  • Validierung → zod (TS), pydantic (Python)
  • Datenbank → Zuerst nach MCP-Servern suchen

Inhalt & Veröffentlichung

  • Markdown-Verarbeitung → remark, unified, markdown-it
  • Bildoptimierung → sharp, imagemin

Integrationspunkte

Mit Planer-Agent

Der Planer sollte den Researcher vor Phase 1 (Architekturprüfung) aufrufen:

  • Der „Researcher“ ermittelt verfügbare Werkzeuge
  • Der Planer bindet diese in den Umsetzungsplan ein
  • Vermeidet, dass im Plan „das Rad neu erfunden“ wird

Mit dem Architekten-Agenten

Der Architekt sollte den Forscher zu folgenden Punkten konsultieren:

  • Entscheidungen zum Technologie-Stack
  • Ermittlung von Integrationsmustern
  • Vorhandene Referenzarchitekturen

Mit der Fähigkeit zur iterativen Recherche

Kombinieren Sie diese für eine schrittweise Erkundung:

  • Zyklus 1: Breite Suche (npm, PyPI, MCP)
  • Zyklus 2: Detaillierte Bewertung der besten Kandidaten
  • Zyklus 3: Kompatibilität mit den Projektvorgaben prüfen

Beispiele

Beispiel 1: „Prüfung auf tote Links hinzufügen“

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

Beispiel 2: „HTTP-Client-Wrapper hinzufügen“

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

Beispiel 3: „Linter für Konfigurationsdateien hinzufügen“

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-Muster

  • Direkt zum Code springen: Ein Dienstprogramm schreiben, ohne zu prüfen, ob bereits eines existiert
  • MCP ignorieren: Nicht prüfen, ob ein MCP-Server die Funktion bereits bereitstellt
  • Stilles Überspringen: Meldung „Nichts gefunden“, wenn ein Suchkanal nicht verfügbar war
  • Übermäßige Anpassung: Eine Bibliothek so stark umschließen, dass sie ihre Vorteile verliert
  • Aufgeblähte Abhängigkeiten: Installation eines riesigen Pakets für eine kleine Funktion
Auf GitHub ansehen
---
name: search-first
description: Research existing tools, libraries, and patterns before writing custom code by invoking a researcher agent.
---

# /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:

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:

```
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)
- 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
- **Silent skipping**: Reporting "nothing found" when a search channel was unavailable
- **Over-customizing**: Wrapping a library so heavily it loses its benefits
- **Dependency bloat**: Installing a massive package for one small feature

Alle Dateien

1 Dateien

search-first installieren

Laden Sie die Skill-Dateien herunter und entpacken Sie sie in Ihr Verzeichnis „.claude/skills/“.

ZIP herunterladen

Klonen Sie das Repository und kopieren Sie die Skill-Dateien in Ihr Projekt.

git clone https://github.com/affaan-m/ECC/tree/main/skills/search-first # Copy SKILL.md to your .claude/skills/ directory

Kopieren Kopieren
Schnelle Einrichtung: Kopiere den Skill-Ordner nach .claude/skills/ Claude erkennt den Skill automatisch und nutzt ihn.
Repository affaan-m/ECC

Ähnliche Skills

airtable-automation
Zeit aktualisiert 29. Juni 2026
seo-programmatic
Zeit aktualisiert 29. Juni 2026
notion-automation
Zeit aktualisiert 29. Juni 2026
fairdb-backup-manager
Zeit aktualisiert 29. Juni 2026
OR