/tea-rags:indexfrom tea-rags
Indexes or reindexes a codebase: registers new projects, performs incremental updates on indexed ones, or force-reindexes corrupt indices. Handles infra errors gracefully.
Ships in tea-rags. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Branches (plan names every one that can apply — path unknown, or registration
not yet checked via list_projects, = all of them; a digest alias is not a
registration check). Every plan ends with step 5 — report the full result (all
metrics + duration) — even when nothing ran:
tea-rags index-codebase <path> --name <alias> — the CLI,
NOT the MCP tool (index_codebase has no name param). Declined →
index_codebase(path=<path>), no alias.index_codebase(project=<alias>) (changed
files only)./tea-rags:force-reindex, never
incremental.[QDRANT_UNAVAILABLE], [OLLAMA_UNAVAILABLE], embedding /
connection error from any call) → STOP: read the code + Hint (the fix, e.g.
docker-compose up / ollama serve), ask the user (AskUserQuestion) to
apply it, WAIT for the explicit answer. Never run the fix unasked, never index
anyway. After the answer → LIVE get_index_status retry. Ollama down ≠
find_symbol / hybrid_search BM25 down (tea-rags://guide/degraded).Broken / corrupt index (user reports wrong, garbage, crooked data, "index
broke") → stop here, route /tea-rags:force-reindex (full rebuild, asks
confirmation). Incremental re-reads changed files only — corrupt unchanged
content stays. Never forceReindex: true from this skill. Same route for
schema / payload drift ("payload schema changed", "new fields require reindex
to populate") with no Run: line naming the plain incremental: incremental
never populates new fields in unchanged files — say so, route
/tea-rags:force-reindex (it asks consent). Do NOT stall asking the user for
the Run: line first: the message already decides it.
path from message / argument; absent → cwd. Linked git worktree
(git rev-parse --git-common-dir ≠ <path>/.git) of registered repo → do
NOT register or index — the plan has NO index_codebase step, not even a
planned one, and this check runs BEFORE any next-call line; read tools
already answer for that tree (tea-rags://guide/freshness, linked worktree).
Say literally: "Not indexing: read tools (project + path=) already
answer for this tree." --project <alias> reindex refreshes main checkout
only, never worktree edits. Index worktree as own project only if user
insists (seeds separate project).
Registered? mcp__tea-rags__list_projects → entry with path = target AND
non-empty name (recovery auto-created entries have name=""). Default rows
are compact (alias, path, counts, worktreeOf) — enough for this check;
list_projects(project: "<alias>") returns that one full record.
Not registered → register + index, one command. Default alias = final
non-empty path segment, lowercased, non-alphanumeric → -, p- prefix if
starts w/ digit. MUST match ^[a-z0-9][a-z0-9_-]{0,63}$. Example:
/Users/me/Dev/Tools/Tea-RAGs MCP → tea-rags-mcp.
<alias>?
(recommended — lets MCP tools address it by name instead of path.)" Offer
alias override.tea-rags index-codebase <path> --name <alias> (CLI;
never index_codebase(name=…)). [INPUT_PROJECT_NAME_NOT_UNIQUE] →
suggest numeric suffix (<alias>-2), retry once.mcp__tea-rags__index_codebase (path); user registers later
w/ tea-rags projects register --path <path> --name <alias>.Registered → incremental reindex. mcp__tea-rags__index_codebase w/
project: <alias> (or path). No re-register.
Report full result (all metrics + duration), + alias when step 3 ran
--name.
forceReindex: true → /tea-rags:force-reindex.--name makes registering free.mcp__tea-rags__register_project on first index — index-codebase --name
does both. register_project only re-points existing alias.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub artk0de/tearags-mcp --plugin tea-rags17 skills in this plugin
/analytics-rerankPick tea-rags rerank preset, build `{custom: {...}}` weight set, or compose analytics-driven search (ownership, tech-debt, hotspots, code-review, security-audit, fragile-silo). Invoke on intent like "rank by ownership", "find tech debt", "hotspot scan", "code review of recent changes", "security audit of auth code", "code that looks stable but breaks a lot", "custom weights for impact analysis". NOT for project health scan needing cross-preset overlap — use `tea-rags:risk-assessment`. NOT for debug root-cause — use `tea-rags:bug-hunt`. NOT for filter shape — use `tea-rags:filter-building`./architecture-diagnosticsDiagnose structural violations for an explicit architecture audit, an explicit invocation of this skill, or structural refactoring. Assess dependency/layer violations, coupling and move candidates. Not for context gathering, code overviews, behavior or contract questions, or routine feature work. Risk/health uses risk-assessment; failures use bug-hunt; plain cycles use find_cycles./bug-huntFind source of concrete failure — rank historically buggy code (high bugFixRate + churn) AND freshly changed never-fixed code (committed or still uncommitted) against symptom. Triggers on "debug X", "why does Y fail", "test fails", "stack trace says Z", "find bugs in X", "found a bug in X — show / compare Y", "suspects in X and Y — search both", a search hit with bugFixRate / ageDays labels ("proceed?", "проверь там"), "where is error 'X' in code", "где в коде строка / упоминается 'X'", "when did error 'X' appear in git history", "когда появилась ошибка 'X'", "read the whole file" / "прочитай весь файл" of a search hit, "падает". NOT for code history without an error string or failure ("when did X change", "посмотри через git" alone) — core routing answers it. NOT for code health scanning without bug intent — use risk-assessment for that./data-driven-generationDecide HOW to write or change code by inspecting git signals on neighbors — classifies task mode (CREATE / EXTEND / MODIFY), pulls strategy and templates from proven low-churn implementations, reuses existing shared helpers. Triggers on "implement function X", "add method to class Y", "write a helper for Z", "modify function X", "change behavior of Y", "напиши функцию", "добавь метод", "поправь метод", "измени поведение", "overlay labels → strategy?", a hotfix with location + fix named (cause known → not bug-hunt). NOT for discovery — use tea-rags:explore. NOT for pure rename/extract; a file MOVE still routes here./exploreUse for questions about existing code behavior, usages, structure, examples, or explicit pre-change context that need investigation. Not bug symptoms, implementation-plan authoring, or broad code-health audits./extract-project-patternsAgentic-only — runs on any behaviorQuery / positiveIds handoff: proven code as code-gen templates, not test patterns. Returns templates + locality (target subdomain → infra prefix → project). Read body before planning. Called by data-driven-generation Step 2, dinopowers writing-plans / executing-plans. No input → returns { templates: [], locality: "none", diagnostics: ["no input"] }, zero calls.Other plugins' skills for the same job