joshuashepherd/my-skills/agent-trace
Trust tier 3
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending
Checking that the SKILL.md file is still in the repository.
Debug agent execution with tracing — analyze traces, tool calls, durations, errors, and performance metrics. Use when investigating agent behavior.
Install
npx vskill@latest install joshuashepherd/my-skills/agent-traceSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Debug agent execution: $ARGUMENTS
Before Starting
- Read the tracing infrastructure:
src/agents/shared/agent-tracer.ts—AgentTracerclass, event recordingsrc/agents/shared/hooks.ts— lifecycle hooks (onStart, onToolCall, onToolComplete, onComplete, onError)src/lib/database/schema.ts— search foragent_tracesandagent_metricstables
Trace Event Types
The AgentTracer records these events during execution:
| Event | When | Data | |
|---|---|---|---|
start | Execution begins | message length, context availability | |
tool_call | Tool invoked | toolName, params preview (truncated 200 chars) | |
tool_complete | Tool returns | toolName, duration, success flag | |
handoff | Agent delegates | target agent, reason | |
stream_delta | First text token | (recorded once only) | |
complete | Execution done | output length, duration, tool count | |
error | Failure | message, stack (truncated) |
Querying Traces
Recent traces for an agent
Traces with errors
Slow traces (over 10s)
Tool call breakdown
Agent metrics summary
Debug Flags
Set these environment variables to enable verbose logging:
Analysis Patterns
Diagnosing slow responses
- Query traces with high duration
- Check
eventsarray for tool_call → tool_complete durations - Identify which tool is the bottleneck
- Check if the tool is hitting an external service (file_search, search API)
- Consider caching or timeout adjustments
Diagnosing tool failures
- Query traces where
error_messageis not null - Look at the
tool_callevent immediately before theerrorevent - Check if the tool params were valid
- Check if the external service was available
Diagnosing guardrail rejections
- Guardrail rejections show as
errorevents with the guardrail name - Check the
reasonfield for why the message was rejected - Review the input message and guardrail logic
Comparing agent performance over time
- Query
agent_metricstable for daily aggregates - Check trends in avg_response_time, success_rate, error_count
- Correlate spikes with deployment dates or config changes
Rules
- Use the Supabase MCP (
mcp__supabase__execute_sql) for querying traces directly - Never delete traces — they're the audit trail for agent behavior
- When reporting findings, include specific trace IDs for reference
- Debug flags should only be enabled temporarily — they generate large log volumes
- If traces reveal a systemic issue, recommend a fix in the relevant layer (tool, instructions, guardrail)
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingrepo-specific/alan-hirsch/agent-trace/skill.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/joshuashepherd/my-skills/agent-trace)