Project Structure
Generate a single-file compressed symbol map of a TypeScript or Swift repository, ...
Install
npx skills add steipete/agent-scripts --skill project-structure -g -a claude-code -y- Repository
- steipete/agent-scripts7.4k
- Category
- AI and agents
- Updated
- 5d ago
- License
- MIT
- Context cost
- Mediumabout 1,800 tokens
- Runs scripts
- Yes, review before use
What it does
Generate a single-file compressed symbol map of a TypeScript or Swift repository, files, exported symbols, typed signatures, plugin boundaries, sized to fit an LLM context window. Use for whole-project reasoning: duplication hunting, refactor planning, architecture recon, or feeding another agent a full-project map.
Project Structure
Compress a TS or Swift repo into one map file an agent can load whole. Backed by map.ts next to this file. TS: parse-only TS compiler, no type-check; ~8k files in ~5s; resolves the typescript package from the target repo, falling back to this skill dir. Swift: zero-dependency regex/brace-depth scanner built into map.ts (no typescript needed for pure-Swift repos). Requires Node >= 23.6 (native type stripping) or npx tsx. .ts/.tsx and .swift files are detected by extension; a repo may mix both.
Run
node <this-skill-dir>/map.ts <repoRoot> [flags]
<this-skill-dir> is the base directory of this skill as announced when the skill loads (canonical: ~/Projects/agent-scripts/skills/project-structure).
Output: one map file (default project-structure-map.txt in cwd) plus a JSON stats line (files, symbols, bytes, approxTokens) on stdout.

