prompt-engineering

Solid

Use when writing or improving prompts for a language model. Covers instruction structure, examples, reasoning elicitation, output formatting, and systematically diagnosing why a prompt fails.

AI & Automation 23 stars 2 forks Updated today MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
46
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Prompt Engineering ## Purpose Write prompts that produce the right output reliably, and diagnose the ones that do not. Prompt engineering is an empirical discipline: the model's actual behavior, measured, beats any theory about what should work. ## When to Use - Writing a prompt for a production feature. - A prompt that works most of the time and fails unpredictably. - Reducing token cost or latency without losing quality. - Migrating a prompt between models. ## Capabilities - Instruction design: role, task, constraints, and output contract. - Few-shot examples, and selecting the ones that teach the boundary. - Reasoning elicitation for tasks that need it. - Output formatting and structured extraction. - Failure diagnosis and systematic iteration. ## Inputs - The task, and what a correct output looks like. - Real failure cases from the current prompt. - Constraints: latency, cost, and the model available. ## Outputs - A prompt with an explicit output contract. - An evaluation set of inputs with expected outputs. - A measured success rate, before and after. ## Workflow 1. **Define correct before writing the prompt** — Twenty real inputs and their correct outputs. Without this, "improving" a prompt is a matter of opinion and you will optimize for the last example you looked at. 2. **State the task, the constraints, and the output shape** — Be specific about what to do, what not to do, and exactly what format the answer takes. 3. **Add examples that teach the bound...

Details

Author
nimadorostkar
Repository
nimadorostkar/Claude-Skills-collection
Created
1 weeks ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category