phoenix-cli

Use when debugging LLM apps with Phoenix CLI: traces, errors, experiments.

9 stars

Best use case

phoenix-cli is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when debugging LLM apps with Phoenix CLI: traces, errors, experiments.

Teams using phoenix-cli should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/phoenix-cli/SKILL.md --create-dirs "https://raw.githubusercontent.com/exiao/skills/main/external-services/phoenix-cli/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/phoenix-cli/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How phoenix-cli Compares

Feature / Agentphoenix-cliStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when debugging LLM apps with Phoenix CLI: traces, errors, experiments.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Phoenix (Arize) — LLM Observability

Unified skill for Phoenix AI observability: CLI debugging, evaluators, and tracing instrumentation.

## Quick Router

| Task | Read This |
|------|-----------|
| CLI usage, fetch traces, debug failures, analyze experiments | This file (below) |
| Build evaluators (code, LLM, RAG) | `references/evals.md` + `references/evals-rules/` |
| Instrument tracing (OpenInference, spans, production) | `references/tracing.md` + `references/tracing-rules/` |

## Connection

Phoenix CLI reads `PHOENIX_HOST`, `PHOENIX_API_KEY`, and `PHOENIX_PROJECT`
from the environment (project can also be passed via `--project`).
Set them in whatever env-management surface your agent runtime uses, e.g.:

```bash
# Hermes
echo 'PHOENIX_HOST=https://app.phoenix.arize.com/s/<workspace>' >> ~/.hermes/.env
echo 'PHOENIX_API_KEY=...' >> ~/.hermes/.env
echo 'PHOENIX_PROJECT=bloom_chat' >> ~/.hermes/.env

# Plain shell
export PHOENIX_HOST=https://app.phoenix.arize.com/s/<workspace>
export PHOENIX_API_KEY=...
export PHOENIX_PROJECT=bloom_chat

# OpenClaw gateway
openclaw config set env.vars.PHOENIX_HOST 'https://app.phoenix.arize.com/s/<workspace>'
openclaw config set env.vars.PHOENIX_API_KEY '...'
openclaw config set env.vars.PHOENIX_PROJECT 'bloom_chat'
```

Verify: `px traces --limit 1` (or `px traces --limit 1 --project bloom_chat`).

Projects: `bloom_chat` (prod), `bloom_chat_dev` (dev).

## CLI Quick Start

```bash
npm install -g @arizeai/phoenix-cli
# Or: npx @arizeai/phoenix-cli
```

CLI flags override environment variables when specified.

## Debugging Workflows

### Debug a failing LLM application

```bash
# Recent traces
px traces --limit 10

# Find failed traces
px traces --limit 50 --format raw --no-progress | jq '.[] | select(.status == "ERROR")'

# Specific trace details
px trace <trace-id>

# Errors in spans
px trace <trace-id> --format raw | jq '.spans[] | select(.status_code != "OK")'
```

### Find performance issues

```bash
# Slowest traces
px traces --limit 20 --format raw --no-progress | jq 'sort_by(-.duration) | .[0:5]'

# Span durations within a trace
px trace <trace-id> --format raw | jq '.spans | sort_by(-.duration_ms) | .[0:5] | .[] | {name, duration_ms, span_kind}'
```

### Analyze LLM usage

```bash
px traces --limit 50 --format raw --no-progress | \
  jq -r '.[].spans[] | select(.span_kind == "LLM") | {model: .attributes["llm.model_name"], prompt_tokens: .attributes["llm.token_count.prompt"], completion_tokens: .attributes["llm.token_count.completion"]}'
```

### Review experiments

```bash
px datasets                                    # List datasets
px experiments --dataset my-dataset            # List experiments
px experiment <id> --format raw --no-progress | jq '.[] | select(.error != null) | {input: .input, error}'  # Failures
px experiment <id> --format raw --no-progress | jq '[.[].latency_ms] | add / length'  # Avg latency
```

## Command Reference

| Command | Purpose | Key Options |
|---------|---------|-------------|
| `px traces` | Fetch recent traces | `-n <limit>`, `--last-n-minutes`, `--since`, `--format`, `--include-annotations` |
| `px trace <id>` | Fetch specific trace | `--file`, `--format`, `--include-annotations` |
| `px datasets` | List datasets | |
| `px dataset <name>` | Fetch dataset examples | `--split`, `--version`, `--file` |
| `px experiments` | List experiments | `--dataset <name>` (required) |
| `px experiment <id>` | Fetch experiment runs | `--format`, `--file` |
| `px prompts` | List prompts | |
| `px prompt <name>` | Fetch prompt | |

## Output Formats

- `pretty` (default): Human-readable tree view
- `json`: Formatted JSON with indentation
- `raw`: Compact JSON for piping to `jq`

Use `--format raw --no-progress` when piping.

## Trace Structure

Key span kinds: `LLM`, `CHAIN`, `TOOL`, `RETRIEVER`, `EMBEDDING`, `AGENT`.

Key LLM span attributes:
- `llm.model_name`, `llm.provider`
- `llm.token_count.prompt`, `llm.token_count.completion`
- `llm.input_messages.*`, `llm.output_messages.*`
- `input.value`, `output.value`
- `exception.message`

## Reference Files

| File | Contents |
|------|----------|
| `references/evals.md` | Evaluator guide: code evals, LLM evals, RAG evals, experiments, validation, production guardrails |
| `references/evals-rules/` | 34 rule files for evaluator implementation (fundamentals, error analysis, axial coding, experiments, validation, production) |
| `references/tracing.md` | Tracing guide: setup, instrumentation, span types, projects, sessions, production deployment |
| `references/tracing-rules/` | 30 rule files for tracing implementation (setup, auto/manual instrumentation, span types, annotations, production) |

Related Skills

writer

9
from exiao/skills

Write content in Eric's voice — articles, blog posts, tweets, social media posts, marketing copy, newsletter drafts. Loads WRITING-STYLE.md and enforces kill phrases.

positioning-angles

9
from exiao/skills

Use when defining product positioning, choosing strategic angles, crafting value propositions, competitive positioning, product messaging, differentiation strategy, or go-to-market angles. Also use for 'how should I position my app', 'what angle should I use', 'painkiller vs vitamin', or 'market positioning'.

outline-generator

9
from exiao/skills

Use when generating outlines, article structures, content outlines, blog outlines, planning article sections, structuring posts, breaking down topics into sections, or organizing ideas for long-form content. Also use for 'outline this', 'structure this article', or 'plan the sections'.

last30days-open

9
from exiao/skills

Use only when the user explicitly asks for the open variant of last30days, including watchlists, briefings, and history queries. Sources: Reddit, X, YouTube, web.

last30days

9
from exiao/skills

Use when researching what happened in the last 30 days on a topic. Also triggered by 'last30'. Sources: Reddit, X, YouTube, web. Produces expert-level summary with copy-paste-ready prompts.

hooks

9
from exiao/skills

Use when generating hooks, headlines, titles, and scroll-stopping openers for content. Also use when analyzing viral posts, Reels, TikToks, YouTube Shorts, or successful social examples to extract reusable hook patterns and improve hook guidance.

evaluate-content

9
from exiao/skills

Use when judging content quality OR editing/improving existing copy: shareability, readability, voice, cuttability, angle, copy sweeps.

editor-in-chief

9
from exiao/skills

Use when a first draft is complete and all Phase 1 gates are done: topic selected (seo-research), title approved (hooks), outline approved (outline-generator), draft written (writer). Runs autonomous diagnosis-prescribe-rewrite loop before Substack.

copywriting

9
from exiao/skills

Write or improve marketing copy for any surface: pages, ads, app stores, landing pages, TikTok/Meta scripts, push notifications, UGC. Combines page copy frameworks with direct response principles.

content-strategy

9
from exiao/skills

Use when building content strategy: hooks, angles, and ideas from what's trending now. Covers organic and paid creative across TikTok, X, YouTube, Meta, LinkedIn.

content-pipeline

9
from exiao/skills

Orchestrator for the 3-article content pipeline — runs research phase, spawns parallel article sub-agents, creates Typefully drafts. Use when running the full content pipeline (usually via cron at 3am).

yt-dlp

9
from exiao/skills

Download audio/video from YouTube and other sites using yt-dlp. Use when the user asks to download music, songs, albums, podcasts, or video from YouTube or similar platforms. Triggers on 'download song', 'get mp3', 'yt-dlp', 'youtube download', 'rip audio'.