Prompt Engineering Patterns
wshobson/agents
Reference for designing and tuning production LLM prompts: few-shot examples, chain-of-thought, structured outputs, templates and system prompts.
A skill your agent uses 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…
$ npx skills add alirezarezvani/claude-skills --skill senior-prompt-engineer -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install alirezarezvani/claude-skills senior-prompt-engineer --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/alirezarezvani/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineering-team/skills/senior-prompt-engineer .claude/skills/senior-prompt-engineer && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "senior-prompt-engineer" agent skill from https://github.com/alirezarezvani/claude-skills/tree/main/engineering-team/skills/senior-prompt-engineer into .claude/skills/senior-prompt-engineer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "senior-prompt-engineer", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/alirezarezvani/claude-skills/tree/main/engineering-team/skills/senior-prompt-engineerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add alirezarezvani/claude-skills --skill senior-prompt-engineer -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install alirezarezvani/claude-skills senior-prompt-engineer --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alirezarezvani/claude-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/engineering-team/skills/senior-prompt-engineer .agents/skills/senior-prompt-engineer && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "senior-prompt-engineer" agent skill from https://github.com/alirezarezvani/claude-skills/tree/main/engineering-team/skills/senior-prompt-engineer into .agents/skills/senior-prompt-engineer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "senior-prompt-engineer", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add alirezarezvani/claude-skills --skill senior-prompt-engineer -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install alirezarezvani/claude-skills senior-prompt-engineer --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alirezarezvani/claude-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/engineering-team/skills/senior-prompt-engineer .cursor/skills/senior-prompt-engineer && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "senior-prompt-engineer" agent skill from https://github.com/alirezarezvani/claude-skills/tree/main/engineering-team/skills/senior-prompt-engineer into .cursor/skills/senior-prompt-engineer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "senior-prompt-engineer", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/alirezarezvani/claude-skills.git --path engineering-team/skills/senior-prompt-engineer--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add alirezarezvani/claude-skills --skill senior-prompt-engineer -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install alirezarezvani/claude-skills senior-prompt-engineer --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alirezarezvani/claude-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/engineering-team/skills/senior-prompt-engineer .gemini/skills/senior-prompt-engineer && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "senior-prompt-engineer" agent skill from https://github.com/alirezarezvani/claude-skills/tree/main/engineering-team/skills/senior-prompt-engineer into .gemini/skills/senior-prompt-engineer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "senior-prompt-engineer", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install alirezarezvani/claude-skills senior-prompt-engineerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add alirezarezvani/claude-skills --skill senior-prompt-engineer -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/alirezarezvani/claude-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/engineering-team/skills/senior-prompt-engineer .github/skills/senior-prompt-engineer && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "senior-prompt-engineer" agent skill from https://github.com/alirezarezvani/claude-skills/tree/main/engineering-team/skills/senior-prompt-engineer into .github/skills/senior-prompt-engineer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "senior-prompt-engineer", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add alirezarezvani/claude-skills --skill senior-prompt-engineer -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install alirezarezvani/claude-skills senior-prompt-engineer --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alirezarezvani/claude-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/engineering-team/skills/senior-prompt-engineer .opencode/skills/senior-prompt-engineer && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "senior-prompt-engineer" agent skill from https://github.com/alirezarezvani/claude-skills/tree/main/engineering-team/skills/senior-prompt-engineer into .opencode/skills/senior-prompt-engineer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "senior-prompt-engineer", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
senior-prompt-engineerA skill your agent uses 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…
Senior Prompt Engineer is an agent skill from alirezarezvani/claude-skills. 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.
Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `references/agentic_system_design.md`, `references/llm_evaluation_frameworks.md` and `references/prompt_engineering_patterns.md`).
It sits in AI & LLM Engineering, covering Prompt engineering, Structured output and tool calling and LLM cost and token optimization. It works with Python. The repository describes itself as: 380 Claude Code skills & agent skills & plugins (30+ Agents, 70+ custom commands, 380+ skills, customizable references, scripts)for Claude Code, Codex, Gemini CLI, Cursor, and 8… The licence is MIT.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 19392f7. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 3 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
python3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Senior Prompt Engineer loads about 2.5k tokens when it runs, and up to ~15k if it reads all its reference files. Until then it costs about 112 tokens; SKILL.md has 932 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from alirezarezvani/claude-skills at commit 19392f7, republished under its MIT licence (© alirezarezvani). 932 words, ~2,474 tokens.
.claude/skills/senior-prompt-engineer/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.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.
--analyze --output baseline.json), then compare every iteration against it.--price-per-mtok (never trust a cached price table — including any you remember).scripts/prompt_optimizer.pyStatic 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.
scripts/rag_evaluator.pyMeasures 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.jsonReports 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.
scripts/agent_orchestrator.pyValidates 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.
python3 scripts/prompt_optimizer.py current_prompt.txt --analyze --json --output baseline.json| 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 |
python3 scripts/prompt_optimizer.py revised.txt --analyze --compare baseline.jsoneval_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'] <= b['token_count'] * 1.10
sys.exit(0 if ok else 1)"
echo "gate exit=$?" # 0 = ship; 1 = regression, iterate againpython3 scripts/prompt_optimizer.py prompt_with_examples.txt --extract-examples --output examples.json and inspect that every extracted pair parses against your schema.python3 -c "import json,sys; [json.loads(l) for l in sys.stdin]" at minimum); 10/10 must parse, else return to step 2.questions.json (id, question, reference answer) and capture current retrievals to contexts.json.python3 scripts/rag_evaluator.py --contexts contexts.json --questions questions.json --output rag_baseline.jsonpython3 scripts/rag_evaluator.py --contexts new_contexts.json --questions questions.json --compare rag_baseline.json — every metric must be ≥ baseline; any regression blocks the change.python3 scripts/agent_orchestrator.py agent.yaml --validate — must exit with VALIDATION PASSED; fix every error and warning (missing tool config, unbounded iterations, loop risk).--estimate-cost --runs N with your current prices; if cost/run exceeds budget, cut tools or context before downgrading the model.| File | Contains | Load when user asks about |
|---|---|---|
references/prompt_engineering_patterns.md | 10 prompt patterns with input/output examples | "which pattern?", few-shot design, decomposition, meta-prompting |
references/llm_evaluation_frameworks.md | Eval metrics, scoring methods, A/B testing | "how to evaluate?", "measure quality", "compare prompts" |
references/agentic_system_design.md | Agent architectures (ReAct, Plan-Execute, Tool Use) | "build agent", "tool calling", "multi-agent" |
engineering-team/skills/senior-ml-engineer — model deployment and serving (this skill stops at the prompt/eval layer)engineering/rag-architect — RAG system architecture (this skill measures RAG quality; that one designs the pipeline)engineering/agent-designer — full agent system design (this skill validates configs; that one designs the architecture)© alirezarezvani, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 6 other files (scripts, references) in engineering-team/skills/senior-prompt-engineer of alirezarezvani/claude-skills.
Open the folder on GitHubat commit 19392f7
We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in alirezarezvani/claude-skills, which our catalogue first saw on October 7, 2026.
Senior Prompt Engineer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Senior Prompt Engineer this skillalirezarezvani/claude-skills | 28k | 1 repos | ~2.5k | Automated safety check: Pass | MIT | |
| Prompt Engineering Patternswshobson/agents | 40k | — | ~1.3k | Automated safety check: Pass | MIT | |
| Kayba Stage 2 Domain Contextkayba-ai/agentic-context-engine | 2.6k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Lintlanghermes-labs-ai/lintlang | 140 | — | ~719 | Automated safety check: Pass | Apache-2.0 | |
| Lintlang Audithermes-labs-ai/lintlang | 140 | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Context Engineering Reviewmohitagw15856/pm-claude-skills | 1.4k | — | ~1.4k | Automated safety check: Pass | MIT |
wshobson/agents
Reference for designing and tuning production LLM prompts: few-shot examples, chain-of-thought, structured outputs, templates and system prompts.
kayba-ai/agentic-context-engine
Gather domain context about the repository and agent — system prompt, tool definitions, domain docs, and behavior patterns from traces.
hermes-labs-ai/lintlang
A skill your agent uses when writing or reviewing AI agent configs, system prompts, or tool definitions (JSON/YAML/Python) and you need to catch ambiguous tool descriptions, missing stop conditions…
hermes-labs-ai/lintlang
Audit a named AI agent config, system prompt, tool definition, or instruction file (YAML, JSON, Markdown, text, or Python) with the released LintLang CLI in GitHub Copilot CLI.
mohitagw15856/pm-claude-skills
Review what an LLM feature or agent actually puts in its context window — and find what's bloating, missing, or fighting itself.
VectorSpaceLab/AREX-Skill
A skill your agent uses for direct LiteLLM Python SDK work: chat/text completions, async calls, streaming, embeddings, structured outputs, tools, token/cost checks, caching, callbacks, import/smoke…
alirezarezvani/claude-skills
Writes INVEST-checked user stories with acceptance criteria, splits epics, plans sprints from velocity and ranks the backlog with a weighted score.
alirezarezvani/claude-skills
OKR cascade toolkit for product leaders: generates aligned company-to-team OKRs from five strategy types and scores how well they line up.
alirezarezvani/claude-skills
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store.
alirezarezvani/claude-skills
Design AWS architectures for startups using serverless patterns and IaC templates.
alirezarezvani/claude-skills
Calculates attribution, funnel and ROI figures for marketing campaigns with three Python scripts that need only the standard library.
alirezarezvani/claude-skills
Reverse-engineers a frontend, backend or fullstack codebase into a product requirements document with per-page docs, an enum dictionary and an API inventory.
Works with
Categories
A skill your agent uses 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…. Senior Prompt Engineer is an agent skill from alirezarezvani/claude-skills. 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.
Senior Prompt Engineer fits situations like: the user asks to optimize prompts; design prompt templates; evaluate LLM outputs with an eval set; measure RAG retrieval quality.
Run `npx skills add alirezarezvani/claude-skills --skill senior-prompt-engineer -a claude-code`. Or copy the skill folder (engineering-team/skills/senior-prompt-engineer in alirezarezvani/claude-skills) into .claude/skills/senior-prompt-engineer in your project. Claude Code loads it when a task matches its description.
Run `npx skills add alirezarezvani/claude-skills --skill senior-prompt-engineer -a codex`. Or copy the skill folder (engineering-team/skills/senior-prompt-engineer in alirezarezvani/claude-skills) into .agents/skills/senior-prompt-engineer in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alirezarezvani/claude-skills --skill senior-prompt-engineer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/senior-prompt-engineer, .gemini/skills/senior-prompt-engineer, .github/skills/senior-prompt-engineer and .opencode/skills/senior-prompt-engineer in your project.
Going by SKILL.md and its folder, Senior Prompt Engineer needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Senior Prompt Engineer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.5k tokens (SKILL.md is roughly 9.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 12k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Senior Prompt Engineer: Prompt Engineering Patterns (wshobson/agents, 40k stars), Kayba Stage 2 Domain Context (kayba-ai/agentic-context-engine, 2.6k stars), Lintlang (hermes-labs-ai/lintlang, 140 stars) and Lintlang Audit (hermes-labs-ai/lintlang, 140 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
alirezarezvani (a GitHub user) maintains it in alirezarezvani/claude-skills, which has 27,938 GitHub stars. The repository holds 342 skills in this directory. The repository was last updated on August 30, 2026.
Source: alirezarezvani/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.