prompting-patterns

Community

Engineer powerful LLM prompts, prevent errors.

Authorricardoroche
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides a structured approach to prompt engineering, addressing challenges like inconsistent LLM responses, prompt injection vulnerabilities, and context window limitations. It ensures your LLM applications are reliable, secure, and deliver high-quality outputs.

Core Features & Use Cases

  • Structured Prompt Templates: Guides on creating reusable prompt templates with system messages, variables, and few-shot examples using Pydantic.
  • Prompt Injection Prevention: Provides patterns for sanitizing user input and wrapping it with clear boundaries to mitigate injection risks.
  • Few-Shot & Chain-of-Thought: Explains how to use few-shot examples for complex tasks and chain-of-thought prompting for detailed reasoning.
  • Context Window Management: Offers strategies for truncating message history and managing context window limits for long conversations.
  • Prompt Version Control: Introduces patterns for versioning prompts and tracking their performance metrics.
  • Use Case: A developer is building an LLM-powered summarization tool. This skill helps them create a PromptTemplate with a clear system message, few-shot examples for better accuracy, and integrate PromptSanitizer to protect against malicious user inputs.

Quick Start

Create a structured prompt template for summarizing documents, including a system message and a few-shot example.

Dependency Matrix

Required Modules

pydantic

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: prompting-patterns
Download link: https://github.com/ricardoroche/ricardos-claude-code/archive/main.zip#prompting-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository