search-first

search-first is a skill for Claude Code, Codex from rexleimo/aios. It costs 38 tokens per session (640 once invoked), scanned A, original, MIT.

A research-before-building workflow for software changes, dependencies, integrations, utilities, or copied code patterns.

In plain words
What is it for?
Searching the local repository, existing skills, scripts, and documentation, then deciding whether to adopt, extend, combine, or build a solution.
Why use it?
It helps prevent rebuilding something that already exists and reduces compatibility problems across coding-agent tools.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/rexleimo/aios/search-first
Any agent
npx skills add rexleimo/aios --skill search-first
Clone the repo
git clone --depth 1 https://github.com/rexleimo/aios

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/rexleimo/aios/search-first.svg)](https://agentmods.dev/skills/rexleimo/aios/search-first)
Your own site
<a href="https://agentmods.dev/skills/rexleimo/aios/search-first"><img src="https://agentmods.dev/badge/skills/rexleimo/aios/search-first.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 640 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00038 $0.00640
Opus 5 $0.00019 $0.00320
Sonnet 5 $0.00008 $0.00128
Haiku 4.5 $0.00004 $0.00064

Measured 3d ago against content hash d85001253067, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

search-first scanned grade A with 0 findings 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill-sources/search-first/SKILL.md · 58 lines

How it starts

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

Search First

Trigger

Use this skill before you:

  • Add a new feature or workflow step
  • Introduce a new dependency, MCP server, or CLI integration
  • Write a new utility/helper that might already exist
  • Copy patterns from another repo (porting)

Outcome

Pick one of: Adopt, Extend, Compose, Build, with a short justification and evidence.

Workflow (Fast)

  1. Define the need

    • What is the smallest outcome that solves the problem?
    • Constraints: platform (macOS/Linux/Windows), clients (codex/claude/gemini/opencode), offline needs, security posture.
  2. Search locally (before the internet)

    • CRG (if codemap installed): semantic_search_nodes(query="<keyword>") then query_graph(pattern="callers_of"|"callees_of"|"tests_for", target="<name>") — returns structural context that text search cannot provide
    • Code: rg -n "<keyword>" in the repo (fallback when CRG doesn't cover what you need)
    • Scripts: check scripts/ for existing lifecycle/doctor commands.
    • Docs: check README* and docs/.
  3. Search existing skills

    • Repo-local: .codex/skills, .claude/skills, .agents/skills.
    • Global: ~/.codex/skills, ~/.claude/skills, ~/.gemini/skills, ~/.config/opencode/skills.
    • Prefer reusing an existing skill name over creating a near-duplicate.
  4. Search the ecosystem (when needed)

    • Prefer official docs and primary sources (project docs, RFCs, standards).
    • Prefer maintained, well-scoped libraries over bespoke code.
    • For agent tooling, check if an MCP server already provides the capability.
  5. Decide

    • Adopt: exact match, maintained, acceptable license.
    • Extend: mostly fits; add thin wrapper/adapter.
    • Compose: 2-3 small pieces together beat 1 big framework.
    • Build: no good option; implement minimal + document why.
  6. Record evidence

    • Note what you searched, what you found, and why you chose the approach.
    • If a decision affects cross-CLI behavior, add it to a docs/plans/ artifact.

Read the full file on GitHub · 58 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. 3d ago First seen · 58 lines · 38 tokens per session scan A d85001253067

Subscribe to this mod's changes

search-first is a skill published in the GitHub repository rexleimo/aios (52 stars, last pushed 5d ago), licensed MIT. It adds 38 tokens to every session and 640 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.