prompt-engineering
Master the art and science of crafting effective prompts for large language models. Covers foundational patterns, advanced techniques like chain-of-thought and role prompting, structured output formats, and practical strategies for iterative refinement.
npx skills add cosmicstack-labs/mercury-agent-skills --skill prompt-engineering --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Prompt Engineering ## Core Principles ### 1. Clarity Over Cleverness A clear, direct prompt always outperforms a clever but ambiguous one. State exactly what you want, in what format, and with what constraints. Ambiguity is the enemy of consistent output. ### 2. Context is Everything Models have no inherent context beyond their training data. Every prompt must establish: - **Who** the model should be (role) - **What** the task is (instruction) - **How** to respond (format, tone, length) - **Why** the task matters (optional but helpful for complex tasks) ### 3. Iterate, Don't Expect Perfection First Time The first prompt is rarely the best. Prompt engineering is an iterative discipline. Each refinement teaches you something about how the model interprets your instructions. ### 4. Constrain to Liberate Paradoxically, more constraints (format, length constraints, guardrails) lead to better outputs. Open-ended prompts invite hallucination and inconsistency. ### 5. Test Systematically Change one variable at a time. Track what works. Build a personal library of prompt patterns that reliably produce good results. --- ## Prompt Engineering Scorecard | Level | Characteristics | Typical Ou
- Core Principles
- 1. Clarity Over Cleverness
- 2. Context is Everything
- 3. Iterate, Don't Expect Perfection First Time
- 4. Constrain to Liberate
- 5. Test Systematically
- Prompt Engineering Scorecard
- Self-Assessment Questions
- Chain-of-Thought (CoT) Prompting
- What It Is
- Why It Works
- Zero-Shot CoT
- Few-Shot CoT
- When to Use Chain-of-Thought
What does the prompt-engineering skill do?
Master the art and science of crafting effective prompts for large language models. Covers foundational patterns, advanced techniques like chain-of-thought and role prompting, structured output formats, and practical strategies for iterative refinement.
How do I install it?
Run `npx skills add cosmicstack-labs/mercury-agent-skills --skill prompt-engineering --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From cosmicstack-labs/mercury-agent-skills, a repository with 364 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.