coding-agent-orchestration: Skill for Codex

.codex/skills/rag-index/SKILL.md

rag-index is a skill for Codex from brifl/coding-agent-orchestration. It costs 17 tokens per session (594 once invoked), scanned A, original, MIT.

Experimental tools for scanning a repository, building a searchable SQLite index, and retrieving relevant code or documentation for prompts. RAG means retrieval-augmented generation: finding useful project context before generating an answer.

In plain words
What is it for?
Use it to create repository manifests, build or update an index, search for terms, and format matching code chunks as prompt context.
Why use it?
It helps an agent locate relevant files and code sections without loading the entire repository. Incremental indexing updates only changed or removed files and chunks.

Skill for Codex

Written for Codex: installed under .codex/.

This is brifl/coding-agent-orchestration's own configuration. It tells Codex how to work on coding-agent-orchestration itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything coding-agent-orchestration configures →

Reuse

Borrowing it

Nothing to install: this file belongs to brifl/coding-agent-orchestration. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/brifl/coding-agent-orchestration/main/.codex/skills/rag-index/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/brifl/coding-agent-orchestration

Made for: 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 rag-index

README.md
[![agentmods](https://agentmods.dev/badge/skills/brifl/coding-agent-orchestration/rag-index/github.svg)](https://agentmods.dev/skills/brifl/coding-agent-orchestration/rag-index)
Your own site
<a href="https://agentmods.dev/skills/brifl/coding-agent-orchestration/rag-index"><img src="https://agentmods.dev/badge/skills/brifl/coding-agent-orchestration/rag-index/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rag-index

Your own site · 80×15
<a href="https://agentmods.dev/skills/brifl/coding-agent-orchestration/rag-index"><img src="https://agentmods.dev/badge/skills/brifl/coding-agent-orchestration/rag-index.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 594 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.00017 $0.00594
Opus 5.5 $0.00007 $0.00238
Sonnet 5.5 $0.00003 $0.00119
Haiku 4.5 $0.00002 $0.00059

Measured 2mo ago against content hash 7d936234ad52, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rag-index 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 2mo ago.

The scan reads SKILL.md. This mod also ships 5 executable files (chunker.py, indexer.py, retrieve.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.codex/skills/rag-index/SKILL.md · 61 lines

How it starts

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

rag-index

Purpose

Prototype utilities for building a repo index used by retrieval-augmented prompts. The workflow is scan -> index -> retrieve, with a one-shot pipeline for ad-hoc use.

Scripts

  • scanner.py — recursive directory scanner that emits deterministic JSON manifests
  • indexer.py — chunk-aware SQLite index builder and lexical search (build, search)
  • retrieve.py — prompt-context formatter that consumes chunk-level search results (retrieve, pipeline)

How to use

  1. Generate a manifest (scanner):
    • python3 scanner.py <path1> <path2> --output manifest.json
    • Common options:
      • --file-types .py .md
      • --max-depth 2
      • --exclude "*.venv*" "*.git*"
      • --stats to print exclusion counts
  2. Build/update an index (indexer):
    • python3 indexer.py build --manifest manifest.json --output index.db
    • Incremental behavior:
      • unchanged files are skipped
      • changed files update only changed chunks
      • removed files/chunks are deleted
  3. Search the index (indexer):
    • python3 indexer.py search "query" --index index.db --top-k 5
    • Returns chunk-level records (path, rel_path, start_line, end_line, chunk_id, snippet)
  4. Retrieve prompt-ready context (retrieve):
    • python3 retrieve.py "query" --index index.db --top-k 5
    • Useful options:
      • --max-context-chars 8000 hard output budget
      • --max-per-file 3 diversity cap
      • --mode lex|sem|hybrid (sem uses TF-IDF cosine; hybrid blends lexical + semantic scores)
  5. One-shot pipeline (retrieve):
    • python3 retrieve.py pipeline "query" --dirs <path1> <path2>
    • Optional:
      • --index /tmp/rag.db to persist index
      • --max-depth 2
      • --file-types .py .md
    • This runs scan -> build -> retrieve in one command.

When to use RAG

Use RAG when:

  • the question depends on repository-specific behavior or contracts
  • the answer needs exact symbols, paths, config keys, or line ranges
  • the agent is uncertain and needs grounded evidence from code/docs

Read the full file on GitHub · 61 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago First seen · 61 lines · 17 tokens per session scan A 7d936234ad52

Subscribe to this mod's changes

rag-index is a skill published in the GitHub repository brifl/coding-agent-orchestration (22 stars, last pushed 15d ago), licensed MIT. It adds 17 tokens to every session and 594 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other skills, from other repositories

embeddings

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

ruvnet/ruflo · 62 tokens

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

9router-embeddings

Generate vector embeddings via 9Router /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia / GitHub embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text.

decolua/9router · 66 tokens

embedding-strategies

Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.

foryourhealth111-pixel/Vibe-Skills · 37 tokens

similarity-search-patterns

Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.

foryourhealth111-pixel/Vibe-Skills · 30 tokens