search-infra

search-infra is a skill for Claude Code, Codex from kouroshez/coding-os. It costs 195 tokens per session (2,176 once invoked), scanned A, original, Apache-2.0.

A guide to building search systems that find and rank text or semantically similar content. It covers traditional full-text search, which matches words, and vector search, which compares meaning using numerical representations.

In plain words
What is it for?
Use it when adding a search box, autocomplete, similar-item search, filters, relevance tuning, synonyms, typo tolerance, or synchronization between a database and a search index.
Why use it?
It helps solve problems such as irrelevant results, poor typo handling, missing filters, and search indexes getting out of sync with the main database. It also helps decide which kind of search fits a product.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding a search box, autocomplete, similar-item search, filters, relevance tuning, synonyms, typo tolerance, or synchronization between a database and a search index.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kouroshez/coding-os/search-infra
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 kouroshez/coding-os --skill search-infra
Clone the repo
git clone --depth 1 https://github.com/kouroshez/coding-os

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-infra

README.md
[![agentmods](https://agentmods.dev/badge/skills/kouroshez/coding-os/search-infra.svg)](https://agentmods.dev/skills/kouroshez/coding-os/search-infra)
Your own site
<a href="https://agentmods.dev/skills/kouroshez/coding-os/search-infra"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/search-infra.svg" alt="Measured on agentmods" height="20"></a>
Per session 195 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,176 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00195 $0.02176
Opus 5 $0.00097 $0.01088
Sonnet 5 $0.00039 $0.00435
Haiku 4.5 $0.00019 $0.00218

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

Security

Grade A, and why

search-infra 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 7d 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.

src/core/skills/search-infra/SKILL.md · 110 lines

How it starts

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

Search Infrastructure — Ranked Retrieval Done Right

A practical guide to building search that returns the relevant result, not just a matching row. Covers classic full-text (inverted index, BM25) and modern semantic (embeddings, vector ANN) retrieval, and the index-sync discipline that keeps either honest. Stack-agnostic; recipes target Elasticsearch/OpenSearch, Meilisearch, Typesense, and pgvector/Qdrant as the reference engines.

When to Use This Skill

  • Adding a search box, autocomplete, or "find similar" to a product.
  • Choosing a search engine — managed Elastic vs Meilisearch vs Typesense vs Postgres FTS vs a vector DB.
  • Designing an index mapping: which fields are searchable, which are filters, which analyzer.
  • Tuning relevance — results are "technically matching but useless", boosting, synonyms, typo tolerance.
  • Deciding keyword vs vector vs hybrid retrieval for a given query distribution.
  • Keeping the search index consistent with the database that owns the data.

Skip when: the lookup is by exact key / known field on a small set — that is a database index (WHERE id = ?), see db-design, not a search engine. Search earns its complexity only for ranked, fuzzy, or free-text retrieval.

The Index Is Derived, Never the Source of Truth

The single most important rule: the search index is a denormalized, rebuildable projection of data that lives authoritatively elsewhere (the transactional DB). It is eventually consistent and disposable.

  • Never write user data only to the search engine. If the index is lost, it must be reconstructable from the source of truth by a full reindex.
  • The index is denormalized on purpose — flatten the joins at index time so query time is a single fast lookup. This is the opposite of the normalized source schema (db-design owns that), and that is correct.
  • Accept eventual consistency: a document may be ~seconds stale after a write. If a use case cannot tolerate any staleness, read it from the DB, not the index.

Read the full file on GitHub · 110 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. 7d ago First seen · 110 lines · 195 tokens per session scan A 8b8887c3a761

Subscribe to this mod's changes

search-infra is a skill published in the GitHub repository kouroshez/coding-os (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 195 tokens to every session and 2,176 once invoked, about $0.0010 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-31.

Related

Other skills, from other repositories

booboo-adapter

Feed data into a Booboo brain that the built-in postgres and json adapters do not cover — write a small config-driven adapter against the spec instead of forking the builder. Use when a source is Neo4j, an API, a CSV export, a proprietary store, or any shape the standard config cannot express.

jessymariau/booboo · 71 tokens

graph-mutation-plan

Cookbook for composing an applygraphmutations plan — stable entitykey patterns, the canonical label/edge vocabulary, evidence/invalidation/confidence discipline, and a worked example. Load this when building a non-trivial mutation plan.

potpie-ai/potpie · 51 tokens

potpie-cli

Use when the task is centered on running, explaining, configuring, or troubleshooting the potpie command: doctor, login, pot management, source registration, search, graph workbench reads/writes, and pot scope behavior.

potpie-ai/potpie · 50 tokens

potpie-change-timeline

Use when an agent needs recent or historical change context: what changed recently, regressions, merged PRs, tickets, docs, incidents, deployments, releases, and source-history ingestion.

potpie-ai/potpie · 43 tokens

potpie-infra-architecture

Use for project infra and architecture context: environments, adapters, runtime configuration, deployments, service dependencies, datastores, API contracts, ownership, incidents, and dependency blast radius.

potpie-ai/potpie · 43 tokens

gonavi-cli

Operate databases through the GoNavi headless CLI — the gonavi executable shipped in verified GitHub Release archives. Covers listing/adding/importing saved connections, running SQL queries against saved connections or ad-hoc connection files, exporting result sets to csv/json/md/html/xlsx, batch-executing SQL files…

Syngnat/GoNavi · 144 tokens