Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/ancoleman/ai-design-components/prompt-engineeringnpx skills add ancoleman/ai-design-components --skill prompt-engineeringgit clone --depth 1 https://github.com/ancoleman/ai-design-componentsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ancoleman/ai-design-components/prompt-engineering)<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/prompt-engineering"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/prompt-engineering.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00073 | $0.04898 |
| Opus 5 | $0.00036 | $0.02449 |
| Sonnet 5 | $0.00015 | $0.00980 |
| Haiku 4.5 | $0.00007 | $0.00490 |
Grade B, and why
prompt-engineering scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Instruction-override phrasingmediumPrompt injection
Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.
"ignore previous instructions", Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 689 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Prompt Engineering
Design and optimize prompts for large language models (LLMs) to achieve reliable, high-quality outputs across diverse tasks.
Purpose
This skill provides systematic techniques for crafting prompts that consistently elicit desired behaviors from LLMs. Rather than trial-and-error prompt iteration, apply proven patterns (zero-shot, few-shot, chain-of-thought, structured outputs) to improve accuracy, reduce costs, and build production-ready LLM applications. Covers multi-model deployment (OpenAI GPT, Anthropic Claude, Google Gemini, open-source models) with Python and TypeScript examples.
When to Use This Skill
Trigger this skill when:
- Building LLM-powered applications requiring consistent outputs
- Model outputs are unreliable, inconsistent, or hallucinating
- Need structured data (JSON) from natural language inputs
- Implementing multi-step reasoning tasks (math, logic, analysis)
- Creating AI agents that use tools and external APIs
- Optimizing prompt costs or latency in production systems
- Migrating prompts across different model providers
- Establishing prompt versioning and testing workflows
Common requests:
- "How do I make Claude/GPT follow instructions reliably?"
- "My JSON parsing keeps failing - how to get valid outputs?"
- "Need to build a RAG system for question-answering"
- "How to reduce hallucination in model responses?"
- "What's the best way to implement multi-step workflows?"
Quick Start
Zero-Shot Prompt (Python + OpenAI):
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="gpt-4",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Summarize this article in 3 sentences: [text]"}
],
temperature=0 # Deterministic output
)
print(response.choices[0].message.content)
Structured Output (TypeScript + Vercel AI SDK):
import { generateObject } from 'ai';
import { openai } from '@ai-sdk/openai';
import { z } from 'zod';
const schema = z.object({
name: z.string(),
sentiment: z.enum(['positive', 'negative', 'neutral']),
});
const { object } = await generateObject({
model: openai('gpt-4'),
schema,
prompt: 'Extract sentiment from: "This product is amazing!"',
});
What ships with it
14 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- examples/anthropic-examples.py 16 KB runs code
- examples/langchain-examples.py 16 KB runs code
- examples/openai-examples.py 19 KB runs code
- examples/rag-complete-example.py 19 KB runs code
- examples/vercel-ai-examples.ts 15 KB runs code
- outputs.yaml 8.3 KB
- references/chain-of-thought.md 13 KB
- references/few-shot-learning.md 11 KB
- references/multi-model-portability.md 25 KB
- references/prompt-chaining.md 25 KB
- references/rag-patterns.md 20 KB
- references/structured-outputs.md 10 KB
- references/tool-use-guide.md 11 KB
- references/zero-shot-patterns.md 11 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 689 lines · 73 tokens per session scan B 335967676ffe
prompt-engineering is a skill published in the GitHub repository ancoleman/ai-design-components (518 stars, last pushed 8mo ago), licensed MIT. It adds 73 tokens to every session and 4,898 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (instruction-override phrasing). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
ai-feedback-loops
Design feedback mechanisms that help AI systems learn from users - thumbs up/down, preference ranking, corrections, and human-in-the-loop escalation. Use when: RLHF UX, user feedback for AI, thumbs up down design, AI correction flow, human in the loop, feedback signal design, AI improvement loops.
ai-prompt-ux
Design the input experience for AI products - how users craft, structure, and refine their instructions to AI systems. Use when: prompt interface, AI input design, prompt templates, prompt suggestions, context window UX, instruction design, AI input affordances, prompt engineering UX.
prompt-engineer
Writes, refactors, and evaluates prompts for LLMs — generating optimized prompt templates, structured output schemas, evaluation rubrics, and test suites. Use when designing prompts for new LLM applications, refactoring existing prompts for better accuracy or token efficiency, implementing chain-of-thought or few-shot…
prompt-master
Generates optimized prompts for AI tools. Activates only when the user explicitly asks to write, fix, improve, or adapt a prompt for a specific AI tool (LLM, Cursor, Midjourney, image AI, video AI, coding agents, etc.). Does not activate for general conversation, coding tasks, document writing, or other…
ai-workflow-architect
Designs AI systems, automations, and agent workflows for a business — identifying which manual work is worth automating, how to structure the system, which tools fit, and what could go wrong. Use this to automate part of an operation, design an agent or MCP workflow, reduce repetitive manual work, connect tools into a…
few-shot-examples
Curated few-shot examples for construction AI tasks: classification, extraction, analysis. Domain-specific examples for improved LLM performance.