# Project Structure

Generate a single-file compressed symbol map of a TypeScript or Swift repository, ...

- Repository: https://github.com/steipete/agent-scripts (7431 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add steipete/agent-scripts --skill project-structure -g -a claude-code -y`
Codex: `npx skills add steipete/agent-scripts --skill project-structure -g -a codex -y`
Cursor: `npx skills add steipete/agent-scripts --skill project-structure -g -a cursor -y`
Gemini CLI: `npx skills add steipete/agent-scripts --skill project-structure -g -a gemini-cli -y`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

```bash
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.

## Flags

The rest: https://github.com/steipete/agent-scripts/blob/HEAD/skills/project-structure/SKILL.md
