prompt-engineering

prompt-engineering is a skill for Claude Code from ancoleman/ai-design-components. It costs 73 tokens per session (4,898 once invoked), scanned B, original, MIT.

Methods for writing and testing instructions for large language models, which are systems that generate text or code. It covers examples, structured responses, multi-step reasoning, and prompt testing across model providers.

In plain words
What is it for?
Use it to build AI applications, retrieval systems, tool-using agents, reliable JSON outputs, and prompt versioning or tests.
Why use it?
It helps make model responses more consistent, reduces made-up answers, and manages prompt cost and response time.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ai-ml-skills plugin — 4 skills shipped together

Good fit Use it to build AI applications, retrieval systems, tool-using agents, reliable JSON outputs, and prompt versioning or tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ancoleman/ai-design-components/prompt-engineering
Install

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.

Any agent
npx skills add ancoleman/ai-design-components --skill prompt-engineering
Clone the repo
git clone --depth 1 https://github.com/ancoleman/ai-design-components

Made for: Claude Code.

Or install ai-ml-skills, the plugin that ships this one along with the rest of its 4 skills.

Wrote 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.

agentmods badge for prompt-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/ancoleman/ai-design-components/prompt-engineering/github.svg)](https://agentmods.dev/skills/ancoleman/ai-design-components/prompt-engineering)
Your own site
<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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prompt-engineering

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,898 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.04898
Opus 5.5 $0.00029 $0.01959
Sonnet 5.5 $0.00015 $0.00980
Haiku 4.5 $0.00007 $0.00490

Measured 1mo ago against content hash 335967676ffe, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo ago.

The scan reads SKILL.md. This mod also ships 5 executable files (examples/anthropic-examples.py, examples/langchain-examples.py, examples/openai-examples.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/prompt-engineering/SKILL.md · 689 lines

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!"',
});

Read the full file on GitHub · 689 lines

Changes

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.

  1. 1mo ago First seen · 689 lines · 73 tokens per session scan B 335967676ffe

Subscribe to this mod's changes

prompt-engineering is a skill published in the GitHub repository ancoleman/ai-design-components (524 stars, last pushed 10mo ago), licensed MIT. It adds 73 tokens to every session and 4,898 once invoked, about $0.0003 per session on Opus 5.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.

Related

Other skills, from other repositories

google-adk

Best practices for building AI agents with Google's Agent Development Kit (ADK) in Python, covering agent design, tools, sessions, memory, artifacts, evaluation, and deployment. Use when building LLM agents or multi-agent systems with ADK, defining ADK tools, wiring up sessions/state/memory, working with ADK…

Mindrally/skills · 90 tokens

anthropic-claude-development

Expert guidance for Anthropic Claude API development including Messages API, tool use, prompt engineering, and building production applications with Claude models.

Mindrally/skills · 33 tokens

langchain-development

Expert guidance for LangChain and LangGraph development with Python, covering chain composition, agents, memory, and RAG implementations.

Mindrally/skills · 29 tokens

openai-api-development

Expert guidance for OpenAI API development including GPT models, Assistants API, function calling, embeddings, and best practices for production applications.

Mindrally/skills · 32 tokens

ai-product

Every product will be AI-powered. The question is whether you'll build it right or ship a demo that falls apart in production.

lingxling/awesome-skills-cn · 28 tokens

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.

varunk130/ai-ux-skill-library · 66 tokens