/engineering-advanced-skills:senior-prompt-engineerfrom engineering-advanced-skills
Optimizes prompts, evaluates LLM outputs and RAG quality, and designs agentic systems with ReAct/Plan-Execute patterns. Includes token cost estimation, retrieval metrics (Precision@K, MRR, NDCG), and a pattern library.
Ships in engineering-advanced-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Prompt engineering patterns, LLM evaluation frameworks, and agentic system design. Provides static (deterministic) analysis tools to optimize prompts, evaluate RAG retrieval and generation quality, and validate/visualize agent workflows — plus deep reference libraries of prompt patterns, evaluation metrics, and agent architectures.
Current frontier models reason before they answer, which changes what a good prompt looks like:
Thought: blocks and "explain your reasoning first" are for non-reasoning models. For reasoning models, raise the platform's reasoning control (effort / thinking budget) when a task needs more depth.prompt_optimizer.py flags forced chain-of-thought and shouted imperatives, so you can run it on an inherited prompt to find them.
What shapes this skill's output most is the target model, the job the prompt has to do, and the data you can test it against. Settle the inputs below before producing anything. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
prompt_optimizer.py --model). Prices come from the provider's pricing page, passed as flags.rag_evaluator.py needs contexts and questions before it can report relevance, faithfulness or Precision@K, so find out what exists before promising those numbers.--runs), and a tight budget shifts the trade-off between more few-shot examples and a shorter prompt.Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
| Tool | Purpose | Example (runs as written) |
|---|---|---|
prompt_optimizer.py | Heuristic prompt review: vague wording, missing output format, forced chain-of-thought, ALL-CAPS emphasis, structure, token estimate; --optimize, --extract-examples, --compare | python scripts/prompt_optimizer.py assets/sample_prompt_flawed.txt --analyze |
rag_evaluator.py | Lexical RAG scoring: context relevance, faithfulness (numbers absent from the context count as unsupported), groundedness, Precision@K; --min-faithfulness gate | python scripts/rag_evaluator.py --contexts assets/sample_contexts.json --questions assets/sample_questions.json --min-faithfulness 0.7 |
agent_orchestrator.py | Validate an agent config, draw its flow (ASCII/Mermaid), estimate tokens and cost per run | python scripts/agent_orchestrator.py assets/sample_agent.yaml --estimate-cost --input-price 0.003 --output-price 0.015 |
No tool carries a price table: costs appear only when you pass prices per 1K tokens from the
provider's current pricing page (the numbers above are example values). --model only picks
a characters-per-token ratio, so token counts are estimates, not tokenizer output. Scores
are heuristics for finding problems; confirm with an eval set.
Exit codes: 0 ok; 1 rag_evaluator.py faithfulness below --min-faithfulness, or
agent_orchestrator.py --validate found errors; 2 bad input (missing or empty file,
invalid JSON, wrong shape, --estimate-cost without prices).
Samples: sample_prompt_flawed.txt (vague verbs, "think step by step", four shouted
imperatives, no output format) against sample_prompt_clean.txt (goal, context, criteria,
JSON contract, one example); sample_questions.json has one answer that invents a rate limit,
so faithfulness is 0.50 and the 0.7 gate exits 1.
prompt_optimizer.py --analyze on the current prompt and fix the flagged issues: add the goal, audience and output contract; remove scripted reasoning and shouted rules.--compare keeps the static metrics side by side).rag_evaluator.py on the retrieved contexts and answers; read every answer it marks unsupported.Load the reference that matches the task — keep this file lean and pull detail on demand:
This skill covers:
This skill does NOT cover:
senior-ml-engineer for LLM integration)senior-data-engineer for pipeline orchestration)senior-ml-engineer for model deployment)senior-data-scientist for experiment design)Mistake: Adding "think step by step" or a forced Thought: / Answer: template to every prompt.
Why it happens: It was the single most reliable trick on earlier models.
Instead: Reasoning models already think; the scaffold costs tokens and can degrade the answer. State the goal and output contract, and raise the reasoning setting if depth is lacking. Keep explicit steps only for non-reasoning models or when the steps are the deliverable.
Mistake: "You MUST ALWAYS... NEVER..." for ordinary preferences. Why it happens: Emphasis seems to make rules stick. Instead: Current models follow instructions closely; capitals make them apply a rule where it does not fit. Write the rule calmly with its reason so the model can generalise.
Mistake: Editing a prompt until one or two hand-picked inputs look right.
Why it happens: It is fast and feels like progress.
Instead: Keep a small set of real inputs with expected outputs and score every version against it. A heuristic score from prompt_optimizer.py finds smells; it does not measure quality.
| File | Purpose |
|---|---|
scripts/prompt_optimizer.py | Heuristic prompt analysis and cleanup |
scripts/rag_evaluator.py | Lexical RAG retrieval and faithfulness scoring with a gate |
scripts/agent_orchestrator.py | Agent config validation, flow diagrams, token and cost estimates |
assets/sample_prompt_flawed.txt, sample_prompt_clean.txt | Before/after prompts for the optimizer |
assets/sample_contexts.json, sample_questions.json | RAG inputs with one fabricated answer (gate exits 1) |
assets/sample_agent.yaml | Two-tool ReAct agent config |
references/*.md | Patterns for reasoning and non-reasoning models, evaluation, agent design, tool reference |
assets/sample_agent.yaml (opens in a new tab)assets/sample_contexts.json (opens in a new tab)assets/sample_prompt_clean.txt (opens in a new tab)assets/sample_prompt_flawed.txt (opens in a new tab)assets/sample_questions.json (opens in a new tab)references/agentic_system_design.md (opens in a new tab)references/llm_evaluation_frameworks.md (opens in a new tab)references/prompt_engineering_patterns.md (opens in a new tab)references/tools-and-workflows.md (opens in a new tab)scripts/agent_orchestrator.py (opens in a new tab)scripts/prompt_optimizer.py (opens in a new tab)scripts/rag_evaluator.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
100 skills in this plugin
/a11y-auditStatic WCAG scan of HTML files (alt text, headings, labels, ARIA, lang, landmarks) and colour contrast checks for colour pairs or CSS. Use when auditing templates for accessibility, checking contrast, or adding an a11y gate to CI.
/agent-designerDesigns multi-agent system architectures with orchestration patterns, tool schemas, and performance evaluation. Use when building AI agent systems, designing agent workflows, creating tool schemas, or evaluating agent performance.
/agent-harnessTest and evaluation harness for AI agents — scenario suites, deterministic replay, regression diffing, cost and latency budgets. Use when agent quality is vibe-checked, before shipping a prompt or model change, or when evals drift.
/agenthubRuns a multi-agent job as a dependency graph: validates the DAG, tracks each agent's state on a board, then ranks and merges their outputs. Use when spawning parallel agents, monitoring a run, or merging results.
/agentic-evaluation-frameworkBuilds LLM and agent evals: weighted rubrics, LLM-as-judge design, inter-rater agreement and pairwise ranking (Elo, Bradley-Terry) from scores you collect. Use when setting up a judge, scoring outputs, or comparing model or prompt variants.
/agent-protocolDesign AI agent communication protocols: MCP tool schemas, A2A, function calling, and inter- agent messaging. Use when building multi-agent systems, defining tool interfaces, or implementing agent-to-agent communication.
npx claudepluginhub borghei/claude-skills --plugin engineering-advanced-skillsOther plugins' skills for the same job