# search-first

> A Claude Code skill (MIT) that enforces a research-before-coding workflow. Before writing custom code, the agent searches npm, PyPI, MCP registries, GitHub, and existing skills in parallel, then makes an informed Adopt / Extend / Compose / Build decision.

## Core documentation

- [llms-full.txt](llms-full.txt): self-contained Q&A reference for AI agents (Project Facts, Prior Research, 9 question-form H2 sections)
- [README.md](README.md): human-facing narrative (install, decision matrix, worked example)
- [SKILL.md](skills/search-first/SKILL.md): full skill specification — trigger conditions, 6-step workflow (Step 0 articulation + 5-step decision pipeline), decision matrix, quick mode vs full mode, skip-research handling

## Architecture

- 6-step workflow: **Step 0 Articulate** (mandatory user-visible text output before any tool call) → 1. Need Analysis → 2. Parallel Search → 3. Evaluate → 4. Decide → 5. Implement
- 4-way decision matrix: **Adopt** (exact match, well-maintained, MIT/Apache), **Extend** (partial match, thin wrapper), **Compose** (multiple small packages), **Build** (nothing suitable, informed by research)
- Parallel search targets: npm registry, PyPI, MCP servers, GitHub, existing skills
- Skip-research handling: when the user explicitly says "don't research", the agent emits a one-paragraph trade-off acknowledgement instead of silent skip — preserves the user's intent while keeping the course-correct window open

## Standard reference

- [Agent Skill specification](https://agentskills.io/specification): the Claude Code skill format used by this repo
- [SkillsMP marketplace](https://agentskills.io/specification): one-step install via `/skills add`

## Sibling skills

- [llms-txt-writer](https://github.com/shimo4228/llms-txt-writer): writes AI-facing docs optimized for ChatGPT / Perplexity / Gemini citation
- [skill-comply](https://github.com/shimo4228/skill-comply): measures whether agents actually follow skill / rule definitions (v0.3.0)
- [context-sync](https://github.com/shimo4228/context-sync): audits and fixes project documentation roles
- [skill-stocktake](https://github.com/shimo4228/skill-stocktake): quality audit for skills and commands
- [rules-distill](https://github.com/shimo4228/rules-distill): scan installed skills, extract cross-cutting principles, and distill them into rules
- [learn-eval](https://github.com/shimo4228/learn-eval): extract reusable patterns from sessions, self-evaluate quality, and save to the right location
- [daily-research](https://github.com/shimo4228/daily-research): cron-driven daily research digest — theme selection, multi-stage web research, LLM-as-Judge evaluation
