Prompt Library

A collection of curated, optimized prompts for various LLM tasks.

Filter & Search
Code Refactoring
Coding
Refactor a piece of code to improve its readability, performance, and maintainability.
You are an expert programmer with years of experience in software architecture and design patterns. Refactor the following code to improve its readability, performance, and maintainability. Provide a brief explanation of the changes you made and why they are beneficial.

```{{language}}
{{code}}
```
Explain Code
Coding
Provide a detailed, step-by-step explanation of a complex piece of code.
Act as a senior software engineer mentoring a junior developer. Explain the following piece of code step-by-step. Focus on the logic, data flow, and the purpose of any complex algorithms or data structures. Use analogies if helpful.

```{{language}}
{{code}}
```
Generate Unit Tests
Coding
Create a comprehensive suite of unit tests for a given function or class.
You are a quality assurance engineer specializing in automated testing. Your task is to write a comprehensive suite of unit tests for the following code using the {{test_framework}} framework. Ensure you cover edge cases, happy paths, and error conditions.

```{{language}}
{{code}}
```
Debug Code
Coding
Analyze code to find bugs, explain the root cause, and provide a fix.
You are a debugging expert with a knack for finding even the most subtle bugs. Analyze the following code, identify the bug, explain the root cause in simple terms, and provide a corrected and optimized code snippet.

```{{language}}
{{code}}
```
Write API Documentation
Coding
Generate clear and comprehensive documentation for a given API endpoint.
You are a technical writer specializing in API documentation. Based on the following code for an API endpoint, generate clear and comprehensive documentation. Include sections for the endpoint's purpose, path, parameters (with types and descriptions), success response (with status code and example body), and error responses.

```{{language}}
{{code}}
```
Summarize Technical Article
Writing
Distill a long technical article or document into key bullet points.
You are a research assistant. Read the following article and summarize its key findings and main arguments into a concise list of 5-7 bullet points. Each bullet point should be a single, clear sentence.

Article:
"""
{{article_text}}
"""
Brainstorm Ideas
Writing
Generate a list of creative ideas for a given topic or problem.
Act as a creative strategist in a brainstorming session. Generate 10 innovative and diverse ideas for {{topic}}. For each idea, provide a one-sentence description and a potential first step to explore it further.
Change Writing Tone
Writing
Rewrite a piece of text to have a different tone (e.g., professional, casual, witty).
Rewrite the following text to have a more {{tone (e.g., professional, casual, enthusiastic, empathetic)}} tone, while preserving the core message. Provide only the rewritten text in your response.

Original Text:
"""
{{text_to_rewrite}}
"""
Generate Blog Post Ideas
Writing
Create engaging, SEO-friendly blog post titles and outlines for a given topic.
Act as a content strategist. Generate 5 blog post titles and brief outlines on the topic of {{topic}}. Focus on titles that are engaging, SEO-friendly, and target a specific audience.
Proofread and Edit
Writing
Correct grammatical errors, spelling mistakes, and awkward phrasing in a text.
Proofread the following text for any grammatical errors, spelling mistakes, and awkward phrasing. Provide a corrected version and a brief, bulleted summary of the most important changes you made.

Original Text:
"""
{{text_to_proofread}}
"""
Generate SQL Queries
Data
Write SQL queries based on a natural language description of the desired data.
You are an expert SQL database administrator. Given the following table schema, write a SQL query to retrieve {{natural_language_query}}. 

Schema:
{{table_schema}}

Provide only the SQL query in your response.
Explain Data Insights
Data
Analyze a dataset and provide a high-level summary of the key insights.
You are a data analyst presenting findings to a non-technical executive team. Based on the following dataset, identify and explain the top 3 most important insights. Focus on the business implications of each insight and avoid technical jargon.

Dataset (CSV format):
"""
{{csv_data}}
"""
Data Cleaning Suggestions
Data
Analyze a data sample and suggest steps for cleaning and preprocessing.
You are a data scientist tasked with cleaning a new dataset. Analyze this sample of the data and provide a list of potential data quality issues (e.g., missing values, outliers, incorrect data types). For each issue, suggest a specific step to clean or preprocess the data before analysis.

Data Sample:
"""
{{data_sample}}
"""
Generate Sample Data
Data
Create a specified number of sample data records based on a schema description.
Generate {{number_of_records}} sample records in JSON format based on the following schema. Ensure the data is varied and realistic.

Schema:
- id: UUID
- product_name: String
- price: Float (in USD)
- in_stock: Boolean
- category: String (one of 'Electronics', 'Books', 'Clothing')
Generate Regex Pattern
Productivity
Create a regular expression to match a specific pattern described in natural language.
You are a regular expression expert. Create a regex pattern that will {{description_of_pattern}}. Provide the pattern and a brief explanation of how it works.

Example string to match: "{{example_string}}"
Meeting Summarizer
Productivity
Summarize meeting transcripts into action items and key decisions.
You are a professional assistant. Read the following meeting transcript and summarize it into two sections: 'Key Decisions' and 'Action Items'. For each action item, specify who is responsible.

Transcript:
"""
{{meeting_transcript}}
"""
Email Triage
Productivity
Categorize a list of email subjects into predefined categories.
You are an email productivity assistant. Categorize the following list of email subjects into one of these categories: 'Urgent', 'Requires Action', 'Informational', or 'Spam'. Provide the category for each subject.

Email Subjects:
{{email_subjects_list}}
Generate Ad Copy
Marketing
Create compelling ad copy for a product or service.
Act as a senior copywriter. Write 3 distinct ad copy variations for a new product, '{{product_name}}', which {{product_description}}. Target an audience of {{target_audience}}. Each variation should have a headline (max 10 words) and a body (max 30 words).
Social Media Post Ideas
Marketing
Brainstorm engaging social media post ideas for a specific brand or topic.
You are a social media manager. Generate 5 engaging post ideas for {{brand_or_topic}} on the {{social_media_platform}} platform. For each idea, suggest a visual (e.g., image, video, poll) and a compelling caption.
Write a Press Release
Marketing
Draft a professional press release for a company announcement.
Draft a professional press release announcing that {{company_name}} has {{announcement_details (e.g., launched a new product, secured funding)}}. Include a headline, dateline, introduction, body paragraphs with quotes, a boilerplate about the company, and media contact information.
Elevator Pitch
Business
Condense a business idea into a concise and compelling elevator pitch.
You are a startup coach. Condense the following business idea into a compelling, 30-second elevator pitch.

Business Idea:
{{business_idea_description}}
SWOT Analysis
Business
Conduct a SWOT (Strengths, Weaknesses, Opportunities, Threats) analysis.
Conduct a SWOT analysis for a company that {{company_description}}. Present the output in four distinct sections: Strengths, Weaknesses, Opportunities, and Threats.
Lesson Plan Creator
Education
Generate a structured lesson plan for a specific educational topic.
You are an experienced educator. Create a 45-minute lesson plan for a {{grade_level}} class on the topic of {{topic}}. Include learning objectives, materials needed, an introductory activity, a main teaching activity, and an assessment to check for understanding.
Explain a Concept Simply
Education
Explain a complex topic as if you were talking to a 5-year-old.
Explain the concept of {{complex_topic (e.g., black holes, photosynthesis, cryptocurrency)}} as if you were talking to a 5-year-old. Use simple analogies and avoid technical terms.
Create a Quiz
Education
Generate a multiple-choice quiz on a given subject.
Create a 5-question multiple-choice quiz on the topic of {{topic}}. For each question, provide one correct answer and three plausible incorrect answers (distractors). Mark the correct answer.