agent-launcher-orchest…
Use when someone wants to build, launch, grade or schedule a Claude Managed Agent in their own Anthropic account ('build me an…
Improve prompts and measure LLM quality: fix inconsistent prompts, build eval sets, score RAG retrieval, check agent tool configs. Use whenever the user's prompt, chatbot or RAG answers are unreliable or they ask how to test them.
Claude Code
$ npx -y skills add alirezarezvani/claude-skills --skill senior-prompt-engineer --agent claude-code
Codex
$ npx skills add alirezarezvani/claude-skills --skill senior-prompt-engineer -a codex -y
Cursor
$ npx skills add alirezarezvani/claude-skills --skill senior-prompt-engineer -a cursor -y
Gemini CLI
$ npx skills add alirezarezvani/claude-skills --skill senior-prompt-engineer -a gemini-cli -y
GitHub Copilot
$ npx skills add alirezarezvani/claude-skills --skill senior-prompt-engineer -a github-copilot -y
OpenCode
$ npx skills add alirezarezvani/claude-skills --skill senior-prompt-engineer -a opencode -y
Windsurf
$ npx skills add alirezarezvani/claude-skills --skill senior-prompt-engineer -a windsurf -y
name: "senior-prompt-engineer" description: "Improve prompts and measure LLM quality: fix inconsistent prompts, build eval sets, score RAG retrieval, check agent tool configs. Use whenever the user's prompt, chatbot or RAG answers are unreliable or they ask how to test them."
Eval-driven prompt engineering, RAG quality measurement, and agent workflow validation. Everything here is **model-agnostic by design**: techniques are framed by what they do, not by which model generation they were observed on, and the tools never hardcode model IDs or pricing — you supply your provider's current rates when you want dollar figures.
1. **Never change a prompt without a baseline.** Capture metrics first (`--analyze --output baseline.json`), then compare every iteration against it. 2. **Eval set before optimization.** 10–20 representative cases with expected outputs minimum. If the user has no eval set, build one with them before touching the prompt — optimizing against vibes is the #1 failure mode. 3. **Prefer platform features over prompt hacks.** If the provider offers native structured outputs / JSON schema enforcement, tool-use APIs, or prompt caching, use those instead of "respond ONLY with JSON" incantations. Prompt-level format enforcement is the fallback, not the default. 4. **Current-generation models need less scaffolding.** Don't add chain-of-thought boilerplate, role framing, or few-shot examples reflexively — frontier models often do worse with redundant scaffolding. Add each element only when the eval set shows it helps. 5. **Cost numbers are always user-supplied.** Look up the provider's current per-Mtok pricing and pass it via `--price-per-mtok` (never trust a cached price table — including any you remember).
Static analysis: token estimate, clarity/structure scores (0–100), ambiguity + redundancy detection, few-shot example extraction.
# Full analysis (human-readable report) python3 scripts/prompt_optimizer.py prompt.txt --analyze # Save machine-readable baseline for later comparison python3 scripts/prompt_optimizer.py prompt.txt --analyze --json --output baseline.json # Token estimate; cost only if you supply your provider's current rate python3 scripts/prompt_optimizer.py prompt.txt --tokens --model claude --price-per-mtok 3.00 # Whitespace/redundancy-trimmed version python3 scripts/prompt_optimizer.py prompt.txt --optimize --output optimized.txt # Extract Input/Output few-shot pairs to JSON python3 scripts/prompt_optimizer.py prompt.txt --extract-examples --output examples.json # Compare a revision against the saved baseline python3 scripts/prompt_optimizer.py optimized.txt --analyze --compare baseline.json
`--model` accepts any string; only the tokenizer family is inferred (names containing "claude" → 3.5 chars/token, otherwise 4.0). Exit 0 on success, 1 on missing file.
Measures retrieval and grounding quality from two JSON files (formats printed in `--help`).
python3 scripts/rag_evaluator.py --contexts retrieved.json --questions eval_set.json python3 scripts/rag_evaluator.py --contexts ctx.json --questions q.json --k 10 --json python3 scripts/rag_evaluator.py --contexts ctx.json --questions q.json --output report.json --verbose python3 scripts/rag_evaluator.py --contexts ctx.json --questions q.json --compare baseline_report.json
Reports context relevance, precision@k, coverage, answer faithfulness, groundedness. Treat relevance < 0.80 as a retrieval problem (chunking/embedding/filtering), not a prompt problem — fix retrieval before rewriting the generation prompt.
Validates agent configs (YAML/JSON): tool wiring, missing required config, loop risk, token estimates.
python3 scripts/agent_orchestrator.py agent.yaml --validate
python3 scripts/agent_orchestrator.py agent.yaml --visualize --format mermaid
python3 scripts/agent_orchestrator.py agent.yaml --estimate-cost --runs 100 \
--input-price-per-mtok 3.00 --output-price-per-mtok 15.00Without the two price flags, `--estimate-cost` reports token estimates only. The `model:` field in the config is informational — any model name is accepted.
1. **Baseline:** `python3 scripts/prompt_optimizer.py current_prompt.txt --analyze --json --output baseline.json` 2. **Diagnose** from the report: ambiguous verbs ("analyze", "handle"), redundant blocks, missing output contract, token waste. 3. **Apply one change at a time**, in this order of leverage: | Symptom | Fix | |---------|-----| | Malformed/unparseable output | Native structured outputs / JSON schema if the API supports it; explicit schema-in-prompt otherwise | | Inconsistent answers across runs | Tighten instructions + add 2–3 contrastive examples (one near-miss showing what NOT to do) | | Misses edge cases | Enumerate the edge cases explicitly; add a "when uncertain, do X" rule | | Token bloat on repeated calls | Move stable prefix (system rules, examples) first so prompt caching applies; trim redundancy | | Wrong reasoning on hard cases | Ask for stepwise reasoning *in a scratch field the consumer ignores*, or use the provider's extended-thinking mode | 4. **Re-analyze and compare:** `python3 scripts/prompt_optimizer.py revised.txt --analyze --compare baseline.json` 5. **Eval gate (must pass before shipping):** run the revised prompt over the eval set, write per-case pass/fail to `eval_results.json`, then assert:
python3 scripts/prompt_optimizer.py revised.txt --analyze --json --output revised.json \
&& python3 -c "
import json, sys
r = json.load(open('revised.json')); b = json.load(open('baseline.json'))
ok = r['clarity_score'] >= b['clarity_score'] and r['token_count'] <=415 production-ready skills for Claude Code and 12 other coding agents, covering engineering, product, marketing, compliance, finance and the C-suite. We test whether each skill loads when you ask in plain words, and publish the results.
Use when someone wants to build, launch, grade or schedule a Claude Managed Agent in their own Anthropic account ('build me an…
Use when a launched managed agent needs grading against a rubric and improving ('grade my agent', 'is it good enough'). Builds…
Use when someone has an agent idea to scope before launch ('help me scope an agent'). Interviews them about the one job and…
Use when a graded managed agent should run on a schedule, on an event trigger or on demand ('run it every morning'). Validates…
Use when a managed-agent build sheet is ready to launch ('launch it', 'deploy the agent'). Generates and validates API payloads…
Use when closing out a launched managed agent ('wrap up', 'what do I own now'). Inventories primitives with…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Design and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI…