Claude Skill

search-first

A workflow that searches for an existing solution (this repo → internal mirrors → package registries → MCP/skills → GitHub) before writing new code. Triggers right before adding a new feature/utility/dependency, or the moment a "add feature X" request tempts you to jump straight

LLM Mart · 0 points · 12 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download leeyudok-agents-scaffold-presets_lang-en_base_.claude_skills_search-first-1b2f034.zip · 1 KB
Part of leeyudok/agents-scaffold — 32 skills

Install

skills CLI npx skills add https://github.com/LeeYudok/agents-scaffold/tree/main/presets/lang-en/base/.claude/skills/search-first
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install leeyudok-agents-scaffold@llmmart
Git git clone https://github.com/LeeYudok/agents-scaffold.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole leeyudok/agents-scaffold collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

search-first — search before you build

A workflow to avoid reinventing the wheel. Custom code is the last resort when the search comes up empty.

When it triggers

  • The moment you're about to build a new feature/utility/helper that likely already has an existing solution
  • Right before adding a dependency or integration (external API, parser, client, etc.)
  • The moment you receive an "add feature X" request and are about to jump straight to code

Search order (inner → outer)

Order Channel Method
1 This repo Sweep related modules/tests with rg — it may already exist and simply be unnoticed
2 Internal mirrors Check <your-git-host>/mirrors/ group first (mirrors of OSS agents/skills/icons, etc.). Bring external originals in via the mirror rather than referencing them directly. Skip if there's no mirror group
3 Package registries npm / PyPI / crates.io / etc., whichever fits the project's stack
4 MCP / skills Check whether an already-connected MCP server provides the feature, or whether the same skill exists under .claude/skills/
5 GitHub / web Search for a maintained OSS implementation or template. If adopted, fork it into mirrors before use

If a channel is unavailable (offline, no auth, etc.), don't silently skip it — state explicitly which channel could not be checked.

Evaluate → decide

Evaluate candidates on feature fit / maintenance status (recent commits, issue responsiveness) / license / dependency weight.

Signal Decision
Exact fit + well maintained + MIT/Apache Adopt — install and use as-is
Partial fit + good foundation Extend — install + thin wrapper
Several weak candidates Combine — compose 2-3 small packages
Nothing usable Build from scratch — but informed by the designs seen during the search

Delegate non-trivial features to a subagent

Agent(subagent_type="general-purpose", model="sonnet", prompt="
  Investigate existing solutions for the following feature: [description]
  Language/framework: [stack], constraints: [if any]
  Search: this repo → internal mirrors (<your-git-host>/mirrors) → npm/PyPI → MCP → GitHub
  Return: a candidate comparison table + a recommendation to adopt/extend/build from scratch
")

Anti-patterns

  • Straight to code: writing a utility from scratch without searching
  • Ignoring mirrors: referencing a GitHub original directly (the rule is to bring it into the internal mirror first, then use it)
  • Silent skipping: reporting "nothing found" when a search channel was actually unreachable
  • Over-wrapping: wrapping a library so heavily that its advantages are lost
  • Dependency bloat: pulling in a massive package for one small feature
Files (agents-scaffold)
  • SKILL.md 3.3 KB
    ---
    name: search-first
    description: A workflow that searches for an existing solution (this repo → internal mirrors → package registries → MCP/skills → GitHub) before writing new code. Triggers right before adding a new feature/utility/dependency, or the moment a "add feature X" request tempts you to jump straight to code. (Origin: the search-first skill from [affaan-m/ECC](https://github.com/affaan-m/ECC), MIT — ported and adapted)
    allowed-tools: Bash, Read, Grep, Glob, WebSearch, WebFetch
    ---
    
    # search-first — search before you build
    
    A workflow to avoid reinventing the wheel. Custom code is the **last resort when the search comes up empty**.
    
    ## When it triggers
    
    - The moment you're about to build a new feature/utility/helper that likely already has an existing solution
    - Right before adding a dependency or integration (external API, parser, client, etc.)
    - The moment you receive an "add feature X" request and are about to jump straight to code
    
    ## Search order (inner → outer)
    
    | Order | Channel | Method |
    |---|---|---|
    | 1 | **This repo** | Sweep related modules/tests with `rg` — it may already exist and simply be unnoticed |
    | 2 | **Internal mirrors** | Check `<your-git-host>/mirrors/` group first (mirrors of OSS agents/skills/icons, etc.). Bring external originals in via the mirror rather than referencing them directly. Skip if there's no mirror group |
    | 3 | **Package registries** | npm / PyPI / crates.io / etc., whichever fits the project's stack |
    | 4 | **MCP / skills** | Check whether an already-connected MCP server provides the feature, or whether the same skill exists under `.claude/skills/` |
    | 5 | **GitHub / web** | Search for a maintained OSS implementation or template. If adopted, fork it into mirrors before use |
    
    If a channel is unavailable (offline, no auth, etc.), **don't silently skip it** — state explicitly which channel could not be checked.
    
    ## Evaluate → decide
    
    Evaluate candidates on feature fit / maintenance status (recent commits, issue responsiveness) / license / dependency weight.
    
    | Signal | Decision |
    |---|---|
    | Exact fit + well maintained + MIT/Apache | **Adopt** — install and use as-is |
    | Partial fit + good foundation | **Extend** — install + thin wrapper |
    | Several weak candidates | **Combine** — compose 2-3 small packages |
    | Nothing usable | **Build from scratch** — but informed by the designs seen during the search |
    
    ## Delegate non-trivial features to a subagent
    
    ```
    Agent(subagent_type="general-purpose", model="sonnet", prompt="
      Investigate existing solutions for the following feature: [description]
      Language/framework: [stack], constraints: [if any]
      Search: this repo → internal mirrors (<your-git-host>/mirrors) → npm/PyPI → MCP → GitHub
      Return: a candidate comparison table + a recommendation to adopt/extend/build from scratch
    ")
    ```
    
    ## Anti-patterns
    
    - **Straight to code**: writing a utility from scratch without searching
    - **Ignoring mirrors**: referencing a GitHub original directly (the rule is to bring it into the internal mirror first, then use it)
    - **Silent skipping**: reporting "nothing found" when a search channel was actually unreachable
    - **Over-wrapping**: wrapping a library so heavily that its advantages are lost
    - **Dependency bloat**: pulling in a massive package for one small feature
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related