shannonbay

Setup Structure Index — Development skill for Claude Code

Development community

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:

  1. Create .claude/structure/ directory
  2. Generate a compact file map and add it to CLAUDE.md
  3. Add a TaskCompleted hook to .claude/settings.json
  4. 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