prompt-engineering

Applies prompt engineering patterns to design, optimize, and debug LLM prompts.

Updated Aug 11, 2026
One-click install
npx skills add https://github.com/DucCuong159/Realtime-chatapp --skill prompt-engineering-duccuong159
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prompt-engineering
Source: https://github.com/DucCuong159/Realtime-chatapp/tree/main/.agent/skills/prompt-engineering
Command: npx skills add https://github.com/DucCuong159/Realtime-chatapp --skill prompt-engineering-duccuong159

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing effective LLM prompts is often trial-and-error, producing inconsistent outputs, wasted tokens, and unreliable agent behavior. This Skill provides structured prompt engineering patterns and optimization techniques to make prompts accurate, consistent, and controllable. ## Core Features & Use Cases - Few-Shot Learning & Chain-of-Thought: Teach models with input-output examples and step-by-step reasoning to improve accuracy on complex analytical tasks. - Prompt Optimization & Templates: Systematically iterate on prompts with A/B testing, and build reusable template systems with variables and conditional sections. - System Prompt Design: Define persistent roles, output formats, and safety constraints that hold across multi-turn conversations. - Use Case: Imagine your support-ticket classification agent returns inconsistent JSON. Use this Skill to restructure the prompt with few-shot examples, add an instruction hierarchy, and test edge cases until outputs are stable. ## Quick Start Use the prompt-engineering skill to rewrite my customer support classification prompt with few-shot examples and step-by-step reasoning.

Frequently Asked Questions about prompt-engineering

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

FAQPage Schema
How do I write better prompts for LLMs?

Start with a simple direct instruction, then add constraints, reasoning steps, and 2-5 input-output examples only as needed. Test on diverse inputs including edge cases, and iterate using A/B comparisons to measure accuracy and consistency.

What is few-shot prompting and when should I use it?

Few-shot prompting teaches the model by showing 2-5 input-output example pairs instead of explaining rules. Use it when you need consistent formatting, specific reasoning patterns, or edge-case handling, balancing example count against token cost.

How does chain-of-thought prompting improve accuracy?

Chain-of-thought prompting requests step-by-step reasoning before the final answer, either with a phrase like "Let's think step by step" or example reasoning traces. It improves accuracy on multi-step analytical and mathematical tasks by 30-50%.

What should go in a system prompt versus a user message?

System prompts should hold stable instructions: the model's role, expertise level, output format, and safety guidelines. User messages should carry variable per-turn content, which keeps behavior consistent and frees user-message tokens.

Why does my prompt give inconsistent results?

Inconsistency usually comes from vague instructions, missing output format constraints, or examples that don't match the target task. Add explicit constraints, include representative examples, and test on boundary inputs to stabilize outputs.

What are common prompt engineering mistakes to avoid?

Common pitfalls include over-engineering prompts before trying simple versions, exceeding token limits with excessive examples, leaving ambiguous instructions open to multiple interpretations, and never testing edge cases.