Skip to content
Back to skills

Prompt Engineering Patterns

ASecurity

Master prompt engineering strategies including chain-of-thought, few-shot demonstration calibration, strict JSON schema output constraints, system prompt modularity, and context window optimization.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 2, 2026
ai-agentsrust

Security analysis

A100/100

Scanned October 2, 2026

npx -y skills add Gastonchevarria/god-mode --skill prompt-engineering-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Prompt Engineering Patterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Prompt Engineering Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gastonchevarria-prompt-engineering-patterns/badge)](https://www.skillsdirectory.com/skills/gastonchevarria-prompt-engineering-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: prompt-engineering-patterns
description: Master prompt engineering strategies including chain-of-thought, few-shot demonstration calibration, strict JSON schema output constraints, system prompt modularity, and context window optimization.
---

# Prompt Engineering Patterns

## Overview

Prompt engineering is the precision programming of foundation models. `prompt-engineering-patterns` provides systematic structures to eliminate hallucinations, enforce rigid JSON output formats, and minimize token overhead.

## Core Prompting Patterns

### 1. The Role-Context-Constraint-Format Structure
Structure prompts into 4 distinct semantic blocks:
```text
<role>
You are an expert financial analyst specializing in SaaS unit economics.
</role>

<context>
The user operates a B2B SaaS with $45k MRR and 120 paying accounts.
</context>

<instructions>
1. Calculate the ARPU and identify expansion revenue opportunities.
2. Highlight any metric exceeding standard churn benchmarks.
</instructions>

<constraints>
- Do NOT guess or hallucinate missing data; flag it explicitly.
- Output ONLY valid JSON matching the schema below.
</constraints>

<output_schema>
{ ... }
</output_schema>
```

### 2. Calibrated Few-Shot Demonstrations
- Provide 2-3 minimal, representative input/output pairs demonstrating the exact format, edge case handling, and tone desired.

### 3. XML Delimiters for Untrusted Content
- Wrap user-provided text or third-party web scrapes in `<untrusted_content>` tags to prevent prompt injection and instruction override attacks.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…