prompt-engineering

Optimize prompts for LLMs and AI systems with structured techniques, evaluation patterns, and synthetic test data generation. Use when building AI features, improving agent performance, or crafting system prompts.

13 stars

Best use case

prompt-engineering is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Optimize prompts for LLMs and AI systems with structured techniques, evaluation patterns, and synthetic test data generation. Use when building AI features, improving agent performance, or crafting system prompts.

Teams using prompt-engineering should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/prompt-engineering/SKILL.md --create-dirs "https://raw.githubusercontent.com/NickCrew/Claude-Cortex/main/skills/prompt-engineering/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/prompt-engineering/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How prompt-engineering Compares

Feature / Agentprompt-engineeringStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Optimize prompts for LLMs and AI systems with structured techniques, evaluation patterns, and synthetic test data generation. Use when building AI features, improving agent performance, or crafting system prompts.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Prompt Engineering

Craft, test, and iterate prompts that deliver reliable outputs across LLMs. Covers prompt optimization techniques, structured prompt design, synthetic test data generation, and evaluation methodology.

## When to Use This Skill

- Building or optimizing prompts for AI-powered features
- Crafting system prompts for agents or assistants
- Improving reliability and consistency of LLM outputs
- Generating synthetic test data to validate prompt behavior
- Evaluating prompt performance across edge cases
- Designing prompt chains and pipelines

## Quick Reference

| Task | Load reference |
| --- | --- |
| Prompt techniques and patterns | `skills/prompt-engineering/references/techniques.md` |
| Synthetic test data generation | `skills/prompt-engineering/references/synthetic-data.md` |

## Workflow

1. **Research**: Gather the use case, constraints, and evaluation criteria. Audit existing prompts and model behaviors.
2. **Design**: Draft structured prompts with examples, constraints, and evaluation hooks. Plan experiments and measurement strategy.
3. **Generate test data**: Analyze prompt variables, generate diverse and realistic test cases to validate the prompt.
4. **Validate**: Run prompt trials, capture outputs, document adjustments. Iterate until quality thresholds are met.
5. **Deliver**: Hand off the final prompt with usage guidance and evaluation results.

## Core Principle

When creating prompts, always display the complete prompt text in a clearly marked section. Never describe a prompt without showing it. The prompt must be copyable and self-contained.

## Deliverables Checklist

For every prompt engineering task, produce:

- [ ] The complete prompt text (displayed in full, properly formatted)
- [ ] Explanation of design choices and techniques used
- [ ] Usage guidelines (model, temperature, parameters)
- [ ] Example expected outputs
- [ ] Test cases covering happy path, edge cases, and adversarial inputs

## Example Interactions

- "Optimize this system prompt for our code review agent"
- "Create a prompt for extracting structured data from support tickets"
- "Generate test cases to validate this classification prompt"
- "Design a prompt chain for multi-step document analysis"
- "Improve consistency of this summarization prompt"

Related Skills

writing-skills

13
from NickCrew/Claude-Cortex

Use when creating new skills, editing existing skills, or verifying skills work before deployment - applies TDD to process documentation by testing with subagents before writing, iterating until bulletproof against rationalization

workflow-security-audit

13
from NickCrew/Claude-Cortex

Comprehensive security assessment and remediation. Use for security reviews, compliance checks, vulnerability assessments.

workflow-performance

13
from NickCrew/Claude-Cortex

Systematic performance analysis and optimization. Use when things are slow, need optimization, or preparing for scale.

workflow-feature

13
from NickCrew/Claude-Cortex

Complete feature development workflow from design to deployment. Use when implementing new features or functionality.

workflow-feature-development

13
from NickCrew/Claude-Cortex

Complete workflow for developing new features from design to deployment. Use when starting a new feature, adding functionality, or building something new.

workflow-bug-fix

13
from NickCrew/Claude-Cortex

Systematic approach to identifying, fixing, and validating bug fixes. Use when fixing bugs, resolving issues, or addressing errors.

wiring-audit

13
from NickCrew/Claude-Cortex

User-triggered audit that finds wiring drift between a project's UI surfaces and backend capabilities — orphan surfaces (UI calls endpoints/hooks/procedures that no longer exist), unwired capabilities (backend routes/exports that nothing surfaces), shape drift (both exist but contracts mismatch), method drift (URL matches, HTTP verb does not), validation drift (frontend vs backend rules diverged), permission drift (UI exposes what backend forbids or vice versa), stale labels (UI text references renamed backend concepts), and unsurfaced configuration (env vars or flags that gate behavior with no UI or CLI to control them). This skill should be used when the user asks to "audit our wiring," "find UI/backend drift," "find unwired capabilities," "find stale surfaces," "check for contract violations," "find unused endpoints," "find unused hooks," "what mismatches between UI and backend," or any similar request whose deliverable is a prioritized findings report rather than a descriptive snapshot. Generic across UI frameworks but optimized for React applications (hooks, fetch, react-query, SWR, tRPC, server actions, react-router, Next.js). Not for descriptive architectural snapshots (use architectural-analysis), security audits (use security-auditor), or performance audits (use workflow-performance).

webapp-testing

13
from NickCrew/Claude-Cortex

Toolkit for interacting with and testing local web applications using Playwright. Use when verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

web-researcher

13
from NickCrew/Claude-Cortex

Use this skill when you need to research a topic online, gather information from multiple sources, or evaluate source credibility. Trigger phrases: 'research', 'find information about', 'look up', 'investigate'. Not for academic systematic reviews (use literature-reviewer) or fact-checking specific claims (use fact-checker).

visual-modes

13
from NickCrew/Claude-Cortex

Use when activating visual showcase modes (supersaiyan, kamehameha, over9000) for UI or interaction design - provides mode-specific enhancement checklists.

vibe-security

13
from NickCrew/Claude-Cortex

Comprehensive secure coding guide covering OWASP web vulnerabilities with prevention patterns and checklists. Use when writing or reviewing web application code to prevent XSS, CSRF, SSRF, SQL injection, access control flaws, and other common security vulnerabilities.

verification-before-completion

13
from NickCrew/Claude-Cortex

Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always