Agent skill · Data & Analytics

arize-prompt-optimization

INVOKE THIS SKILL when optimizing, improving, or debugging LLM prompts using production trace data, evaluations, and annotations. Covers extracting prompts from spans, gathering performance signal, and running a data-driven optimization loop using the ax CLI.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill arize-prompt-optimization --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 19 KB
Bundled scripts: none
Path: skills/ai-llm/arize-prompt-optimization/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Instructs the agent to work with production trace data to optimize, improve, or debug LLM prompts. It covers extracting prompts from various span attributes, collecting performance signals from annotations and evals, and running a data-driven optimization loop using the ax CLI.

How it works

The skill provides concrete commands and data extraction steps, including:

  • Locate LLM-related spans and extract prompts from fields like attributes.llm.input_messages, attributes.llm.prompt_template, and attributes.input.value. It specifies how to reconstruct prompts as messages and preserve template placeholders.
  • Gather performance signals from trace data and evaluation results, including annotation.*.label, annotation.*.score, eval.*.label, eval.*.score, and eval.*.explanation to inform optimization.
  • Use the ax CLI for exporting traces, datasets, experiments, and for running optimization loops, including phase-based steps (Phase 1: Extract the Current Prompt; Phase 2: Gather Performance Data; Phase 3: Optimize the Prompt; Phase 4: Iterate).
  • Provide a meta-prompt structure for prompt optimization and guidance on preserving template variables and output formats when updating prompts.

When to use it

Use when optimizing, improving, or debugging LLM prompts with production trace data, evaluations, and annotations. Trigger points include extracting current prompts from traces, collecting performance signals to identify failures, and iterating an optimization loop using ax experiments and evaluations.

What it can touch

  • Tools: claude-code (declared tool). It references ax CLI and JSON/JQ data processing utilities in shell blocks.
  • Files touched: multiple steps involve tracing data files (spans.json, traces, datasets, experiments) and JSON manipulation via jq.

Caveats

  • The skill relies on the presence of production trace data and the ax CLI being installed and configured with credentials.
  • It requires environment prerequisites such as ax installation, API keys, and a project/context for ax commands.
  • All steps are described as commands and data operations; no guarantees of success or outcomes are stated in the material.
From the SKILL.md

# Arize Prompt Optimization Skill ## Concepts ### Where Prompts Live in Trace Data LLM applications emit spans following OpenInference semantic conventions. Prompts are stored in different span attributes depending on the span kind and instrumentation: | Column | What it contains | When to use | |--------|-----------------|-------------| | `attributes.llm.input_messages` | Structured chat messages (system, user, assistant, tool) in role-based format | **Primary source** for chat-based LLM prompts | | `attributes.llm.input_messages.roles` | Array of roles: `system`, `user`, `assistant`, `tool` | Extract individual message roles | | `attributes.llm.input_messages.contents` | Array of message content strings | Extract message text | | `attributes.input.value` | Serialized prompt or user question (generic, all span kinds) | Fallback when structured messages are not available | | `attributes.llm.prompt_template.template` | Template with `{variable}` placeholders (e.g., `"Answer {question} using {context}"`) | When the app uses prompt templates | | `attributes.llm.prompt_template.variables` | Template variable values (JSON object) | See what values were substituted into the template | |

What's inside
Steps it walks through
  1. Concepts
  2. Where Prompts Live in Trace Data
  3. Finding Prompts by Span Kind
  4. Performance Signal Columns
  5. Prerequisites
  6. Install ax
  7. Verify environment
  8. Default Project
  9. Phase 1: Extract the Current Prompt
  10. Find LLM spans containing prompts
  11. Export a trace to inspect prompt structure
  12. Extract prompts from exported JSON
  13. Reconstruct the prompt as messages
  14. Phase 2: Gather Performance Data
Ships with 1 file
  • metadata.json
Commands it runs
List LLM spans (where prompts live)
ax spans list PROJECT_ID --filter "attributes.openinference.span.kind = 'LLM'" --limit 10
Filter by model
ax spans list PROJECT_ID --filter "attributes.llm.model_name = 'gpt-4o'" --limit 10
Filter by span name (e.g., a specific LLM call)
ax spans list PROJECT_ID --filter "name = 'ChatCompletion'" --limit 10
Export all spans in a trace
ax spans export --trace-id TRACE_ID --project PROJECT_ID
Export a single span
ax spans export --span-id SPAN_ID --project PROJECT_ID
More from claude-skill-registry
All skills →
About this skill
What does the arize-prompt-optimization skill do?

INVOKE THIS SKILL when optimizing, improving, or debugging LLM prompts using production trace data, evaluations, and annotations. Covers extracting prompts from spans, gathering performance signal, and running a data-driven optimization loop using the ax CLI.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill arize-prompt-optimization --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going