Skip to content
Development
Command

/trace

Trace the execution path of a request or operation through the codebase.

From plugin
rohitg00-claude-code-toolkit
2.8k199 skills138 agents199 commands
$ npx -y skills add rohitg00/awesome-claude-code-toolkit --agent claude-code

Command definition

trace.md

Trace the execution path of a request or operation through the codebase.

Steps

1. Identify the starting point: HTTP request handler, event listener, CLI command, or function call. 2. Follow the execution path step by step:

  • Map each function call from entry to exit.
  • Note middleware, interceptors, or decorators in the chain.
  • Track data transformations at each step.
  • Identify async boundaries (awaits, callbacks, event emissions).

3. For each step in the trace, document:

  • File and function name.
  • Input parameters and their values/types.
  • Side effects (database queries, API calls, file writes).
  • Return value or thrown error.

4. Identify potential failure points:

  • Unhandled errors or missing try/catch blocks.
  • Implicit type conversions or coercions.
  • Missing validation at boundaries.

5. Generate a sequence diagram of the execution flow. 6. Highlight any performance bottlenecks (blocking I/O, N+1 queries).

Format

Trace: <operation name>

1. [entry.ts:handleRequest] <- HTTP POST /api/users
2. [middleware/auth.ts:verify] <- checks JWT token
3. [services/user.ts:create] <- validates input, calls DB
4. [db/queries.ts:insert] <- INSERT INTO users ...
5. [services/user.ts:create] -> returns { id, email }
6. [entry.ts:handleRequest] -> 201 Created

Side effects: 1 DB write, 1 email sent
Potential issues: No transaction wrapping steps 4-5

Rules

  • Follow the actual code path, not assumptions about what it should do.
  • Include error handling paths, not just the happy path.
  • Note where logging exists and where it is missing.
  • Flag any implicit dependencies or global state access.
Read more
@rohitg00
Ships withrohitg00-claude-code-toolkit

The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills (+400,000 via SkillKit), 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 15 MCP configs, 26 companion apps, 53 ecosystem entries, and more.

2.8k40 skills138 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
2.8k
Star history of rohitg00/awesome-claude-code-toolkit on GitHub, a chart by star-history.com

Other commands on rohitg00-claude-code-toolkit.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command