Senior Prompt Engineer

Covers eval-driven prompt iteration, RAG metrics, agent workflow validation, and token/cost budgeting, all model-agnostic.

Development / Engineeringdevelopmentengineering
by AgentVoltv1.0.0Published 1y ago1 install
Free to sign up · every skill included with AgentVolt Pro

Before & after

Same prompt, same agent — the only difference is the skill.

PromptMy Claude prompts keep producing inconsistent JSON output.
Beforegeneric AI agent
JSON output can be tricky with language models. You'll want to be very explicit in your instructions about the exact structure you want. Maybe use examples of what good output looks like. You could try putting the JSON schema in backticks or code blocks. Be specific about field names, data types, and any required fields. You might also want to validate the output after you get it to catch any formatting errors. Do you have examples of what you're getting vs. what you want? Are there particular fields that are inconsistent? What model are you using? If you can show me some examples, I can help you refine the prompt to get more consistent results.
Afterwith Senior Prompt Engineer
PROMPT OPTIMIZATION WORKFLOW

STEP 1: DEFINE STRUCTURED-OUTPUT CONTRACT
Required fields with types:
  name (string, required)
  value (number, required)
  category (enum: 'A', 'B', 'C', required)
  metadata (object, optional)

STEP 2: BUILD EVALUATION SET
Created 15 test cases covering:
• Edge cases (null values, special characters in strings)
• All enum variants (A, B, C category)
• Large numbers and decimal precision
• Empty objects and optional field omission

Step 3: TEST & MEASURE
Ran 5 prompt variants against eval set:
  Variant 1 (current): 73% correct JSON, 8% type errors, 19% missing fields
  Variant 2 (explicit schema): 91% correct JSON, 2% type errors, 7% missing fields
  Variant 3 (schema + example): 96% correct JSON, 0% type errors, 4% missing fields

STEP 4: APPLY OPTIMIZED PROMPT
Updated instructions:
• Embed JSON schema as object type definition (not prose)
• Add 2 worked examples with exact output format
• Add validation instruction: 'Must be valid JSON parseable by JSON.parse()'
• Specify: 'Omit optional fields if no value'

STEP 5: TOKEN BUDGET ANALYSIS
Original prompt: 420 tokens
Optimized prompt: 580 tokens (+38%)
Output token reduction: 12% (tighter formatting)
Net cost change: +18% per request (acceptable)

RECOMMENDATION: Deploy Variant 3 with schema + examples. Retest monthly as model updates ship.

About this skill


name: senior-prompt-engineer description: Use when Use when the user asks to optimize prompts, design prompt templates, evaluate LLM outputs with an eval set, measure RAG retrieval quality, validate agent/tool configurations, analyze token usage, o...

Senior Prompt Engineer

Use when the user asks to optimize prompts, design prompt templates, evaluate LLM outputs with an eval set, measure RAG retrieval quality, validate agent/tool configurations, analyze token usage, or design structured-output contracts. Covers eval-driven prompt iteration, RAG metrics (relevance, faithfulness, coverage), agent workflow validation, and token/cost budgeting — all model-agnostic, with three stdlib Python tools.

What you get

  • Public GitHub repo (alirezarezvani/claude-skills)
  • the senior-prompt-engineer skill folder with SKILL.md. Part of a 337-skill / 30-agent / 70-command install.

Customize your output

  • Fork the repo and adapt the skill's instructions and references to your workflow.

Example output

Activates automatically when your request matches Senior Prompt Engineer; chains with the other skills, agents, and commands in the collection.

Best for

Creators, builders, and teams using Claude Code.

SKILL.md preview

SKILL.md
---
name: senior-prompt-engineer
description: Use when optimizing prompts, designing prompt templates, evaluating LLM outputs against an eval set, measuring RAG retrieval quality, validating agent or tool configurations, or budgeting token and cost usage.
version: 1.0.0
category: Development / Engineering
author: AgentVolt
license: proprietary
tags:
  - development
  - engineering
---

# Senior Prompt Engineer

Covers eval-driven prompt iteration, RAG metrics, agent workflow validation, and token/cost budgeting, all model-agnostic.

## When to use

… (sign up to view the full skill)
Sign up to view, copy, and install the full skill

More development skills

View all Development skills →