# Trace

> Trace

- Skill: `fntune/trace` (Agent Skill)
- Install (CLI): `npx skillmds@latest add fntune/trace`
- Raw SKILL.md: https://api.skillmd.com/api/skills/fntune/trace/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: fntune (https://skillmd.com/u/fntune)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/fntune/trace

---


# /trace

Map codebase from entry points to leaves. Output dependency tree + numbered reading order.

## Args

- `--entry-point` - Start file (default: auto-detect main.py/app.py/index.ts)
- `--filter` - Limit to directory
- `--depth` - Max levels (default: unlimited)

## Process

1. Find entry points via Glob
2. Extract imports via Grep (`^from|^import`)
3. Build dependency graph
4. Order: leaves first, entry points last

## Output

**Tree:**
```
main.py
├── app.py
│   ├── handlers/api.py
│   │   └── agents/orchestrator.py
│   └── slack/events.py
└── config.py
```

**Reading Order:**
```
 1. config.py              settings
 2. core/logging.py        infrastructure
 3. clients/bq.py          external client
 4. agents/base.py         core logic
 5. agents/bq/tools.py     implementation
 6. agents/orchestrator.py main agent
 7. handlers/api.py        HTTP layer
 8. app.py                 entry point
```

