prompt-engineering
Provides workflows to write, debug, and optimize prompts for LLMs, including few-shot example selection, chain-of-thought structuring, system prompt design, and template composition. Use when the user asks to write or improve a prompt, wants help with few-shot examples, chain-of-thought, system prompts, prompt templates, or asks how to get better results from an LLM.
What this skill does
# Prompt Engineering
## Overview
Use this skill to design prompt systems that are clear, testable, and reusable.
It covers prompt drafting, optimization, evaluation, and production-oriented
patterns for few-shot prompting, reasoning workflows, templates, and system
prompts.
Keep the main workflow in this file and load the targeted reference files only
for the pattern you are applying.
## When to Use
Use this skill when:
- A user asks to write, rewrite, or improve a prompt
- A prompt needs better structure, reliability, or output formatting
- Few-shot examples or reasoning scaffolds are needed
- A system prompt or reusable prompt template must be created
- An existing prompt needs measurable optimization and testing
Read the relevant files in `references/` when you need deeper guidance on a
specific pattern.
## Core Patterns
### 1. Few-Shot Learning
#### Example Selection Strategy
- Use `references/few-shot-patterns.md` for comprehensive selection frameworks
- Balance example count (3-5 optimal) with context window limitations
- Include edge cases and boundary conditions in example sets
- Prioritize diverse examples that cover problem space variations
- Order examples from simple to complex for progressive learning
#### Few-Shot Example (Sentiment Classification)
```
Classify the sentiment as Positive, Negative, or Neutral.
Text: "I love this product! It exceeded my expectations."
Sentiment: Positive
Reasoning: Enthusiastic language, positive adjectives, satisfaction
Text: "The app keeps crashing when I upload large files."
Sentiment: Negative
Reasoning: Complaint about functionality, frustration indicator
Text: "It arrived on time, as described."
Sentiment: Neutral
Reasoning: Factual statement, no strong emotion either way
Text: "{user_input}"
Sentiment:
Reasoning:
```
### 2. Chain-of-Thought Reasoning
#### Implementation Patterns
- Reference `references/cot-patterns.md` for detailed reasoning frameworks
- Use "Let's think step by step" for zero-shot CoT initiation
- Provide complete reasoning traces for few-shot CoT demonstrations
- Implement self-consistency by sampling multiple reasoning paths
- Include verification and validation steps in reasoning chains
#### CoT Template Structure
```
Let's approach this step-by-step:
Step 1: {break_down_the_problem}
Analysis: {detailed_reasoning}
Step 2: {identify_key_components}
Analysis: {component_analysis}
Step 3: {synthesize_solution}
Analysis: {solution_justification}
Final Answer: {conclusion_with_confidence}
```
### 3. Prompt Optimization
#### Optimization Process
- Use `references/optimization-frameworks.md` for comprehensive optimization strategies
- Measure baseline performance before optimization attempts
- Implement single-variable changes for accurate attribution
- Track metrics: accuracy, consistency, latency, token efficiency
- Use statistical significance testing for A/B validation
- Document optimization iterations and their impacts
Track these metrics: accuracy, consistency, token efficiency, robustness, safety. See `references/optimization-frameworks.md` for measurement utilities.
### 4. Template Systems
#### Template Design Principles
- Reference `references/template-systems.md` for modular template frameworks
- Use clear variable naming conventions (e.g., `{user_input}`, `{context}`)
- Implement conditional sections for different scenario handling
- Design role-based templates for specific use cases
- Create hierarchical template composition patterns
#### Template Structure Example
```
# System Context
You are a {role} with {expertise_level} expertise in {domain}.
# Task Context
{if background_information}
Background: {background_information}
{endif}
# Instructions
{task_instructions}
# Examples
{example_count}
# Output Format
{output_specification}
# Input
{user_query}
```
### 5. System Prompt Design
#### System Prompt Components
- Use `references/system-prompt-design.md` for detailed design guidelines
- Define clear role specification and expertise boundaries
- Establish output format requirements and structural constraints
- Include safety guidelines and content policy adherence
- Set context for background information and domain knowledge
#### System Prompt Framework
```
You are an expert {role} specializing in {domain} with {experience_level} of experience.
## Core Capabilities
- List specific capabilities and expertise areas
- Define scope of knowledge and limitations
## Behavioral Guidelines
- Specify interaction style and communication approach
- Define error handling and uncertainty protocols
- Establish quality standards and verification requirements
## Output Requirements
- Specify format expectations and structural requirements
- Define content inclusion and exclusion criteria
- Establish consistency and validation requirements
## Safety and Ethics
- Include content policy adherence
- Specify bias mitigation requirements
- Define harm prevention protocols
```
## Implementation Workflows
### Workflow 1: Create New Prompt from Requirements
1. **Analyze Requirements**
- Identify task complexity and reasoning requirements
- Determine target model capabilities and limitations
- Define success criteria and evaluation metrics
- Assess need for few-shot learning or CoT reasoning
2. **Select Pattern Strategy**
- Use few-shot learning for classification or transformation tasks
- Apply CoT for complex reasoning or multi-step problems
- Implement template systems for reusable prompt architecture
- Design system prompts for consistent behavior requirements
3. **Draft Initial Prompt**
- Structure prompt with clear sections and logical flow
- Include relevant examples or reasoning demonstrations
- Specify output format and quality requirements
- Incorporate safety guidelines and constraints
4. **Validate and Test**
- Test with at least 3 inputs: one happy path, one edge case, one adversarial
- Measure accuracy and token usage against defined success criteria
- Change one variable at a time, re-test, keep only what improves metrics
- Document optimization decisions and their rationale
### Workflow 2: Optimize Existing Prompt
1. **Performance Analysis**
- Measure current prompt performance metrics
- Identify failure modes and error patterns
- Analyze token efficiency and response latency
- Assess consistency across multiple runs
2. **Optimization Strategy**
- Apply systematic A/B testing with single-variable changes
- Use few-shot learning to improve task adherence
- Implement CoT reasoning for complex task components
- Refine template structure for better clarity
3. **Implementation and Testing**
- Re-run the same test cases from step 1 against the optimized prompt
- If accuracy < baseline, revert the change and try a different hypothesis
- If accuracy >= baseline but < 90%, return to step 2 with a new strategy
- Document the winning change and its measured impact
### Workflow 3: Scale Prompt Systems
1. **Modular Architecture Design**
- Decompose complex prompts into reusable components
- Create template inheritance hierarchies
- Implement dynamic example selection systems
- Build automated quality assurance frameworks
2. **Production Integration**
- Implement prompt versioning and rollback capabilities
- Create performance monitoring and alerting systems
- Build automated testing frameworks for prompt validation
- Establish update and deployment workflows
## Quality Gates
- Accuracy >90% on 10+ diverse test cases before shipping
- <5% variance across 3+ repeated runs
- All edge cases and adversarial inputs handled gracefully
- Output format matches spec on every test case
## Best Practices
- Optimize one variable at a time so results stay attributable
- Keep prompts explicit about task, context, constraints, and output format
- Prefer a small number of strong examples over many repetitive ones
- Test prompts against happy-pathRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.