[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KB523JY155VM0D021V5FRC":3,"skill-same:01M6KB523JY155VM0D021V5FRC":107},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":52,"linkOnly":53,"markdownContent":54,"markdownBody":55,"frontMatter":56,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":6,"ownerHtmlUrl":62,"ownerBlogUrl":63,"ownerDescription":6,"updatedAt":64,"install":65,"resources":78},"01M6KB523JY155VM0D021V5FRC","senior-prompt-engineer",null,"This skill should be used when the user asks to \"optimize prompts\", \"design prompt templates\", \"evaluate LLM outputs\", \"build agentic systems\", \"implement RAG\", \"create few-shot examples\", \"analyze token usage\", or \"design AI workflows\". Use for prompt engineering patterns, LLM evaluation frameworks, agent architectures, and structured output design.","afaizalam2003\u002FMaster-claude-skill","afaizalam2003","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F222019359?v=4","01M6K8F2XNT0HKBPF00JQ78SV3","Faiz Alam","01M6K8F31EBXAPER0EG8R9HTR5",3,"MIT","https:\u002F\u002Fgithub.com\u002Fafaizalam2003\u002FMaster-claude-skill\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-prompt-engineer\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],"prompt engineer","senior prompt engineer","engineer","prompt","analyze","usage","few-shot","architectures","structured output","token","optimize","patterns","design","prompt engineering patterns","Evaluation","create","engineering patterns","rag","workflows","agentic","2026-11-10 10:12:30",false,"---\nname: \"senior-prompt-engineer\"\ndescription: This skill should be used when the user asks to \"optimize prompts\", \"design prompt templates\", \"evaluate LLM outputs\", \"build agentic systems\", \"implement RAG\", \"create few-shot examples\", \"analyze token usage\", or \"design AI workflows\". Use for prompt engineering patterns, LLM evaluation frameworks, agent architectures, and structured output design.\n---\n\n# Senior Prompt Engineer\n\nPrompt engineering patterns, LLM evaluation frameworks, and agentic system design.\n\n## Table of Contents\n\n- [Quick Start](#quick-start)\n- [Tools Overview](#tools-overview)\n  - [Prompt Optimizer](#1-prompt-optimizer)\n  - [RAG Evaluator](#2-rag-evaluator)\n  - [Agent Orchestrator](#3-agent-orchestrator)\n- [Prompt Engineering Workflows](#prompt-engineering-workflows)\n  - [Prompt Optimization Workflow](#prompt-optimization-workflow)\n  - [Few-Shot Example Design](#few-shot-example-design-workflow)\n  - [Structured Output Design](#structured-output-design-workflow)\n- [Reference Documentation](#reference-documentation)\n- [Common Patterns Quick Reference](#common-patterns-quick-reference)\n\n---\n\n## Quick Start\n\n```bash\n# Analyze and optimize a prompt file\npython scripts\u002Fprompt_optimizer.py prompts\u002Fmy_prompt.txt --analyze\n\n# Evaluate RAG retrieval quality\npython scripts\u002Frag_evaluator.py --contexts contexts.json --questions questions.json\n\n# Visualize agent workflow from definition\npython scripts\u002Fagent_orchestrator.py agent_config.yaml --visualize\n```\n\n---\n\n## Tools Overview\n\n### 1. Prompt Optimizer\n\nAnalyzes prompts for token efficiency, clarity, and structure. Generates optimized versions.\n\n**Input:** Prompt text file or string\n**Output:** Analysis report with optimization suggestions\n\n**Usage:**\n```bash\n# Analyze a prompt file\npython scripts\u002Fprompt_optimizer.py prompt.txt --analyze\n\n# Output:\n# Token count: 847\n# Estimated cost: $0.0025 (GPT-4)\n# Clarity score: 72\u002F100\n# Issues found:\n#   - Ambiguous instruction at line 3\n#   - Missing output format specification\n#   - Redundant context (lines 12-15 repeat lines 5-8)\n# Suggestions:\n#   1. Add explicit output format: \"Respond in JSON with keys: ...\"\n#   2. Remove redundant context to save 89 tokens\n#   3. Clarify \"analyze\" -> \"list the top 3 issues with severity ratings\"\n\n# Generate optimized version\npython scripts\u002Fprompt_optimizer.py prompt.txt --optimize --output optimized.txt\n\n# Count tokens for cost estimation\npython scripts\u002Fprompt_optimizer.py prompt.txt --tokens --model gpt-4\n\n# Extract and manage few-shot examples\npython scripts\u002Fprompt_optimizer.py prompt.txt --extract-examples --output examples.json\n```\n\n---\n\n### 2. RAG Evaluator\n\nEvaluates Retrieval-Augmented Generation quality by measuring context relevance and answer faithfulness.\n\n**Input:** Retrieved contexts (JSON) and questions\u002Fanswers\n**Output:** Evaluation metrics and quality report\n\n**Usage:**\n```bash\n# Evaluate retrieval quality\npython scripts\u002Frag_evaluator.py --contexts retrieved.json --questions eval_set.json\n\n# Output:\n# === RAG Evaluation Report ===\n# Questions evaluated: 50\n#\n# Retrieval Metrics:\n#   Context Relevance: 0.78 (target: >0.80)\n#   Retrieval Precision@5: 0.72\n#   Coverage: 0.85\n#\n# Generation Metrics:\n#   Answer Faithfulness: 0.91\n#   Groundedness: 0.88\n#\n# Issues Found:\n#   - 8 questions had no relevant context in top-5\n#   - 3 answers contained information not in context\n#\n# Recommendations:\n#   1. Improve chunking strategy for technical documents\n#   2. Add metadata filtering for date-sensitive queries\n\n# Evaluate with custom metrics\npython scripts\u002Frag_evaluator.py --contexts retrieved.json --questions eval_set.json \\\n    --metrics relevance,faithfulness,coverage\n\n# Export detailed results\npython scripts\u002Frag_evaluator.py --contexts retrieved.json --questions eval_set.json \\\n    --output report.json --verbose\n```\n\n---\n\n### 3. Agent Orchestrator\n\nParses agent definitions and visualizes execution flows. Validates tool configurations.\n\n**Input:** Agent configuration (YAML\u002FJSON)\n**Output:** Workflow visualization, validation report\n\n**Usage:**\n```bash\n# Validate agent configuration\npython scripts\u002Fagent_orchestrator.py agent.yaml --validate\n\n# Output:\n# === Agent Validation Report ===\n# Agent: research_assistant\n# Pattern: ReAct\n#\n# Tools (4 registered):\n#   [OK] web_search - API key configured\n#   [OK] calculator - No config needed\n#   [WARN] file_reader - Missing allowed_paths\n#   [OK] summarizer - Prompt template valid\n#\n# Flow Analysis:\n#   Max depth: 5 iterations\n#   Estimated tokens\u002Frun: 2,400-4,800\n#   Potential infinite loop: No\n#\n# Recommendations:\n#   1. Add allowed_paths to file_reader for security\n#   2. Consider adding early exit condition for simple queries\n\n# Visualize agent workflow (ASCII)\npython scripts\u002Fagent_orchestrator.py agent.yaml --visualize\n\n# Output:\n# ┌─────────────────────────────────────────┐\n# │            research_assistant           │\n# │              (ReAct Pattern)            │\n# └─────────────────┬───────────────────────┘\n#                   │\n#          ┌────────▼────────┐\n#          │   User Query    │\n#          └────────┬────────┘\n#                   │\n#          ┌────────▼────────┐\n#          │     Think       │◄──────┐\n#          └────────┬────────┘       │\n#                   │                │\n#          ┌────────▼────────┐       │\n#          │   Select Tool   │       │\n#          └────────┬────────┘       │\n#                   │                │\n#     ┌─────────────┼─────────────┐  │\n#     ▼             ▼             ▼  │\n# [web_search] [calculator] [file_reader]\n#     │             │             │  │\n#     └─────────────┼─────────────┘  │\n#                   │                │\n#          ┌────────▼────────┐       │\n#          │    Observe      │───────┘\n#          └────────┬────────┘\n#                   │\n#          ┌────────▼────────┐\n#          │  Final Answer   │\n#          └─────────────────┘\n\n# Export workflow as Mermaid diagram\npython scripts\u002Fagent_orchestrator.py agent.yaml --visualize --format mermaid\n```\n\n---\n\n## Prompt Engineering Workflows\n\n### Prompt Optimization Workflow\n\nUse when improving an existing prompt's performance or reducing token costs.\n\n**Step 1: Baseline current prompt**\n```bash\npython scripts\u002Fprompt_optimizer.py current_prompt.txt --analyze --output baseline.json\n```\n\n**Step 2: Identify issues**\nReview the analysis report for:\n- Token waste (redundant instructions, verbose examples)\n- Ambiguous instructions (unclear output format, vague verbs)\n- Missing constraints (no length limits, no format specification)\n\n**Step 3: Apply optimization patterns**\n| Issue | Pattern to Apply |\n|-------|------------------|\n| Ambiguous output | Add explicit format specification |\n| Too verbose | Extract to few-shot examples |\n| Inconsistent results | Add role\u002Fpersona framing |\n| Missing edge cases | Add constraint boundaries |\n\n**Step 4: Generate optimized version**\n```bash\npython scripts\u002Fprompt_optimizer.py current_prompt.txt --optimize --output optimized.txt\n```\n\n**Step 5: Compare results**\n```bash\npython scripts\u002Fprompt_optimizer.py optimized.txt --analyze --compare baseline.json\n# Shows: token reduction, clarity improvement, issues resolved\n```\n\n**Step 6: Validate with test cases**\nRun both prompts against your evaluation set and compare outputs.\n\n---\n\n### Few-Shot Example Design Workflow\n\nUse when creating examples for in-context learning.\n\n**Step 1: Define the task clearly**\n```\nTask: Extract product entities from customer reviews\nInput: Review text\nOutput: JSON with {product_name, sentiment, features_mentioned}\n```\n\n**Step 2: Select diverse examples (3-5 recommended)**\n| Example Type | Purpose |\n|--------------|---------|\n| Simple case | Shows basic pattern |\n| Edge case | Handles ambiguity |\n| Complex case | Multiple entities |\n| Negative case | What NOT to extract |\n\n**Step 3: Format consistently**\n```\nExample 1:\nInput: \"Love my new iPhone 15, the camera is amazing!\"\nOutput: {\"product_name\": \"iPhone 15\", \"sentiment\": \"positive\", \"features_mentioned\": [\"camera\"]}\n\nExample 2:\nInput: \"The laptop was okay but battery life is terrible.\"\nOutput: {\"product_name\": \"laptop\", \"sentiment\": \"mixed\", \"features_mentioned\": [\"battery life\"]}\n```\n\n**Step 4: Validate example quality**\n```bash\npython scripts\u002Fprompt_optimizer.py prompt_with_examples.txt --validate-examples\n# Checks: consistency, coverage, format alignment\n```\n\n**Step 5: Test with held-out cases**\nEnsure model generalizes beyond your examples.\n\n---\n\n### Structured Output Design Workflow\n\nUse when you need reliable JSON\u002FXML\u002Fstructured responses.\n\n**Step 1: Define schema**\n```json\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"summary\": {\"type\": \"string\", \"maxLength\": 200},\n    \"sentiment\": {\"enum\": [\"positive\", \"negative\", \"neutral\"]},\n    \"confidence\": {\"type\": \"number\", \"minimum\": 0, \"maximum\": 1}\n  },\n  \"required\": [\"summary\", \"sentiment\"]\n}\n```\n\n**Step 2: Include schema in prompt**\n```\nRespond with JSON matching this schema:\n- summary (string, max 200 chars): Brief summary of the content\n- sentiment (enum): One of \"positive\", \"negative\", \"neutral\"\n- confidence (number 0-1): Your confidence in the sentiment\n```\n\n**Step 3: Add format enforcement**\n```\nIMPORTANT: Respond ONLY with valid JSON. No markdown, no explanation.\nStart your response with { and end with }\n```\n\n**Step 4: Validate outputs**\n```bash\npython scripts\u002Fprompt_optimizer.py structured_prompt.txt --validate-schema schema.json\n```\n\n---\n\n## Reference Documentation\n\n| File | Contains | Load when user asks about |\n|------|----------|---------------------------|\n| `references\u002Fprompt_engineering_patterns.md` | 10 prompt patterns with input\u002Foutput examples | \"which pattern?\", \"few-shot\", \"chain-of-thought\", \"role prompting\" |\n| `references\u002Fllm_evaluation_frameworks.md` | Evaluation metrics, scoring methods, A\u002FB testing | \"how to evaluate?\", \"measure quality\", \"compare prompts\" |\n| `references\u002Fagentic_system_design.md` | Agent architectures (ReAct, Plan-Execute, Tool Use) | \"build agent\", \"tool calling\", \"multi-agent\" |\n\n---\n\n## Common Patterns Quick Reference\n\n| Pattern | When to Use | Example |\n|---------|-------------|---------|\n| **Zero-shot** | Simple, well-defined tasks | \"Classify this email as spam or not spam\" |\n| **Few-shot** | Complex tasks, consistent format needed | Provide 3-5 examples before the task |\n| **Chain-of-Thought** | Reasoning, math, multi-step logic | \"Think step by step...\" |\n| **Role Prompting** | Expertise needed, specific perspective | \"You are an expert tax accountant...\" |\n| **Structured Output** | Need parseable JSON\u002FXML | Include schema + format enforcement |\n\n---\n\n## Common Commands\n\n```bash\n# Prompt Analysis\npython scripts\u002Fprompt_optimizer.py prompt.txt --analyze          # Full analysis\npython scripts\u002Fprompt_optimizer.py prompt.txt --tokens           # Token count only\npython scripts\u002Fprompt_optimizer.py prompt.txt --optimize         # Generate optimized version\n\n# RAG Evaluation\npython scripts\u002Frag_evaluator.py --contexts ctx.json --questions q.json  # Evaluate\npython scripts\u002Frag_evaluator.py --contexts ctx.json --compare baseline  # Compare to baseline\n\n# Agent Development\npython scripts\u002Fagent_orchestrator.py agent.yaml --validate       # Validate config\npython scripts\u002Fagent_orchestrator.py agent.yaml --visualize      # Show workflow\npython scripts\u002Fagent_orchestrator.py agent.yaml --estimate-cost  # Token estimation\n```\n","# Senior Prompt Engineer\n\nPrompt engineering patterns, LLM evaluation frameworks, and agentic system design.\n\n## Table of Contents\n\n- [Quick Start](#quick-start)\n- [Tools Overview](#tools-overview)\n  - [Prompt Optimizer](#1-prompt-optimizer)\n  - [RAG Evaluator](#2-rag-evaluator)\n  - [Agent Orchestrator](#3-agent-orchestrator)\n- [Prompt Engineering Workflows](#prompt-engineering-workflows)\n  - [Prompt Optimization Workflow](#prompt-optimization-workflow)\n  - [Few-Shot Example Design](#few-shot-example-design-workflow)\n  - [Structured Output Design](#structured-output-design-workflow)\n- [Reference Documentation](#reference-documentation)\n- [Common Patterns Quick Reference](#common-patterns-quick-reference)\n\n---\n\n## Quick Start\n\n```bash\n# Analyze and optimize a prompt file\npython scripts\u002Fprompt_optimizer.py prompts\u002Fmy_prompt.txt --analyze\n\n# Evaluate RAG retrieval quality\npython scripts\u002Frag_evaluator.py --contexts contexts.json --questions questions.json\n\n# Visualize agent workflow from definition\npython scripts\u002Fagent_orchestrator.py agent_config.yaml --visualize\n```\n\n---\n\n## Tools Overview\n\n### 1. Prompt Optimizer\n\nAnalyzes prompts for token efficiency, clarity, and structure. Generates optimized versions.\n\n**Input:** Prompt text file or string\n**Output:** Analysis report with optimization suggestions\n\n**Usage:**\n```bash\n# Analyze a prompt file\npython scripts\u002Fprompt_optimizer.py prompt.txt --analyze\n\n# Output:\n# Token count: 847\n# Estimated cost: $0.0025 (GPT-4)\n# Clarity score: 72\u002F100\n# Issues found:\n#   - Ambiguous instruction at line 3\n#   - Missing output format specification\n#   - Redundant context (lines 12-15 repeat lines 5-8)\n# Suggestions:\n#   1. Add explicit output format: \"Respond in JSON with keys: ...\"\n#   2. Remove redundant context to save 89 tokens\n#   3. Clarify \"analyze\" -> \"list the top 3 issues with severity ratings\"\n\n# Generate optimized version\npython scripts\u002Fprompt_optimizer.py prompt.txt --optimize --output optimized.txt\n\n# Count tokens for cost estimation\npython scripts\u002Fprompt_optimizer.py prompt.txt --tokens --model gpt-4\n\n# Extract and manage few-shot examples\npython scripts\u002Fprompt_optimizer.py prompt.txt --extract-examples --output examples.json\n```\n\n---\n\n### 2. RAG Evaluator\n\nEvaluates Retrieval-Augmented Generation quality by measuring context relevance and answer faithfulness.\n\n**Input:** Retrieved contexts (JSON) and questions\u002Fanswers\n**Output:** Evaluation metrics and quality report\n\n**Usage:**\n```bash\n# Evaluate retrieval quality\npython scripts\u002Frag_evaluator.py --contexts retrieved.json --questions eval_set.json\n\n# Output:\n# === RAG Evaluation Report ===\n# Questions evaluated: 50\n#\n# Retrieval Metrics:\n#   Context Relevance: 0.78 (target: >0.80)\n#   Retrieval Precision@5: 0.72\n#   Coverage: 0.85\n#\n# Generation Metrics:\n#   Answer Faithfulness: 0.91\n#   Groundedness: 0.88\n#\n# Issues Found:\n#   - 8 questions had no relevant context in top-5\n#   - 3 answers contained information not in context\n#\n# Recommendations:\n#   1. Improve chunking strategy for technical documents\n#   2. Add metadata filtering for date-sensitive queries\n\n# Evaluate with custom metrics\npython scripts\u002Frag_evaluator.py --contexts retrieved.json --questions eval_set.json \\\n    --metrics relevance,faithfulness,coverage\n\n# Export detailed results\npython scripts\u002Frag_evaluator.py --contexts retrieved.json --questions eval_set.json \\\n    --output report.json --verbose\n```\n\n---\n\n### 3. Agent Orchestrator\n\nParses agent definitions and visualizes execution flows. Validates tool configurations.\n\n**Input:** Agent configuration (YAML\u002FJSON)\n**Output:** Workflow visualization, validation report\n\n**Usage:**\n```bash\n# Validate agent configuration\npython scripts\u002Fagent_orchestrator.py agent.yaml --validate\n\n# Output:\n# === Agent Validation Report ===\n# Agent: research_assistant\n# Pattern: ReAct\n#\n# Tools (4 registered):\n#   [OK] web_search - API key configured\n#   [OK] calculator - No config needed\n#   [WARN] file_reader - Missing allowed_paths\n#   [OK] summarizer - Prompt template valid\n#\n# Flow Analysis:\n#   Max depth: 5 iterations\n#   Estimated tokens\u002Frun: 2,400-4,800\n#   Potential infinite loop: No\n#\n# Recommendations:\n#   1. Add allowed_paths to file_reader for security\n#   2. Consider adding early exit condition for simple queries\n\n# Visualize agent workflow (ASCII)\npython scripts\u002Fagent_orchestrator.py agent.yaml --visualize\n\n# Output:\n# ┌─────────────────────────────────────────┐\n# │            research_assistant           │\n# │              (ReAct Pattern)            │\n# └─────────────────┬───────────────────────┘\n#                   │\n#          ┌────────▼────────┐\n#          │   User Query    │\n#          └────────┬────────┘\n#                   │\n#          ┌────────▼────────┐\n#          │     Think       │◄──────┐\n#          └────────┬────────┘       │\n#                   │                │\n#          ┌────────▼────────┐       │\n#          │   Select Tool   │       │\n#          └────────┬────────┘       │\n#                   │                │\n#     ┌─────────────┼─────────────┐  │\n#     ▼             ▼             ▼  │\n# [web_search] [calculator] [file_reader]\n#     │             │             │  │\n#     └─────────────┼─────────────┘  │\n#                   │                │\n#          ┌────────▼────────┐       │\n#          │    Observe      │───────┘\n#          └────────┬────────┘\n#                   │\n#          ┌────────▼────────┐\n#          │  Final Answer   │\n#          └─────────────────┘\n\n# Export workflow as Mermaid diagram\npython scripts\u002Fagent_orchestrator.py agent.yaml --visualize --format mermaid\n```\n\n---\n\n## Prompt Engineering Workflows\n\n### Prompt Optimization Workflow\n\nUse when improving an existing prompt's performance or reducing token costs.\n\n**Step 1: Baseline current prompt**\n```bash\npython scripts\u002Fprompt_optimizer.py current_prompt.txt --analyze --output baseline.json\n```\n\n**Step 2: Identify issues**\nReview the analysis report for:\n- Token waste (redundant instructions, verbose examples)\n- Ambiguous instructions (unclear output format, vague verbs)\n- Missing constraints (no length limits, no format specification)\n\n**Step 3: Apply optimization patterns**\n| Issue | Pattern to Apply |\n|-------|------------------|\n| Ambiguous output | Add explicit format specification |\n| Too verbose | Extract to few-shot examples |\n| Inconsistent results | Add role\u002Fpersona framing |\n| Missing edge cases | Add constraint boundaries |\n\n**Step 4: Generate optimized version**\n```bash\npython scripts\u002Fprompt_optimizer.py current_prompt.txt --optimize --output optimized.txt\n```\n\n**Step 5: Compare results**\n```bash\npython scripts\u002Fprompt_optimizer.py optimized.txt --analyze --compare baseline.json\n# Shows: token reduction, clarity improvement, issues resolved\n```\n\n**Step 6: Validate with test cases**\nRun both prompts against your evaluation set and compare outputs.\n\n---\n\n### Few-Shot Example Design Workflow\n\nUse when creating examples for in-context learning.\n\n**Step 1: Define the task clearly**\n```\nTask: Extract product entities from customer reviews\nInput: Review text\nOutput: JSON with {product_name, sentiment, features_mentioned}\n```\n\n**Step 2: Select diverse examples (3-5 recommended)**\n| Example Type | Purpose |\n|--------------|---------|\n| Simple case | Shows basic pattern |\n| Edge case | Handles ambiguity |\n| Complex case | Multiple entities |\n| Negative case | What NOT to extract |\n\n**Step 3: Format consistently**\n```\nExample 1:\nInput: \"Love my new iPhone 15, the camera is amazing!\"\nOutput: {\"product_name\": \"iPhone 15\", \"sentiment\": \"positive\", \"features_mentioned\": [\"camera\"]}\n\nExample 2:\nInput: \"The laptop was okay but battery life is terrible.\"\nOutput: {\"product_name\": \"laptop\", \"sentiment\": \"mixed\", \"features_mentioned\": [\"battery life\"]}\n```\n\n**Step 4: Validate example quality**\n```bash\npython scripts\u002Fprompt_optimizer.py prompt_with_examples.txt --validate-examples\n# Checks: consistency, coverage, format alignment\n```\n\n**Step 5: Test with held-out cases**\nEnsure model generalizes beyond your examples.\n\n---\n\n### Structured Output Design Workflow\n\nUse when you need reliable JSON\u002FXML\u002Fstructured responses.\n\n**Step 1: Define schema**\n```json\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"summary\": {\"type\": \"string\", \"maxLength\": 200},\n    \"sentiment\": {\"enum\": [\"positive\", \"negative\", \"neutral\"]},\n    \"confidence\": {\"type\": \"number\", \"minimum\": 0, \"maximum\": 1}\n  },\n  \"required\": [\"summary\", \"sentiment\"]\n}\n```\n\n**Step 2: Include schema in prompt**\n```\nRespond with JSON matching this schema:\n- summary (string, max 200 chars): Brief summary of the content\n- sentiment (enum): One of \"positive\", \"negative\", \"neutral\"\n- confidence (number 0-1): Your confidence in the sentiment\n```\n\n**Step 3: Add format enforcement**\n```\nIMPORTANT: Respond ONLY with valid JSON. No markdown, no explanation.\nStart your response with { and end with }\n```\n\n**Step 4: Validate outputs**\n```bash\npython scripts\u002Fprompt_optimizer.py structured_prompt.txt --validate-schema schema.json\n```\n\n---\n\n## Reference Documentation\n\n| File | Contains | Load when user asks about |\n|------|----------|---------------------------|\n| `references\u002Fprompt_engineering_patterns.md` | 10 prompt patterns with input\u002Foutput examples | \"which pattern?\", \"few-shot\", \"chain-of-thought\", \"role prompting\" |\n| `references\u002Fllm_evaluation_frameworks.md` | Evaluation metrics, scoring methods, A\u002FB testing | \"how to evaluate?\", \"measure quality\", \"compare prompts\" |\n| `references\u002Fagentic_system_design.md` | Agent architectures (ReAct, Plan-Execute, Tool Use) | \"build agent\", \"tool calling\", \"multi-agent\" |\n\n---\n\n## Common Patterns Quick Reference\n\n| Pattern | When to Use | Example |\n|---------|-------------|---------|\n| **Zero-shot** | Simple, well-defined tasks | \"Classify this email as spam or not spam\" |\n| **Few-shot** | Complex tasks, consistent format needed | Provide 3-5 examples before the task |\n| **Chain-of-Thought** | Reasoning, math, multi-step logic | \"Think step by step...\" |\n| **Role Prompting** | Expertise needed, specific perspective | \"You are an expert tax accountant...\" |\n| **Structured Output** | Need parseable JSON\u002FXML | Include schema + format enforcement |\n\n---\n\n## Common Commands\n\n```bash\n# Prompt Analysis\npython scripts\u002Fprompt_optimizer.py prompt.txt --analyze          # Full analysis\npython scripts\u002Fprompt_optimizer.py prompt.txt --tokens           # Token count only\npython scripts\u002Fprompt_optimizer.py prompt.txt --optimize         # Generate optimized version\n\n# RAG Evaluation\npython scripts\u002Frag_evaluator.py --contexts ctx.json --questions q.json  # Evaluate\npython scripts\u002Frag_evaluator.py --contexts ctx.json --compare baseline  # Compare to baseline\n\n# Agent Development\npython scripts\u002Fagent_orchestrator.py agent.yaml --validate       # Validate config\npython scripts\u002Fagent_orchestrator.py agent.yaml --visualize      # Show workflow\npython scripts\u002Fagent_orchestrator.py agent.yaml --estimate-cost  # Token estimation\n```\n",{"name":5,"description":7},"main","0b48cbb0e6d5be6ff68c0f6b28bc0c65ee21c4a1","engineering-team\u002Fsenior-prompt-engineer",2,"https:\u002F\u002Fgithub.com\u002Fafaizalam2003\u002FMaster-claude-skill","https:\u002F\u002Fgithub.com\u002Fafaizalam2003","https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fmdfaizalam2003\u002F","2026-04-01 04:35:43",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add afaizalam2003\u002FMaster-claude-skill --skill senior-prompt-engineer",{"tool":71,"command":72},"bunx","bunx skills add afaizalam2003\u002FMaster-claude-skill --skill senior-prompt-engineer",{"tool":74,"command":75},"pnpm","pnpm dlx skills add afaizalam2003\u002FMaster-claude-skill --skill senior-prompt-engineer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fafaizalam2003\u002FMaster-claude-skill\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-prompt-engineer\u002FSKILL.md",true,[79,85,89,93,99,103],{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fagentic_system_design.md","REFERENCE","参考文档",21700,"https:\u002F\u002Fgithub.com\u002Fafaizalam2003\u002FMaster-claude-skill\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-prompt-engineer\u002Freferences\u002Fagentic_system_design.md",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fllm_evaluation_frameworks.md",13303,"https:\u002F\u002Fgithub.com\u002Fafaizalam2003\u002FMaster-claude-skill\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-prompt-engineer\u002Freferences\u002Fllm_evaluation_frameworks.md",{"path":90,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fprompt_engineering_patterns.md",13636,"https:\u002F\u002Fgithub.com\u002Fafaizalam2003\u002FMaster-claude-skill\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-prompt-engineer\u002Freferences\u002Fprompt_engineering_patterns.md",{"path":94,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":97,"sourceHtmlUrl":98},"scripts\u002Fagent_orchestrator.py","SCRIPT","脚本",20488,"https:\u002F\u002Fgithub.com\u002Fafaizalam2003\u002FMaster-claude-skill\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-prompt-engineer\u002Fscripts\u002Fagent_orchestrator.py",{"path":100,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":101,"sourceHtmlUrl":102},"scripts\u002Fprompt_optimizer.py",17862,"https:\u002F\u002Fgithub.com\u002Fafaizalam2003\u002FMaster-claude-skill\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-prompt-engineer\u002Fscripts\u002Fprompt_optimizer.py",{"path":104,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":105,"sourceHtmlUrl":106},"scripts\u002Frag_evaluator.py",20362,"https:\u002F\u002Fgithub.com\u002Fafaizalam2003\u002FMaster-claude-skill\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-prompt-engineer\u002Fscripts\u002Frag_evaluator.py",[108,138,162,187,211,231],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":117,"publishedAt":52},"01M6KC4E8MYR9DBAZTAXHKYMMH","soc2-compliance","Use when the user asks to prepare for SOC 2 audits, map Trust Service Criteria, build control matrices, collect audit evidence, perform gap analysis, or assess SOC 2 Type I vs Type II readiness.","https:\u002F\u002Fgithub.com\u002Fafaizalam2003\u002FMaster-claude-skill\u002Fblob\u002Fmain\u002Fra-qm-team\u002Fsoc2-compliance\u002FSKILL.md",[114],{"categoryNo":115,"categoryName":116,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000037","律师与法务",[118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137],"compliance","soc2","soc2 compliance","audit evidence","audit","collect","soc","analysis","use","evidence","trust","build","map","control","type","gap","readiness","gap analysis","assess","for",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":52},"01M6KC461R3GKGZ1TAYHVR1MW9","risk-management-specialist","Medical device risk management specialist implementing ISO 14971 throughout product lifecycle. Provides risk analysis, risk evaluation, risk control, and post-production information analysis. Use when user mentions risk management, ISO 14971, risk analysis, FMEA, fault tree analysis, hazard identification, risk control, risk matrix, benefit-risk analysis, residual risk, risk acceptability, or post-market risk.","https:\u002F\u002Fgithub.com\u002Fafaizalam2003\u002FMaster-claude-skill\u002Fblob\u002Fmain\u002Fra-qm-team\u002Frisk-management-specialist\u002FSKILL.md",[],[145,146,147,148,149,150,46,151,125,126,152,153,154,155,156,157,158,159,160,161],"risk","risk management specialist","management","risk management","risk evaluation","product","lifecycle","risk matrix","iso","medical","iso 14971","identification","information","post-production","tree","matrix","implementing",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":52},"01M6KC3HF5ZFSSP2NZF68PEPFB","regulatory-affairs-head","Senior Regulatory Affairs Manager for HealthTech and MedTech companies. Prepares FDA 510(k), De Novo, and PMA submission packages; analyzes regulatory pathways for new medical devices; drafts responses to FDA deficiency letters and Notified Body queries; develops CE marking technical documentation under EU MDR 2017\u002F745; coordinates multi-market approval strategies across FDA, EU, Health Canada, PMDA, and NMPA; and maintains regulatory intelligence on evolving standards. Use when users need to plan or execute FDA submissions, navigate 510(k) or PMA approval processes, achieve CE marking, prepare pre-submission meeting materials, write regulatory strategy documents, respond to agency queries, or manage compliance documentation for medical device market access.","https:\u002F\u002Fgithub.com\u002Fafaizalam2003\u002FMaster-claude-skill\u002Fblob\u002Fmain\u002Fra-qm-team\u002Fregulatory-affairs-head\u002FSKILL.md",[],[169,170,171,172,173,174,175,176,177,126,178,179,180,181,182,183,184,185,186,137],"regulatory affairs head","regulatory","head","documents","devices","health","plan","write","strategy","standards","queries","manage","strategies","de","users","respond","medical devices","manager",{"skillNo":188,"name":189,"nameZh":6,"description":190,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":191,"categories":192,"keywords":195,"publishedAt":52},"01M6KC34Z8M1559EY1CXYBJB1A","quality-manager-qms-iso13485","ISO 13485 Quality Management System implementation and maintenance for medical device organizations. Provides QMS design, documentation control, internal auditing, CAPA management, and certification support. Use when working with medical device quality systems, preparing for ISO 13485 audits, managing regulatory compliance documentation, setting up corrective actions, or building audit preparation programs. Useful for quality management, audit preparation, regulatory compliance, medical device documentation, and corrective action workflows.","https:\u002F\u002Fgithub.com\u002Fafaizalam2003\u002FMaster-claude-skill\u002Fblob\u002Fmain\u002Fra-qm-team\u002Fquality-manager-qms-iso13485\u002FSKILL.md",[193,194],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},[196,197,186,44,50,198,199,200,201,126,202,203,204,205,206,207,208,209,137,210],"quality manager qms iso13485","quality","validation","actions","certification","system","maintenance","document","systems","records","ISO 13485","organizations","corrective action","internal audit","preparation",{"skillNo":212,"name":213,"nameZh":6,"description":214,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":215,"categories":216,"keywords":218,"publishedAt":52},"01M6KC2FXHBHXYX2ZZ17Y3GDB4","quality-manager-qmr","Senior Quality Manager Responsible Person (QMR) for HealthTech and MedTech companies. Provides quality system governance, management review leadership, regulatory compliance oversight, and quality performance monitoring per ISO 13485 Clause 5.5.2.","https:\u002F\u002Fgithub.com\u002Fafaizalam2003\u002FMaster-claude-skill\u002Fblob\u002Fmain\u002Fra-qm-team\u002Fquality-manager-qmr\u002FSKILL.md",[217],{"categoryNo":115,"categoryName":116,"taxonomyType":29,"taxonomyTypeDesc":30},[219,197,186,220,221,222,223,224,118,225,201,226,170,227,228,229,153,206,137,230],"quality manager qmr","review","policy","performance","governance","monitoring","regulatory compliance","oversight","cost","culture","leadership","person",{"skillNo":232,"name":233,"nameZh":6,"description":234,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":235,"categories":236,"keywords":242,"publishedAt":52},"01M6KC1VRR5JTDBNZANHPS6VR6","quality-documentation-manager","Document control system management for medical device QMS. Covers document numbering, version control, change management, and 21 CFR Part 11 compliance. Use for document control procedures, change control workflow, document numbering, version management, electronic signature compliance, or regulatory documentation review.","https:\u002F\u002Fgithub.com\u002Fafaizalam2003\u002FMaster-claude-skill\u002Fblob\u002Fmain\u002Fra-qm-team\u002Fquality-documentation-manager\u002FSKILL.md",[237,240,241],{"categoryNo":238,"categoryName":239,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":115,"categoryName":116,"taxonomyType":29,"taxonomyTypeDesc":30},[243,244,197,186,220,245,246,122,201,247,248,249,250,251,154,252,253,254,255,137],"documentation","quality documentation manager","workflow","change","change management","list","master","system management","documentation review","cfr","21 cfr part 11","change control","retention"]