arch-index

arch-index is a skill for Claude Code, Codex from coco-research/coco. It costs 133 tokens per session (2,720 once invoked), scanned A, original, Apache-2.0.

A tool for maintaining .arch/index.json, a committed map linking each architectural part of a repository to the files and folders that implement it. It verifies those paths and checks the map against a specific Git commit.

In plain words
What is it for?
Use it to create or validate an architecture index, verify implementation paths, or detect structural drift after code changes.
Why use it?
It helps keep architecture documentation tied to real code and reveals when the documented structure no longer matches the repository.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions subagents.

Good fit Use it to create or validate an architecture index, verify implementation paths, or detect structural drift after code changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/coco-research/coco/arch-index
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.

Any agent
npx skills add coco-research/coco --skill arch-index
Clone the repo
git clone --depth 1 https://github.com/coco-research/coco

Made for: Claude Code, 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 arch-index

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/coco-research/coco/arch-index"><img src="https://agentmods.dev/badge/skills/coco-research/coco/arch-index.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 133 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,720 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.00133 $0.02720
Opus 5.5 $0.00053 $0.01088
Sonnet 5.5 $0.00027 $0.00544
Haiku 4.5 $0.00013 $0.00272

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

Security

Grade A, and why

arch-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 (scripts/arch_drift.py, scripts/repo_tree.py, scripts/run_fixtures.sh, …), 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.

skills/arch-index/SKILL.md · 213 lines

How it starts

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

arch-index

Produces one artifact: .arch/index.json, a commit-pinned map from each architectural component of a repository to the real directories and files that implement it. Every claimed path is verified to exist by a script with an exit code, not by a promise in a prompt.

Guiding principle — Paths or it does not exist. The protocol that consumers follow is team:architecture.md. This file is the producer.

What this skill is for, and what it is not for

It is for answering, mechanically: which files implement this component, and has that stopped being true.

It is not a design tool. The index is reverse-only — it describes code that exists on disk at a known commit. There is no mode for specifying a system that has not been built, because the central check is that every path resolves. Forward design work belongs in /team think, the SI-*-Design councils, or /util:create-architecture-documentation.

It is not a codebase-mapping tool either, and it should not act like one. When .planning/codebase/ exists, gsd-map-codebase has already produced seven structured documents covering the stack, integrations, architecture, structure, conventions, testing, and concerns. This skill reads those and skips crawling entirely. Crawling a repository that has already been mapped is the exact waste this skill was designed to avoid, and duplicating gsd-map-codebase would make it a worse version of a tool that already exists.

It is not a work-allocation mechanism. The index sits at C4-Container altitude, so a single component can own thousands of files. Nothing derives per-agent file ownership from it.

Modes

Resolve the mode from the invocation. When none is given, use drift if .arch/pinned-commit exists and build if it does not.

build

Step 1 — find prior art before doing any work. In this order:

  1. If .planning/codebase/ exists, read ARCHITECTURE.md, STRUCTURE.md, STACK.md, and INTEGRATIONS.md from it. Set source to gsd-codebase-map. Skip to step 2. Do not crawl.
  2. Otherwise, if gitnexus is available for this repository, call mcp__gitnexus__context and mcp__gitnexus__group_list for a deterministic view of module grouping. Set source to gitnexus. Skip to step 2.

Read the full file on GitHub · 213 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. 2mo ago Changed a4cffa859643
  2. 3mo ago First seen · 213 lines · 133 tokens per session scan A 485483ff06a0

Subscribe to this mod's changes

arch-index is a skill published in the GitHub repository coco-research/coco (323 stars, last pushed yesterday), licensed Apache-2.0. It adds 133 tokens to every session and 2,720 once invoked, about $0.0005 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

arch-index compared with skills from other repositories

arch-index next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
arch-indexcoco-research/cocoSkill323yesterdayApache-2.0A133Claude Code, Codex
session-handoffwanshuiyin/HERO-Anti-OverDefenseSkill92912d agoMITA34Claude Code, Codex
proxmox-fullmarcusquinn/aidevopsSkill476todayMITA27Claude Code
a-philosophy-of-software-designciembor/agent-rules-booksSkill3.4k2mo agoMITA33Claude Code, Codex
handoffChemaclass/agnostic-aiSkill31todayMITA14Claude Code, Codex
template-autopoiesisdocxology/templateSkill25todayApache-2.0A51Claude Code, Codex
template-publishdocxology/templateSkill25todayApache-2.0A52Claude Code, Codex