reindex

reindex is a skill for Claude Code from ArtemioPadilla/agent-triforce. It costs 42 tokens per session (455 once invoked), scanned A, original, MIT.

A tool workflow that scans a codebase and records its files, modules, exports, dependencies, and known problem areas in a JSON index.

In plain words
What is it for?
Use it to rebuild the codebase index, trace imports, find circular or isolated modules, and flag files mentioned in technical-debt or security-review records.
Why use it?
It provides a shared map of the codebase, making it easier for agents to understand how parts of the project connect and where maintenance issues are concentrated.

Skill for Claude Code

Written for Claude Code: context: fork in frontmatter. Also seen: agent in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 tools/codebase-indexer.py --output docs/codebase-index.json.

Good fit Use it to rebuild the codebase index, trace imports, find circular or isolated modules, and flag files mentioned in technical-debt or security-review records.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ArtemioPadilla/agent-triforce
agentmods
npx agentmods add skills/artemiopadilla/agent-triforce/reindex

Made for: Claude Code.

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 reindex

README.md
[![agentmods](https://agentmods.dev/badge/skills/artemiopadilla/agent-triforce/reindex/github.svg)](https://agentmods.dev/skills/artemiopadilla/agent-triforce/reindex)
Your own site
<a href="https://agentmods.dev/skills/artemiopadilla/agent-triforce/reindex"><img src="https://agentmods.dev/badge/skills/artemiopadilla/agent-triforce/reindex/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 reindex

Your own site · 80×15
<a href="https://agentmods.dev/skills/artemiopadilla/agent-triforce/reindex"><img src="https://agentmods.dev/badge/skills/artemiopadilla/agent-triforce/reindex.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 455 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.00042 $0.00455
Opus 5 $0.00021 $0.00228
Sonnet 5 $0.00008 $0.00091
Haiku 4.5 $0.00004 $0.00046

Measured 12d ago against content hash 9d373b8954ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

reindex 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 12d 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.

.claude/skills/reindex/SKILL.md · 54 lines

What it actually says

Rebuild the codebase knowledge index.

Follow these steps:

SIGN IN:

  • Run the SIGN IN checklist from your agent file
  • Check if docs/codebase-index.json exists (rebuild vs fresh build)

INDEX:

  1. Use tools/codebase-indexer.py if available, otherwise perform manual indexing:
    python3 tools/codebase-indexer.py --output docs/codebase-index.json
    
  2. If manual indexing is needed, scan src/ recursively:
    • For each file, extract:
      • Module path (relative to project root)
      • Language (from extension)
      • Exported functions/classes with signatures
      • Import statements (to build dependency graph)
      • File size (lines of code)
  3. Cross-reference with TECH_DEBT.md:
    • Flag files mentioned in tech debt entries as hotspots
  4. Cross-reference with docs/reviews/:
    • Flag files with recent security findings
  5. Build the dependency graph:
    • Module A imports Module B -> edge from A to B
    • Identify circular dependencies
    • Identify orphan modules (not imported by any other module)

VERIFY:

TIME OUT — Index Verification (DO-CONFIRM):

  • All src/ files indexed (count matches find src/ -type f | wc -l)
  • Exported symbols extracted for each file
  • Dependency graph has no missing nodes (every import resolves to a file)
  • Tech debt hotspots flagged
  • Index file is valid JSON
  • Build time under 60 seconds for up to 500 files

SIGN OUT: 6. Report index summary: file count, symbol count, dependency edge count, hotspot count 7. Note if circular dependencies were found 8. Run the SIGN OUT checklist from your agent file

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. 12d ago First seen · 54 lines · 42 tokens per session scan A 9d373b8954ef

Subscribe to this mod's changes

reindex is a skill published in the GitHub repository ArtemioPadilla/agent-triforce (3 stars, last pushed 5mo ago), licensed MIT. It adds 42 tokens to every session and 455 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-31.