AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

prompt-engineering-patterns

This skill should be used when the user asks to "optimize a prompt", "improve prompt performance", "design a prompt template", "write better prompts", "debug prompt issues", "use chain-of-thought", "structured prompting", "few-shot prompting", or wants to apply advanced prompt engineering patterns for production LLM applications.

Original source
wshobson
License
MIT
Pinned revision
7e2fb559cf4b824b27f1fec49fe88f7511066d26

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read wshobson--prompt-engineering-patterns at revision 7e2fb559cf4b824b27f1fec49fe88f7511066d26, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 8

assets/prompt-template-library.md

Prompt Template Library

Classification Templates

Sentiment Analysis

Classify the sentiment of the following text as Positive, Negative, or Neutral.

Text: {text}

Sentiment:

Intent Detection

Determine the user's intent from the following message.

Possible intents: {intent_list}

Message: {message}

Intent:

Topic Classification

Classify the following article into one of these categories: {categories}

Article:
{article}

Category:

Extraction Templates

Named Entity Recognition

Extract all named entities from the text and categorize them.

Text: {text}

Entities (JSON format):
{
  "persons": [],
  "organizations": [],
  "locations": [],
  "dates": []
}

Structured Data Extraction

Extract structured information from the job posting.

Job Posting:
{posting}

Extracted Information (JSON):
{
  "title": "",
  "company": "",
  "location": "",
  "salary_range": "",
  "requirements": [],
  "responsibilities": []
}

Generation Templates

Email Generation

Write a professional {email_type} email.

To: {recipient}
Context: {context}
Key points to include:
{key_points}

Email:
Subject:
Body:

Code Generation

Generate {language} code for the following task:

Task: {task_description}

Requirements:
{requirements}

Include:
- Error handling
- Input validation
- Inline comments

Code:

Creative Writing

Write a {length}-word {style} story about {topic}.

Include these elements:
- {element_1}
- {element_2}
- {element_3}

Story:

Transformation Templates

Summarization

Summarize the following text in {num_sentences} sentences.

Text:
{text}

Summary:

Translation with Context

Translate the following {source_lang} text to {target_lang}.

Context: {context}
Tone: {tone}

Text: {text}

Translation:

Format Conversion

Convert the following {source_format} to {target_format}.

Input:
{input_data}

Output ({target_format}):

Analysis Templates

Code Review

Review the following code for:
1. Bugs and errors
2. Performance issues
3. Security vulnerabilities
4. Best practice violations

Code:
{code}

Review:

SWOT Analysis

Conduct a SWOT analysis for: {subject}

Context: {context}

Analysis:
Strengths:
-

Weaknesses:
-

Opportunities:
-

Threats:
-

Question Answering Templates

RAG Template

Answer the question based on the provided context. If the context doesn't contain enough information, say so.

Context:
{context}

Question: {question}

Answer:

Multi-Turn Q&A

Previous conversation:
{conversation_history}

New question: {question}

Answer (continue naturally from conversation):

Specialized Templates

SQL Query Generation

Generate a SQL query for the following request.

Database schema:
{schema}

Request: {request}

SQL Query:

Regex Pattern Creation

Create a regex pattern to match: {requirement}

Test cases that should match:
{positive_examples}

Test cases that should NOT match:
{negative_examples}

Regex pattern:

API Documentation

Generate API documentation for this function:

Code:
{function_code}

Documentation (follow {doc_format} format):

Use these templates by filling in the {variables}