← ClaudeAtlas

react-maplisted

Builds and reuses a cached, compact map of a React codebase (routes, exported components/hooks, stores, data hooks, import fan-in, test coverage) in .claude/cache/react-map.md, so skills grep one small file instead of globbing and reading the source tree. Also defines the token-budget rules every react-* skill follows. Use for "where is X", "which files use Y", "give me an overview of the codebase", "save tokens", "reduce context usage", or before any task that would otherwise explore many files.
riseshinee/superclaude-react · ★ 0 · Web & Frontend · score 70
Install: claude install-skill riseshinee/superclaude-react
# react-map — Cached Project Map & Token Budget Exploring a codebase with Glob and Read is the biggest token cost in most React tasks, and it is repeated in every session. This skill replaces that with a one-line-per-file index that is rebuilt only when source files change. ## Flags | Flag | Meaning | |---|---| | `--refresh` | Rebuild even if the map is fresh | ## 1. Get a fresh map The script lives in this skill's folder: `.claude/skills/react-map/scripts/build-map.mjs` (project install) or `~/.claude/skills/react-map/scripts/build-map.mjs` (global install). Node 18+, no dependencies. ```bash node .claude/skills/react-map/scripts/build-map.mjs --check # exit 0 = fresh, 2 = stale/missing node .claude/skills/react-map/scripts/build-map.mjs # (re)build → .claude/cache/react-map.md ``` Run `--check` first and build only when it exits non-zero (or with `--refresh`). The check hashes file paths, sizes, and mtimes, so it's cheap. The build prints the map's size and an approximate token count. In a monorepo, pass the package directory (`build-map.mjs apps/web`). The map is written to that package's `.claude/cache/`. If Node can't run, skip the map and apply the budget rules in section 3 anyway. ## 2. Use the map — grep it, don't read it ``` # Line format: file LOC · exports · tags · ←N (imported by N files) · T (has colocated test) OrderTable.tsx 184 · OrderTable(d) · client query · ←3 T ``` | Question | Instead of | Do | |---|---|---| | Where is `OrderTable