search-first-skill

search-first-skill is a skill for OpenCode from darellchua2/opencode-config-template. It costs 27 tokens per session (2,929 once invoked), scanned C, original, Apache-2.0.

A research-first workflow for deciding whether to adopt an existing tool, extend it, combine tools, or build something new before coding.

In plain words
What is it for?
Use it when starting a feature, adding a dependency, choosing between libraries, or deciding whether a helper or abstraction should be built from scratch.
Why use it?
It helps avoid duplicating libraries, utilities, or integrations that already exist and makes technology choices easier to compare.

Skill for OpenCode

Written for OpenCode: installed under .opencode/. Also seen: mentions subagents; mentions OpenCode.

Good fit Use it when starting a feature, adding a dependency, choosing between libraries, or deciding whether a helper or abstraction should be built from scratch.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/darellchua2/opencode-config-template/search-first-skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add darellchua2/opencode-config-template --skill search-first-skill
Clone the repo
git clone --depth 1 https://github.com/darellchua2/opencode-config-template

Made for: OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for search-first-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/search-first-skill.svg)](https://agentmods.dev/skills/darellchua2/opencode-config-template/search-first-skill)
Your own site
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/search-first-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/search-first-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,929 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.02929
Opus 5 $0.00014 $0.01465
Sonnet 5 $0.00005 $0.00586
Haiku 4.5 $0.00003 $0.00293

Measured 4d ago against content hash 70534817b9fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade C, and why

search-first-skill scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

When protocol is enabled, this skill defaults to `Iterations: 10` (sufficient for typical single-pass workflows). Override with `Iterations: N` for specific tasks. Safety blocks: `.env`, `node_modules/`, `rm -rf`, `git p
opencode_app/.opencode/skills/search-first-skill/SKILL.md · 319 lines

How it starts

The opening of the file, as written. The whole thing — 319 lines — stays where its author put it; the contents beside it link to each section on GitHub.

What I do

I systematize the "search for existing solutions before implementing" workflow:

  1. Need Analysis: Define what functionality is needed and identify constraints
  2. Parallel Search: Search local codebase, package registries, and web simultaneously
  3. Evaluate Options: Score candidates against quality criteria
  4. Decide: Choose a strategy using the Adopt / Extend / Compose / Build matrix
  5. Implement: Apply the chosen strategy with minimal custom code

When to use me

Use this skill when:

  • Starting a new feature that likely has existing solutions
  • Adding a dependency or integration
  • About to write a utility, helper, or abstraction from scratch
  • Unsure whether to use a library or build custom
  • Evaluating competing libraries for the same purpose

Trigger phrases:

  • "search first"
  • "research before coding"
  • "does this already exist"
  • "find existing solution"
  • "should I build or use a library"
  • "what library should I use for"

Core Workflow

Step 1: Need Analysis

Define what you're looking for before searching:

  • Functionality: What exactly must the solution do?
  • Language / Framework: What are the constraints?
  • License: MIT / Apache / GPL — any restrictions?
  • Maintenance: Active maintenance required? Minimum stars/downloads?
  • Integration: Must work with existing stack (e.g., React 19, Python 3.12)

Step 2: Parallel Search

Search multiple channels simultaneously:

Local Codebase (Search what you already have)
Tool When to Use What It Finds
codegraph_search Symbol lookup Existing functions, classes, modules
codegraph_files File structure Related files and modules
codegraph_explore Deep exploration Implementation patterns and relationships
grep Text search Usage patterns, imports, config
glob File patterns Existing implementations by name
Package Ecosystem (Search registries)
Channel How to Search When
npm (webfetch → npmjs.com) Node.js / TypeScript packages Frontend or Node backend
PyPI (webfetch → pypi.org) Python packages Python backend, ML, data
Go packages (webfetch → pkg.go.dev) Go modules Go microservices
crates.io (webfetch → crates.io) Rust crates Rust projects
Maven Central (webfetch → search.maven.org) Java libraries Java / Spring projects

Read the full file on GitHub · 319 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 319 lines · 27 tokens per session scan C 70534817b9fc

Subscribe to this mod's changes

search-first-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 27 tokens to every session and 2,929 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

agent-optimize

Free-form optimization algorithm for agent orchestration mode: the conversational agent owns the whole search — proposing capability edits itself, screening them cheaply, gating each on full val, and sealing test once. Use when orchestrationmode is agent and algorithmskill is agent-optimize. For a deterministic loop…

skillberry-ai/cap-evolve · 73 tokens

tools

Optimize an agent's OWN tool surface (tools it implements, not an external MCP server). Use when the agent mis-selects tools, fills arguments wrong, calls the same tool N times in a row, or has a confusing, redundant, or oversized toolset. Covers tool names and descriptions, parameter docs, tool schemas, handler code…

skillberry-ai/cap-evolve · 81 tokens

gepa

Runs the GEPA optimization loop (arXiv:2507.19457) — sample-efficient reflective Pareto search. A cheap train-minibatch pre-gate decides whether a proposal is worth an expensive val evaluation, and parents are sampled from a per-instance frontier so specialists survive instead of being averaged away. Use when rollouts…

skillberry-ai/cap-evolve · 111 tokens

diagnose

Extract the learning signal from execution traces — the textual analogue of a gradient. Use between evaluation and proposing edits. Reads a candidate's rollouts and traces, separates good signals to keep from bad signals to fix, builds a reflective dataset (per failing task — Inputs, Generated Outputs, Feedback) and…

skillberry-ai/cap-evolve · 97 tokens

hill-climb

Runs a global hill-climb optimization loop where the parent is always the current best candidate and the val significance gate decides acceptance. Use as the algorithm for most runs — the first run on a new project, binary pass/fail scorers, and small task sets. Pick how each iteration's reflection is focused with…

skillberry-ai/cap-evolve · 120 tokens

skillopt

Runs the SkillOpt single-lineage optimization loop, which organizes a hill-climb into epochs over mini-batches of train tasks under a textual learning rate — an integer edit budget that decays on a constant|linear|cosine schedule — and ends each epoch with one extra gated consolidation step. Parent is always the…

skillberry-ai/cap-evolve · 118 tokens