# Trace Qa

> >

- **Type:** Skill
- **Install:** `agentstack add skill-dp-archive-archive-trace-qa`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [dp-archive](https://agentstack.voostack.com/s/dp-archive)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [dp-archive](https://github.com/dp-archive)
- **Source:** https://github.com/dp-archive/archive/tree/main/seed_skills/trace-qa

## Install

```sh
agentstack add skill-dp-archive-archive-trace-qa
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Trace QA

Analyze agent execution traces to answer questions about what happened, why it failed,
how efficient it was, or any other aspect of the run.

## Workflow

Always start with `overview` to understand the trace before diving into details.

### 1. Get the overview first

```bash
python scripts/fetch_trace.py  overview
```

This returns metadata (status, duration, tokens, model) and summaries (request, answer preview, tool usage counts). Use this to orient yourself before going deeper.

### 2. Explore steps or LLM calls as needed

Depending on the user's question, drill into the relevant data:

| User wants to know... | Command |
|------------------------|---------|
| What tools were called and in what order | `steps [start] [count]` |
| Full input/output of a specific tool call | `step ` |
| How many LLM calls and their token costs | `llm-calls [start] [count]` |
| What messages were sent to Claude in a specific turn | `llm-call ` |
| Just the final result | `answer` |

### 3. Handle long content with segmented reads

When content is large, the script automatically segments output to ~4000 characters.
If you see a `[CONTINUED: ...]` message at the end of output, call the command shown
in that message to read the next segment. Repeat until all content is read.

Example sequence:
```bash
python scripts/fetch_trace.py  step 5
# Output ends with: [CONTINUED: use 'step 5 --offset 4000' for next segment]

python scripts/fetch_trace.py  step 5 --offset 4000
# Output ends with: [CONTINUED: use 'step 5 --offset 8000' for next segment]

python scripts/fetch_trace.py  step 5 --offset 8000
# Full content now read
```

## Command Reference

| Mode | Syntax | Description |
|------|--------|-------------|
| `overview` | `fetch_trace.py  overview` | Metadata + summary stats |
| `steps` | `fetch_trace.py  steps [start] [count]` | Paginated step list (default: 30/page) |
| `step` | `fetch_trace.py  step  [--offset ]` | Single step full content |
| `llm-calls` | `fetch_trace.py  llm-calls [start] [count]` | Paginated LLM call list |
| `llm-call` | `fetch_trace.py  llm-call  [--offset ]` | Single LLM call full content |
| `answer` | `fetch_trace.py  answer` | Final answer only |

## Common Analysis Patterns

**Failure diagnosis:** overview → find error → steps list → examine failing step detail

**Token efficiency:** overview (total tokens) → llm-calls list (per-call breakdown) → identify expensive calls

**Behavior understanding:** overview → steps list → step details for key tool calls

**Tool usage audit:** overview (tool summary) → steps list filtered by tool name

## Environment

Set `API_BASE_URL` to override the default API endpoint (`http://127.0.0.1:62610`).

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [dp-archive](https://github.com/dp-archive)
- **Source:** [dp-archive/archive](https://github.com/dp-archive/archive)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-dp-archive-archive-trace-qa
- Seller: https://agentstack.voostack.com/s/dp-archive
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
