ask

A codebase question-and-answer workflow that explains how a project works using evidence from its files and code relationships.

In plain words
What is it for?
Use it to locate features, trace flows such as indexing or authentication, and understand subsystems with file-and-line references.
Why use it?
It reduces the time needed to find unfamiliar code and prevents explanations based on made-up file locations.

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/mimfort/rag_for_git/ask
Any agent
npx skills add mimfort/rag_for_git --skill ask
Clone the repo
git clone --depth 1 https://github.com/mimfort/rag_for_git

Made for: Claude Code, Codex.

Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,531 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.00100 $0.01531
Opus 5 $0.00050 $0.00766
Sonnet 5 $0.00020 $0.00306
Haiku 4.5 $0.00010 $0.00153

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

Security

Grade A, and why

ask 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 2d 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.

plugin/skills/ask/SKILL.md · 107 lines

How it starts

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

Ask (codebase Q&A)

Answer a free-text question about the codebase with a grounded response: every claim is backed by a real path:line citation, never an invented path. Built on the reviewer MCP server (hybrid RAG + code graph). This skill reads and explains; it does NOT modify code or review PRs.

Always answer the user in Russian (the project language), regardless of this file's language. Tool calls, code identifiers, and path:line citations stay verbatim.

Inputs

$ARGUMENTS — a free-text question about the code (e.g. "where is authentication", "how does index freshness work", "explain the retrieval pipeline").

Tools

Use the session-less tools above.

Plus the harness file tools (Read, Grep, Glob) to read source from the local clone on disk.

Pipeline

  1. Resolve repo/branch.
    • repo: git remote get-url origin → strip a trailing .git, take the last two path segments (owner/name). Pass "" to let the server use DEFAULT_REPO if origin is missing.
    • branch:

Freshness check (first code question of the session only). After resolving repo/branch and ONLY on the first code question in this conversation — rely on conversation memory: if you have already checked index freshness earlier in this session, skip this — run uvx --from rag-reviewer reviewer status <path> --branch <branch> --json and read drift. If drift > 0, emit exactly one banner line, in Russian: «⚠ индекс отстаёт на N коммитов, ответ может не учитывать свежие изменения → rag-reviewer:sync-codebase». Do NOT block, reindex, ask for confirmation, or call sync_board — this is warn-only. Cost ≈ 0 Voyage (reads index_meta + local git). Fail-open: any error → skip the banner silently (Q&A is latency-sensitive).

1.5. Subsystem prior (cheap, optional). Call get_subsystem_summaries(repo, branch, query="<the user's question>"). At scale (summary count above the deploy threshold) this returns the top-k subsystems nearest the question; on small repos it returns all (back-compat). If it returns summaries, use the one matching the question's subsystem as a high-level orientation before search_codebase — this cuts exploration steps for architectural / "how does subsystem X work" questions. The summary is only a prior: every path:line you cite in the answer still comes from real code (search_codebase / Read), never from the summary text. Fail-open: empty / unavailable → skip this step and proceed exactly as before.

Read the full file on GitHub · 107 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. 2d ago First seen · 107 lines · 100 tokens per session scan A 1724fcce2cdb

Subscribe to this mod's changes

ask is a skill published in the GitHub repository mimfort/rag_for_git (21 stars, last pushed 2d ago), licensed MIT. It adds 100 tokens to every session and 1,531 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

graft

This repo is indexed by graft/. For ANY task here, whether understanding how something works, finding where code lives, tracing what calls a symbol or what a change breaks, or scoping an edit, get your context from graft before grepping or reading source files.

trailhq/Graft · 56 tokens

roam

Codebase comprehension via roam-code CLI. Use when exploring codebases, planning modifications, debugging failures, assessing PR risk, or checking architecture health. Triggers on: understanding project structure, pre-change safety checks, finding symbols/files, blast radius analysis, affected tests, health scoring…

Cranot/roam-code · 86 tokens

code-graph

This skill should be used when understanding code structure, finding dependencies between functions/classes, tracing call graphs, or exploring code relationships. Trigger phrases include 'code graph', 'call graph', 'who calls', 'what calls', 'find dependencies', 'code structure', 'inheritance', 'find paths'.

FalkorDB/code-graph · 64 tokens

agentmap

Use for TypeScript/JavaScript codebase navigation — symbol lookup, blast radius, reuse checks, and repo orientation. Prefer agentmap before serial grep when exploring imports, exports, or where a symbol lives. Package is @raymondchins/agentmap (not the unrelated npm package agentmap).

raymondchins/agentmap · 64 tokens

m1nd-operator

Use when the user mentions m1nd or when repo investigation, search, review, docs/spec work, or risky change prep should go through m1nd first before grep, glob, or manual file reads. Covers m1nd-first routing, L1GHT and universal document ingestion, risky edit preparation, document-to-code binding, the served owner +…

maxkle1nz/m1nd · 111 tokens

m1nd-first

Use when investigating a repository, searching for implementation, reviewing changes, working from specs/docs, or preparing a risky code change in an environment where m1nd is available. This doctrine makes m1nd the first investigative layer before grep, glob, or manual file reads, except when the task is pure…

maxkle1nz/m1nd · 78 tokens