Back to skills
SKILL.md
Senior Prompt Engineer
ASecurityPrompt engineering patterns, LLM evaluation frameworks, agentic system design, and structured output design. Optimize prompts, design few-shot examples, evaluate RAG quality, and build agent workflows.
- 3 stars
- 0 votes
- 0 copies
- 2 views
- Added November 14, 2026
Works with
Security analysis
100/100Pro scans all 7 files and shows the line behind each finding
npx -y skills add SebastianLuser/claude-code-arcane --skill senior-prompt-engineer --agent claude-codeAre you the author of Senior Prompt Engineer?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/sebastianluser-senior-prompt-engineer)---
name: senior-prompt-engineer
description: "Prompt engineering patterns, LLM evaluation frameworks, agentic system design, and structured output design. Optimize prompts, design few-shot examples, evaluate RAG quality, and build agent workflows."
argument-hint: ""
category: "ai"
user-invocable: true
allowed-tools: Read, Glob, Grep, Bash, Write, Edit
---
# Senior Prompt Engineer
Prompt engineering patterns, LLM evaluation frameworks, and agentic system design. May write or edit prompt files, agent configurations, and evaluation scripts.
## Quick Start
```bash
python scripts/prompt_optimizer.py prompts/my_prompt.txt --analyze # Analyze prompt
python scripts/rag_evaluator.py --contexts contexts.json --questions questions.json # Evaluate RAG
python scripts/agent_orchestrator.py agent_config.yaml --visualize # Visualize agent
```
## Tools
### 1. Prompt Optimizer
Static checks for clarity and structure, with an approximate token count (characters / 4). `--optimize` only normalizes whitespace; the real rewrite is yours.
```bash
python scripts/prompt_optimizer.py prompt.txt --analyze # Full analysis
python scripts/prompt_optimizer.py prompt.txt --optimize # Normalize whitespace
python scripts/prompt_optimizer.py prompt.txt --tokens # Approximate token count
python scripts/prompt_optimizer.py prompt.txt --extract-examples --output examples.json
```
### 2. RAG Evaluator
Evaluates retrieval quality by measuring context relevance and answer faithfulness.
```bash
python scripts/rag_evaluator.py --contexts retrieved.json --questions eval_set.json
python scripts/rag_evaluator.py --contexts retrieved.json --questions eval_set.json --metrics relevance,faithfulness,coverage
python scripts/rag_evaluator.py --contexts retrieved.json --questions eval_set.json --output report.json --verbose
```
### 3. Agent Orchestrator
Parses agent definitions and visualizes execution flows. Validates tool configurations.
```bash
python scripts/agent_orchestrator.py agent.yaml --validate # Validate config
python scripts/agent_orchestrator.py agent.yaml --visualize # Show workflow (ASCII)
python scripts/agent_orchestrator.py agent.yaml --visualize --format mermaid # Mermaid
python scripts/agent_orchestrator.py agent.yaml --estimate-cost --price-in 4 --price-out 20 # Tokens; dollars with your current prices (USD/Mtok)
```
## Prompt Engineering Workflows
### Prompt Optimization Workflow
1. **Baseline**: `python scripts/prompt_optimizer.py current_prompt.txt --analyze --output baseline.json`
2. **Identify issues**: Token waste, ambiguous instructions, missing constraints
3. **Apply patterns**:
| Issue | Pattern |
|-------|---------|
| Ambiguous output | Add explicit format specification |
| Too verbose | Extract to few-shot examples |
| Inconsistent results | Add 2-3 varied examples and state the success criteria |
| Missing edge cases | Add constraint boundaries |
4. **Optimize**: `python scripts/prompt_optimizer.py current_prompt.txt --optimize --output optimized.txt`
5. **Compare**: `python scripts/prompt_optimizer.py optimized.txt --analyze --compare baseline.json`
6. **Validate**: Run both prompts against evaluation set
### Few-Shot Example Design
1. Define task clearly (input format, output format)
2. Select 3-5 diverse examples: simple case, edge case, complex case, negative case
3. Format consistently
4. Check what the prompt contains: `python scripts/prompt_optimizer.py prompt_with_examples.txt --extract-examples`
5. Test with held-out cases
### Structured Output Design
1. Define JSON/XML schema with types, constraints, enums
2. Pass the schema through the API's structured outputs (`output_config.format` on Claude) so the response is guaranteed to match it; do not rely on "respond ONLY with valid JSON" in the prompt
3. Describe in the prompt what each field means, not the JSON syntax
4. Validate the parsed result against the schema in code before using it
## Reference Documentation
> See references/ for detailed patterns and examples.
| File | Contains |
|------|----------|
| `references/prompt_engineering_patterns.md` | 10 prompt patterns with I/O examples |
| `references/llm_evaluation_frameworks.md` | Evaluation metrics, scoring, A/B testing |
| `references/agentic_system_design.md` | Agent architectures (ReAct, Plan-Execute, Tool Use) |
## Common Patterns Quick Reference
| Pattern | When to Use | Example |
|---------|-------------|---------|
| **Zero-shot** | Simple, well-defined tasks | "Classify this email as spam or not spam" |
| **Few-shot** | Complex tasks, consistent format | Provide 3-5 examples before task |
| **Reasoning depth** | Reasoning, math, multi-step | Models with adaptive thinking: raise `effort`. Models without it: "Think step by step..." |
| **Role Prompting** | Expertise, specific perspective | "You are an expert tax accountant..." |
| **Structured Output** | Need parseable JSON/XML | Include schema + format enforcement |
Files in this skill
- SKILL.md
- references/agentic_system_design.md
- references/llm_evaluation_frameworks.md
- references/prompt_engineering_patterns.md
- scripts/agent_orchestrator.py
- scripts/prompt_optimizer.py
- scripts/rag_evaluator.py
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.