Setup Structure Index — Development skill for Claude Code
A claude skill to set up a lightweight system for maintaining a living structural index of your codebase as yaml files.
How to install Setup Structure Index
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open shannonbay/setup-structure-index and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Setup Structure Index does
A claude skill to set up a lightweight system for maintaining a living structural index of your codebase as yaml files. Claude reads these before exploring code (saving exploration rounds) and updates them after modifying code (keeping them in sync)
Alternatives in Development
- Project-Level Skills — This directory contains skills for developing and maintaining the claude-mem project itself, not skills that a 39.3k ★
- Code Review Graph — Local knowledge graph for Claude Code 3.7k ★
- Agent Skill — A Claude Code plugin marketplace containing the ast-grep skill for powerful structural code search using Abstr 851 ★
README
setup-structure-index
A [Claude Code skill](https://code.claude.com/docs/en/skills) that sets up a two-tier codebase structure index for any project.
What It Does
Installs a system where Claude maintains a **compact file map** in CLAUDE.md (zero-cost, always loaded) and **detailed per-directory YAML files** in `.claude/structure/` (read on demand). A `TaskCompleted` hook ensures the index stays in sync when structural changes happen.
Why Two Tiers?
Most exploration savings come from knowing *where things are*, not their exact method signatures. The file map in CLAUDE.md answers "where is X?" at zero extra token cost (it's already in the system prompt). Detailed YAML files are only read when you need to understand a specific directory's exports.
**Old approach:** Read ~2000 lines of YAML every session, even for a one-file fix. **New approach:** Zero extra reads most sessions; ~100-300 lines on demand for deep exploration.
Installation
Clone into your Claude Code user skills directory:
# macOS/Linux
git clone https://github.com/shannonbay/setup-structure-index ~/.claude/skills/setup-structure-index
# Windows
git clone https://github.com/shannonbay/setup-structure-index %USERPROFILE%\.claude\skills\setup-structure-index
The skill will be available in all projects.
Usage
In any project, tell Claude:
/setup-structure-index
Or just ask Claude to "set up structure index" or "add codebase structure tracking".
Claude will:
- Create
.claude/structure/directory - Generate a compact file map and add it to
CLAUDE.md - Add a
TaskCompletedhook to.claude/settings.json - Generate detailed per-directory YAML files using Haiku agents
What Gets Created
your-project/
├── .claude/
│ ├── settings.json # TaskCompleted hook added
│ └── structure/
│ ├── backend-controllers.yaml # Detailed exports per directory
│ ├── backend-services.yaml
│ └── app-fragments.yaml
└── CLAUDE.md
Related Skills
Ask Me
Stop exploring the codebase—ask me directly for the files or context you need first.
Tokguard
Token-saving toolkit for Codex, Claude Code, Antigravity, and other MCP-compatible coding agents. TokGuard hel
Scope Decision
Challenge your plan's scope and force an Expansion, Selective-Expansion, Hold, or Reduction call. Reads friday
Vault Analyze
Analyze the current vault structure and generate a concise structural report.
Drupal Bootstrap
Auto-detect project state and bootstrap structural index, semantic docs, and CLAUDE.md hint
Drupal Refresh
Regenerate structural index and update CLAUDE.md hint
Related Agents
Tokless Coder
Lightweight coding execution agent with MCP servers stripped (inheritMcp: false) and core file/command tools o
Documentation Agent
MUST BE USED whenever code is created or modified to maintain living documentation. This agent specializes exc
Idea Judge
Lightweight blind scorer for the idea-tournament skill. Reads one packed brief file and writes the JSON it ask