search-first
royaluniondesign-sys/claude-os/.claude/skills/search-first/SKILL.md
Research-before-coding workflow. Search for existing tools, libraries, and patterns before writing custom code. Invokes the researcher agent.
Skill1 starsChanged 7 months ago
- Installs packages
What's in it
- /search-first — Research Before You Code
- Trigger
- Workflow
- Decision Matrix
- How to Use
- Quick Mode (inline)
- Full Mode (agent)
- Search Shortcuts by Category
- Development Tooling
- AI/LLM Integration
- Data & APIs
- Content & Publishing
- Integration Points
- With planner agent
- With architect agent
- With iterative-retrieval skill
- Examples
- Example 1: "Add dead link checking"
- Example 2: "Add HTTP client wrapper"
- Example 3: "Add config file linter"
- Anti-Patterns
--- name: search-first description: Research-before-coding workflow. Search for existing tools, libraries, and patterns before writing custom code. Invokes the researcher agent. origin: ECC --- # /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 ``` ┌─────────────────────────────────────────────┐ │ 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: 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 template? → Search GitHub ### 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
More agent context in royaluniondesign-sys/claude-os
71 other files this repository gives its agents, the first 60 shown.
CLAUDE.md
Skill
- api-design.claude/skills/api-design/SKILL.md
- article-writing.claude/skills/article-writing/SKILL.md
- backend-patterns.claude/skills/backend-patterns/SKILL.md
- clickhouse-io.claude/skills/clickhouse-io/SKILL.md
- coding-standards.claude/skills/coding-standards/SKILL.md
- configure-ecc.claude/skills/configure-ecc/SKILL.md
- content-engine.claude/skills/content-engine/SKILL.md
- content-hash-cache-pattern.claude/skills/content-hash-cache-pattern/SKILL.md
- continuous-learning.claude/skills/continuous-learning/SKILL.md
- continuous-learning-v2.claude/skills/continuous-learning-v2/SKILL.md
- cost-aware-llm-pipeline.claude/skills/cost-aware-llm-pipeline/SKILL.md
- cpp-coding-standards.claude/skills/cpp-coding-standards/SKILL.md
- cpp-testing.claude/skills/cpp-testing/SKILL.md
- database-migrations.claude/skills/database-migrations/SKILL.md
- deployment-patterns.claude/skills/deployment-patterns/SKILL.md
- django-patterns.claude/skills/django-patterns/SKILL.md
- django-security.claude/skills/django-security/SKILL.md
- django-tdd.claude/skills/django-tdd/SKILL.md
- django-verification.claude/skills/django-verification/SKILL.md
- docker-patterns.claude/skills/docker-patterns/SKILL.md
- e2e-testing.claude/skills/e2e-testing/SKILL.md
- eval-harness.claude/skills/eval-harness/SKILL.md
- foundation-models-on-device.claude/skills/foundation-models-on-device/SKILL.md
- frontend-patterns.claude/skills/frontend-patterns/SKILL.md
- frontend-slides.claude/skills/frontend-slides/SKILL.md
- golang-patterns.claude/skills/golang-patterns/SKILL.md
- golang-testing.claude/skills/golang-testing/SKILL.md
- investor-materials.claude/skills/investor-materials/SKILL.md
- investor-outreach.claude/skills/investor-outreach/SKILL.md
- iterative-retrieval.claude/skills/iterative-retrieval/SKILL.md
- java-coding-standards.claude/skills/java-coding-standards/SKILL.md
- jpa-patterns.claude/skills/jpa-patterns/SKILL.md
- liquid-glass-design.claude/skills/liquid-glass-design/SKILL.md
- market-research.claude/skills/market-research/SKILL.md
- nutrient-document-processing.claude/skills/nutrient-document-processing/SKILL.md
- postgres-patterns.claude/skills/postgres-patterns/SKILL.md
- project-guidelines-example.claude/skills/project-guidelines-example/SKILL.md
- python-patterns.claude/skills/python-patterns/SKILL.md
- python-testing.claude/skills/python-testing/SKILL.md
- regex-vs-llm-structured-text.claude/skills/regex-vs-llm-structured-text/SKILL.md
- security-review.claude/skills/security-review/SKILL.md
- security-scan.claude/skills/security-scan/SKILL.md
- seo-audit.claude/skills/seo-audit/SKILL.md
- seo-competitor-pages.claude/skills/seo-competitor-pages/SKILL.md
- seo-content.claude/skills/seo-content/SKILL.md
- seo-geo.claude/skills/seo-geo/SKILL.md
- seo-hreflang.claude/skills/seo-hreflang/SKILL.md
- seo-images.claude/skills/seo-images/SKILL.md
- seo-page.claude/skills/seo-page/SKILL.md
- seo-plan.claude/skills/seo-plan/SKILL.md
- seo-programmatic.claude/skills/seo-programmatic/SKILL.md
- seo-schema.claude/skills/seo-schema/SKILL.md
- seo-sitemap.claude/skills/seo-sitemap/SKILL.md
- seo.claude/skills/seo/SKILL.md
- seo-technical.claude/skills/seo-technical/SKILL.md
- skill-stocktake.claude/skills/skill-stocktake/SKILL.md
- springboot-patterns.claude/skills/springboot-patterns/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

