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.
npx skills add darellchua2/opencode-config-template --skill search-first-skillgit clone --depth 1 https://github.com/darellchua2/opencode-config-templateWrote 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.
[](https://agentmods.dev/skills/darellchua2/opencode-config-template/search-first-skill)<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>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.
| Model | Per session | Once 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 |
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 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:
- Need Analysis: Define what functionality is needed and identify constraints
- Parallel Search: Search local codebase, package registries, and web simultaneously
- Evaluate Options: Score candidates against quality criteria
- Decide: Choose a strategy using the Adopt / Extend / Compose / Build matrix
- 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 |
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.
- 4d ago First seen · 319 lines · 27 tokens per session scan C 70534817b9fc
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.
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…
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…
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…
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…
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…
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…