prompt-mastery

Designs and optimizes LLM prompts using structured templates, few-shot patterns, and quality checklists.

1|Updated Jul 20, 2026
One-click install
npx skills add https://github.com/gonzoblasco/ai-developer-stack --skill prompt-mastery-gonzoblasco
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prompt-mastery
Source: https://github.com/gonzoblasco/ai-developer-stack/tree/main/ai-agents/prompt-mastery
Command: npx skills add https://github.com/gonzoblasco/ai-developer-stack --skill prompt-mastery-gonzoblasco

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing prompts that LLMs reliably follow is hard: vague instructions produce inconsistent outputs, unstructured system prompts drift, and untested changes silently degrade quality. This Skill treats prompt engineering like software engineering, providing repeatable structure, patterns, and QA processes. ## Core Features & Use Cases - Structured Prompt Architecture: A standard system prompt pattern (Role → Context → Instructions → Constraints → Examples → Output Format) for consistent, maintainable prompts. - Advanced Techniques: Few-shot learning, chain-of-thought reasoning, progressive disclosure, and reusable template systems with concrete examples. - Ready-to-Use Prompt Library: Role-based prompts (Expert Developer, Code Reviewer, System Architect) and task templates for debugging, refactoring, testing, and security review. - Quality Assurance: Checklists covering anti-patterns (vague instructions, kitchen-sink prompts), prompt injection mitigation, and an iterative optimization workflow. - Use Case: You are building a support ticket classifier. Use the few-shot pattern from the techniques guide with 2-5 diverse input/output examples, then validate the final prompt against the improvement checklist before deploying it. ## Quick Start Ask the AI to design a structured system prompt for your task using the Role-Context-Instructions-Constraints-Examples-Output pattern and validate it against the prompt improvement checklist.

Frequently Asked Questions about prompt-mastery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a good system prompt for an LLM?

Structure your system prompt as Role, Context, Instructions, Constraints, Examples, and Output Format. Be specific instead of vague, include 2-5 demonstrations, and state explicit constraints about what not to do.

How to use few-shot prompting with examples?

Include 2-5 diverse input-output examples that demonstrate the desired behavior, covering edge cases with consistent formatting. More examples improve accuracy but increase token cost, so balance coverage against budget.

What is chain-of-thought prompting and when should I use it?

Chain-of-thought prompting asks the model to reason step by step before giving a final answer, improving accuracy on analytical tasks by 30-50%. Use it for debugging, root-cause analysis, and multi-step reasoning problems.

How do I prevent prompt injection in user inputs?

Isolate user data with delimiters such as triple quotes or XML tags so it cannot be confused with instructions. Sanitize and validate inputs, and treat injection as a high-severity issue in your prompt review checklist.

What are common prompt engineering mistakes to avoid?

Common anti-patterns include vague instructions like "make this better", kitchen-sink prompts that pile on unrelated rules, omitting negative constraints, and changing prompts without measuring impact. Start simple and add complexity only when testing shows it is needed.

When should I not use complex multi-shot prompts?

Avoid complex prompts when a simple direct instruction already works. Follow progressive disclosure: start with a direct request, then add constraints, reasoning steps, and examples only as testing reveals gaps.