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

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.

agentmods
npx agentmods add skills/ancoleman/ai-design-components/prompt-engineering
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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00036 $0.02449
Sonnet 5 $0.00015 $0.00980
Haiku 4.5 $0.00007 $0.00490

Measured 6d ago against content hash 335967676ffe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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. 6d 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 (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.

Related

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.

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

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.

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

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…

Jeffallan/claude-skills · 93 tokens

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…

nidhinjs/prompt-master · 78 tokens

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…

cbrock84/headcount · 89 tokens

few-shot-examples

Curated few-shot examples for construction AI tasks: classification, extraction, analysis. Domain-specific examples for improved LLM performance.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 30 tokens