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

ebarti Updated

File contents

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.

ebarti/skills/tree/main/ai-prompt-engineering commit 917ba340b8

Frequently asked questions

npx skillmds@latest add ebarti/ai-prompt-engineering