Prompt Engineering Patterns

Design, structure, and version prompts sent to LLMs from application code — system prompts, few-shot templates, output contracts, XML-delimited RAG context, task decomposition, and prompt caching. Use when writing or refactoring prompts inside a Python/TS/other codebase (LangChain, LangGraph, OpenAI/Anthropic/Google SDKs, Bedrock, LlamaIndex, DSPy, Instructor), when structured outputs fail, when few-shot examples aren't landing, when a long RAG prompt drifts, or when the LLM bill is dominated by uncached prefix tokens. Framework-agnostic prompt engineering; not for Agent Skills bodies (skill-creator), agent system prompts (agents-claude-creator / opencode-agent-creator), or tool schemas (tool-schema-design).

AeonDave 1c74c8b 10.4 KB Updated

File contents

AeonDave/malskill/tree/main/knowledge/prompt-engineering-patterns commit 1c74c8b279

Frequently asked questions

npx skillmds@latest add aeondave/prompt-engineering-patterns