/span-coding
Open-code Phoenix spans with PXI-owned notes, recover those notes for axial coding, and promote stable categories into structured annotations. Load this when analyzing spans to discover failure patterns before a taxonomy exists.
$ npx -y skills add arize-ai/phoenix --skill span-coding --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/span-coding
Context preview
The summary Claude sees to decide when to auto-load this skill.
Open-code Phoenix spans with PXI-owned notes, recover those notes for axial coding, and promote stable categories into structured annotations. Load this when analyzing spans to discover failure patterns before a taxonomy exists.
SKILL.md
span-coding.SKILL.mdname: span-coding
description: >
Open-code Phoenix spans with PXI-owned notes, recover those notes for axial
coding, and promote stable categories into structured annotations. Load this
when analyzing spans to discover failure patterns before a taxonomy exists.
summary: Use PXI span notes for span-level open coding, then recover and group them before structured annotation.
Span Coding
Open coding is the exploratory pass: inspect individual spans and write short, evidence-close notes about concrete behaviors before deciding what the categories are. Axial coding is the synthesis pass: recover those notes, group recurring patterns, name actionable categories, and promote stable categories into structured annotations.
The unit of analysis is always the span. Inspect spans first, avoid taxonomy labels while collecting open notes, and only write structured annotations after the categories have stabilized.
Source of Truth
PXI span notes in Phoenix are the durable source of truth for open codes.
- Write open codes with `write_span_note`.
- `write_span_note` always uses identifier `pxi`.
- Each span has at most one current PXI open-coding note; repeated writes update it.
- The tool is server-executed and does not require approval.
The virtual bash filesystem is scratch space, not the canonical note store. Use files under `/home/user/workspace/.pxi/coding/` for sampled span lists, interim memos, grouping tables, or draft axial categories when that helps the analysis. Do not dual-write every note to a file by default; recover durable notes from Phoenix when you need to resume.
Open Coding
1. Use the `phoenix-graphql` skill and `phoenix-gql` to inspect spans and surrounding trace context. 2. Read the span input, output, status, attributes, exceptions, and nearby parent/child spans before writing. 3. If the span shows a concrete failure or notable behavior, call `write_span_note` with:
{"spanId": "<16-char OTel span id>", "note": "<specific observation>"}4. Write what you saw, not the category you think it belongs to. Good notes cite the observed behavior: "Retriever returned onboarding docs for a cancellation question." Weak notes jump straight to categories: "retrieval_failure". 5. Skip correct spans. Open coding is a signal-building pass, not a requirement to annotate every span.
Do not use `batch_span_annotate` during open coding unless the user has already supplied a stable rubric. Free-form PXI notes come first; structured annotation comes later.
Recover PXI Span Notes
Recover PXI notes with a GraphQL query over `Project.spans`, then filter `spanNotes` locally to `identifier == "pxi"`. There is no `list_span_notes` tool.
query RecoverPxiSpanNotes($projectId: ID!, $first: Int = 50, $after: String) {
node(id: $projectId) {
... on Project {
spans(first: $first, after: $after) {
edges {
node {
spanId
name
trace { traceId }
spanNotes {
identifier
explanation
createdAt
updatedAt
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
}
}Paginate until `hasNextPage` is false or the recovered sample is sufficient. Keep only notes whose `identifier` is exactly `pxi`. When a span has no PXI note, treat it as uncoded.
Axial Coding
Use recovered PXI notes as the raw material for axial coding.
1. Group notes that describe the same underlying failure. 2. Name categories for likely causes or fixes, not generic symptoms. 3. Check project annotation configs before creating new structured labels. 4. Use `batch_span_annotate` only after the categories and labels stabilize. 5. Keep optional bash sidecars focused on analysis handoff: grouping tables, current counts, and draft taxonomies. The DB notes remain the durable open-coding record.
Read more
name: span-coding description: > Open-code Phoenix spans with PXI-owned notes, recover those notes for axial coding, and promote stable categories into structured annotations. Load this when analyzing spans to discover failure patterns before a taxonomy exists. summary: Use PXI span notes for span-level open coding, then recover and group them before structured annotation.
Span Coding
Open coding is the exploratory pass: inspect individual spans and write short, evidence-close notes about concrete behaviors before deciding what the categories are. Axial coding is the synthesis pass: recover those notes, group recurring patterns, name actionable categories, and promote stable categories into structured annotations.
The unit of analysis is always the span. Inspect spans first, avoid taxonomy labels while collecting open notes, and only write structured annotations after the categories have stabilized.
Source of Truth
PXI span notes in Phoenix are the durable source of truth for open codes.
- Write open codes with `write_span_note`.
- `write_span_note` always uses identifier `pxi`.
- Each span has at most one current PXI open-coding note; repeated writes update it.
- The tool is server-executed and does not require approval.
The virtual bash filesystem is scratch space, not the canonical note store. Use files under `/home/user/workspace/.pxi/coding/` for sampled span lists, interim memos, grouping tables, or draft axial categories when that helps the analysis. Do not dual-write every note to a file by default; recover durable notes from Phoenix when you need to resume.
Open Coding
1. Use the `phoenix-graphql` skill and `phoenix-gql` to inspect spans and surrounding trace context. 2. Read the span input, output, status, attributes, exceptions, and nearby parent/child spans before writing. 3. If the span shows a concrete failure or notable behavior, call `write_span_note` with:
{"spanId": "<16-char OTel span id>", "note": "<specific observation>"}4. Write what you saw, not the category you think it belongs to. Good notes cite the observed behavior: "Retriever returned onboarding docs for a cancellation question." Weak notes jump straight to categories: "retrieval_failure". 5. Skip correct spans. Open coding is a signal-building pass, not a requirement to annotate every span.
Do not use `batch_span_annotate` during open coding unless the user has already supplied a stable rubric. Free-form PXI notes come first; structured annotation comes later.
Recover PXI Span Notes
Recover PXI notes with a GraphQL query over `Project.spans`, then filter `spanNotes` locally to `identifier == "pxi"`. There is no `list_span_notes` tool.
query RecoverPxiSpanNotes($projectId: ID!, $first: Int = 50, $after: String) {
node(id: $projectId) {
... on Project {
spans(first: $first, after: $after) {
edges {
node {
spanId
name
trace { traceId }
spanNotes {
identifier
explanation
createdAt
updatedAt
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
}
}Paginate until `hasNextPage` is false or the recovered sample is sufficient. Keep only notes whose `identifier` is exactly `pxi`. When a span has no PXI note, treat it as uncoded.
Axial Coding
Use recovered PXI notes as the raw material for axial coding.
1. Group notes that describe the same underlying failure. 2. Name categories for likely causes or fixes, not generic symptoms. 3. Check project annotation configs before creating new structured labels. 4. Use `batch_span_annotate` only after the categories and labels stabilize. 5. Keep optional bash sidecars focused on analysis handoff: grouping tables, current counts, and draft taxonomies. The DB notes remain the durable open-coding record.
Repo: arize-ai/phoenix
Other skills on phoenix.
- /annotate-spans
Write effective, consistent annotations on LLM/agent spans and traces, and coach the user on annotation practice. Load this whenever you are about to record structured feedback with the `batch_span_annotate` tool, or when the user asks how to annotate, label, score, or review
Open skill - /datasets
Understand what a Phoenix dataset is and reason well about its examples, outputs, splits, and how it feeds evaluators and experiments. Load this whenever a dataset is in view or the user asks what a dataset is, how splits work, what an output "means", or how datasets relate to
Open skill - /debug-trace
Diagnose failure modes by systematically investigating traces. Trigger when the user explicitly asks for cross-trace diagnosis: "what's going wrong?", "were there errors?", "debug this", "where is my agent struggling?". Do NOT trigger on: (1) advice questions ("what should I
Open skill - /evaluators
Author or refine a Phoenix evaluator — code or LLM-as-a-judge — that scores a run's output. Trigger when the user wants to create a new evaluator, improve an existing one's logic or rubric, choose labels, or decide what to measure on a dataset or experiment. Do NOT trigger on:
Open skill - /experiments
Run, read, and compare dataset-backed experiments to find evidence that a prompt or pipeline is improving. Trigger when the user wants to iterate over a dataset with experiments, compare experiment runs, read experiment quality/latency/cost, or decide whether a change actually
Open skill - /phoenix-graphql
Write efficient GraphQL queries against the Phoenix API. Load this skill in two cases: (1) before composing any non-trivial GraphQL query yourself for data analysis (via the `phoenix-gql` bash command) — it contains schema entrypoints and patterns that eliminate the need for
Open skill

