Trace a request, event, or state change through the codebase
Generates visual flow diagrams tracing requests through code with file references and data transformations.
/plugin marketplace add CaptainCrouton89/crouton-kit/plugin install learn@crouton-kit<request, event, or action to trace>Trace through the codebase to show how this works:
$ARGUMENTS
Create a single visual diagram with code snippets inside the boxes:
┌─────────────────────────────────────┐
│ 1. Handler (src/handler.ts:42) │
│ │
│ async function handle(req) { │
│ const data = await validate(req); │
│ } │
└──────────────────┬──────────────────┘
│ data: ValidatedInput
▼
┌─────────────────────────────────────┐
│ 2. Service (src/service.ts:88) │
│ │
│ async function process(data) { │
│ return await db.insert(data); │
│ } │
└──────────────────┬──────────────────┘
│ result: DbRecord
▼
┌─────────────────────────────────────┐
│ 3. Database (src/db.ts:156) │
│ │
│ async function insert(data) { │
│ return prisma.user.create(data); │
│ } │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ validate(data) │
└──────────────────┬──────────────────┘
│
┌─────────┴─────────┐
│ │
valid ✓ invalid ❌
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ continue flow │ │ throw Error() │
└─────────────────┘ └─────────────────┘
data: Userawaitif authenticated