prompt-engineering

Design LLM prompts using few-shot examples, chain-of-thought reasoning, and structured output formats.

1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill prompt-engineering-kalilurrahman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prompt-engineering
Source: https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts/tree/main/04-ai-ml/prompt-engineering
Command: npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill prompt-engineering-kalilurrahman

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openai, langchain.

What problem does it solve? Writing effective LLM prompts often devolves into trial-and-error guesswork, producing inconsistent outputs, poor accuracy on reasoning tasks, and unstructured responses that are hard to parse programmatically. ## Core Features & Use Cases - Systematic Prompt Techniques: Apply zero-shot, few-shot, chain-of-thought, self-consistency, and ReAct patterns matched to the task type. - Structured Output Design: Generate JSON and XML output formats with function calling schemas for reliable downstream parsing. - Evaluation & Iteration: Measure accuracy, consistency, and cost per request, then A/B test prompt variants to find the quality-cost balance. - Use Case: You need to classify thousands of support tickets. Use this Skill to build a few-shot classification prompt with 3-5 examples, structured output, and edge-case testing, achieving measurable accuracy before deployment. ## Quick Start Ask the AI to design a few-shot prompt with chain-of-thought reasoning and JSON output for your specific classification or extraction task.

Frequently Asked Questions about prompt-engineering

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

FAQPage Schema
How do I write a few-shot prompt for text classification?

Include 3-5 input-output example pairs covering diverse cases and edge cases before the target input. For sentiment classification, show labeled examples of positive, negative, and neutral reviews, then append the new review for the model to classify.

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 answering, improving accuracy on math and logic tasks. Use it for multi-step reasoning problems; self-consistency variants generate multiple reasoning paths and pick the most common answer.

How do I get structured JSON output from an LLM?

Specify the exact JSON schema in the prompt with field names and types, then show an example response. For production use, OpenAI function calling enforces structured outputs by defining parameter schemas the model must populate.

How do I measure prompt quality and cost?

Measure accuracy against labeled test cases, consistency by running the same prompt multiple times, and cost from input and output token counts. A/B test prompt variants on a test set to compare accuracy against per-request cost.

When should I use ReAct prompting instead of plain chain-of-thought?

Use ReAct when the task requires external tools like search, calculators, or database lookups. It interleaves Thought, Action, and Observation steps so the model reasons about which tool to call and incorporates results into its answer.