claude-anvil / repoindex
CLAUDE.md2 starsChanged 41 days agoMITView on GitHub
A Claude Code plugin for the repoindex local git catalog: two agents, five slash commands, and a workflows router skill on top of the repoindex MCP server. Prerequisite: repoindex CLI 2.2 or newer installed and on PATH (e.g. uv tool install -e <repoindex checkout>), database populated (repoindex refresh --external), and the repoindex MCP server configured at user scope (claude mcp add -s user repoindex -- repoindex mcp). 2.2 is the floor because the plugin relies on view re-sync on open…
In this repository11 other files it gives its agents.
- alex-confidential/CLAUDE.mdCLAUDE.md
- bookwright/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- crier/CLAUDE.mdCLAUDE.md
- kdp/CLAUDE.mdCLAUDE.md
- mf/CLAUDE.mdCLAUDE.md
- papermill/CLAUDE.mdCLAUDE.md
- pub-pipeline/CLAUDE.mdCLAUDE.md
- research-agent/CLAUDE.mdCLAUDE.md
- vista/CLAUDE.mdCLAUDE.md
- worldsmith/CLAUDE.mdCLAUDE.md
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 49
Commit messages use conventional prefixes: feat(repoindex):, fix(repoindex):, docs(repoindex):
- Very specific: line 61
Do not hard-code enumerations (registries, event types, tag sources, tag prefixes) in prompts.
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What This Is
A Claude Code plugin for the repoindex local git catalog: two agents, five slash commands, and a workflows router skill on top of the repoindex MCP server.
Prerequisite: repoindex CLI 2.2 or newer installed and on PATH (e.g. uv tool install -e <repoindex checkout>), database populated (repoindex refresh --external), and the repoindex MCP server configured at user scope (claude mcp add -s user repoindex -- repoindex mcp). 2.2 is the floor because the plugin relies on view re-sync on open (v_repo_stats, v_stale_repos) and on the MCP server running the CLI through its own interpreter (python -m repoindex), so its refresh/tag/export tools do not depend on PATH. PATH is still needed for the Bash commands (repo-polish, /repo-sprint, /repo-audit, /repo-week, /repo-mirror).
Why no .mcp.json: the plugin is disabled at user scope and enabled per repo, but the MCP tools should be available everywhere, so the server is configured at user scope instead; a plugin .mcp.json would vanish whenever the plugin is disabled, rename the tools to mcp__plugin_repoindex_repoindex__* (breaking every mcp__repoindex__* grant here), and duplicate the user-scope server when both exist.
Architecture
MCP tools are the primary read path. Single questions go straight to run_sql; slash commands cover fixed-shape recurring tasks; agents cover multi-step work that needs judgment or writes files.
Agents:
repo-polish(inherit): single-repo release preparation. Audits a repo, generates boilerplate viarepoindex ops generate, writes prose (README, forge description, topics) with AI judgment, re-audits.repo-explorer(sonnet): open-ended multi-query analysis with narrative synthesis. Not for one-query questions.
Slash commands: /repo-sprint (the triage entry point), /repo-status, /repo-audit, /repo-week, /repo-mirror.
Tool access
repoindex MCP tools:
get_manifest(): database overview, including precomputed health counts (dirty,unpushed,stale,published,unpublished,doi_count) andrefresh_stale(last refresh older than 7 days). Prefer these over recomputing them by hand.get_schema(table?): SQL DDL introspectionrun_sql(query): read-only SQL (SELECT/WITH, max 500 rows, no bind parameters: inline values with single quotes doubled)tag(repo, action, tag): manage user-assigned tags (action: add, remove, list)export(output_dir, language?, dirty?, tag?, recent?): produce arkiv archivesrefresh(github?, pypi?, cran?, external?, forge_events?, full?): trigger metadata refresh (all flags default false; local sources always run)
The tool descriptions in the live session are authoritative; re-check them (and get_schema()) before editing prompts.
CLI through Bash, where no MCP equivalent exists: ops generate / ops set-* (repo-polish), ops audit --json (/repo-sprint, /repo-audit), digest --json (/repo-week), ops mirror (/repo-mirror). Scope each command's allowed-tools to the exact subcommand (Bash(repoindex ops audit:*)), never bare Bash. ops commands select repos with --language/--tag/--recent/--dirty; positional query strings error.
Design principle
Reuse upstream definitions instead of re-deriving them. Stale is the v_stale_repos view; quality gaps are ops audit checks (with their own check_id, category, severity); activity rollups are repoindex digest. Do not hand-code parallel versions in SQL. Delegate deterministic file generation to ops generate; use AI judgment only for prose.
Known gap: there is no version-drift check (published registry version vs latest git tag). Comparing version strings in SQL was noise (zenodo snapshot versions, 0.8 vs v0.8.0, older tags), so it was removed. A proper check needs an upstream view or manifest field computed with packaging.version.
Editing Conventions
- Agent frontmatter needs
name,description(with<example>blocks),tools,model,color - The
descriptionfield contains trigger phrases for auto-detection; be specific - MCP tools use the
mcp__repoindex__*prefix - Commit messages use conventional prefixes:
feat(repoindex):,fix(repoindex):,docs(repoindex):
SQL Data Model (for reference when editing prompts)
Main tables in ~/.repoindex/index.db, all joined through repo_id:
- repos: identity (
name,path; names are not unique), git status (is_clean,ahead,behind), metadata (language,description,keywords),has_*asset flags, citation metadata (citation_*), and forge metadata abstracted across GitHub/Gitea (forge_id,forge_owner,forge_name,forge_description,stars,topics,is_archived,is_fork,is_private) - publications: one row per repo+registry:
registry,package_name,current_version,published,doi,concept_doi,downloads_total,downloads_30d - events:
type,timestamp,ref,message,author. Count releases astype IN ('git_tag', 'release'); forge events appear only afterrefresh(forge_events=true) - tags:
tag,source - Also:
repos_fts(FTS5; useMATCH),refresh_log,scan_errors, and the viewsv_active_repos,v_stale_repos,v_repo_stats
Do not hard-code enumerations (registries, event types, tag sources, tag prefixes) in prompts; tell the model to query them (SELECT DISTINCT registry FROM publications, etc.). Stale means v_stale_repos (no commit in 180 days); the manifest's stale count is COUNT(*) over it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

