# AI Prompt Engineering

> Practical knowledge for writing, organizing, and defending prompts for foundation models. Covers in-context learning (zero-shot, few-shot), system vs user prompts, context efficiency, prompting best practices (clear instructions, examples, decomposition, chain-of-thought), prompt versioning, and defensive prompt engineering against jailbreaks and prompt injection attacks. Use this skill when: - Writing or improving prompts for an LLM application - Setting up prompt templates and versioning - Breaking down a complex task into prompts - Defending against prompt injection or jailbreaking - Designing system prompts and context structures - Evaluating prompt engineering tools

- Skill: `ebarti/ai-prompt-engineering` (Agent Skill, multi-file: 16 files)
- Install (CLI): `npx skillmds@latest add ebarti/ai-prompt-engineering`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ebarti/ai-prompt-engineering/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: ebarti (https://skillmd.com/u/ebarti)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/ebarti/ai-prompt-engineering

---


# AI Prompt Engineering

Knowledge from "AI Engineering" by Chip Huyen (Chapter 5). Focused on practical prompting techniques and defensive strategies.

## Quick Start

1. Check `guidelines.md` to find which files to load for your task
2. Load only relevant files (each topic has knowledge.md, rules.md, examples.md)
3. Apply guidance to your work

## Contents

### References

| Category | Purpose |
|----------|---------|
| `prompting-fundamentals` | In-context learning, zero/few-shot, system vs user prompts, context length |
| `prompting-best-practices` | Clear instructions, examples, task decomposition, chain-of-thought, iteration, versioning |
| `defensive-prompting` | Jailbreaking, prompt injection (direct/indirect), information extraction, defenses |

### Workflows

| Task | Workflow |
|------|----------|
| Write a new prompt with best practices | `workflows/build-prompt.md` |
| Audit a prompt for security vulnerabilities | `workflows/audit-prompt-security.md` |

## Guidelines

See `guidelines.md` for task-based file selection.

