prompt-library

精选高质量提示词集合,适用于多种场景。涵盖角色扮演提示、任务专用模板及提示优化技巧。适用于用户需要提示模板、角色扮演提示词,或可直接用于编程、写作、分析与创意任务的即用型提示范例。

查看详情
name:prompt-librarydescription:"Curated collection of high-quality prompts for various use cases. Includes role-based prompts, task-specific templates, and prompt refinement techniques. Use when user needs prompt templates, role-play prompts, or ready-to-use prompt examples for coding, writing, analysis, or creative tasks."

📝 Prompt Library

> A comprehensive collection of battle-tested prompts inspired by awesome-chatgpt-prompts and community best practices.

When to Use This Skill

Use this skill when the user:

  • Needs ready-to-use prompt templates

  • Wants role-based prompts (act as X)

  • Asks for prompt examples or inspiration

  • Needs task-specific prompt patterns

  • Wants to improve their prompting
  • Prompt Categories

    🎭 Role-Based Prompts

    Expert Developer

    Act as an expert software developer with 15+ years of experience. You specialize in clean code, SOLID principles, and pragmatic architecture. When reviewing code:
  • Identify bugs and potential issues

  • Suggest performance improvements

  • Recommend better patterns

  • Explain your reasoning clearly

  • Always prioritize readability and maintainability over cleverness.

    Code Reviewer

    Act as a senior code reviewer. Your role is to:
  • Check for bugs, edge cases, and error handling

  • Evaluate code structure and organization

  • Assess naming conventions and readability

  • Identify potential security issues

  • Suggest improvements with specific examples
  • Format your review as:
    🔴 Critical Issues (must fix)
    🟡 Suggestions (should consider)
    🟢 Praise (what's done well)

    Technical Writer

    Act as a technical documentation expert. Transform complex technical concepts into clear, accessible documentation. Follow these principles:
  • Use simple language, avoid jargon

  • Include practical examples

  • Structure with clear headings

  • Add code snippets where helpful

  • Consider the reader's experience level
  • System Architect

    Act as a senior system architect designing for scale. Consider:
  • Scalability (horizontal and vertical)

  • Reliability (fault tolerance, redundancy)

  • Maintainability (modularity, clear boundaries)

  • Performance (latency, throughput)

  • Cost efficiency
  • Provide architecture decisions with trade-off analysis.

    🛠️ Task-Specific Prompts

    Debug This Code

    Debug the following code. Your analysis should include:

  • Problem Identification: What exactly is failing?

  • Root Cause: Why is it failing?

  • Fix: Provide corrected code

  • Prevention: How to prevent similar bugs
  • Show your debugging thought process step by step.

    Explain Like I'm 5 (ELI5)

    Explain [CONCEPT] as if I'm 5 years old. Use:
  • Simple everyday analogies

  • No technical jargon

  • Short sentences

  • Relatable examples from daily life

  • A fun, engaging tone
  • Code Refactoring

    Refactor this code following these priorities:
  • Readability first

  • Remove duplication (DRY)

  • Single responsibility per function

  • Meaningful names

  • Add comments only where necessary
  • Show before/after with explanation of changes.

    Write Tests

    Write comprehensive tests for this code:
  • Happy path scenarios

  • Edge cases

  • Error conditions

  • Boundary values
  • Use [FRAMEWORK] testing conventions. Include:

  • Descriptive test names

  • Arrange-Act-Assert pattern

  • Mocking where appropriate
  • API Documentation

    Generate API documentation for this endpoint including:
  • Endpoint URL and method

  • Request parameters (path, query, body)

  • Request/response examples

  • Error codes and meanings

  • Authentication requirements

  • Rate limits if applicable
  • Format as OpenAPI/Swagger or Markdown.

    📊 Analysis Prompts

    Code Complexity Analysis

    Analyze the complexity of this codebase:

  • Cyclomatic Complexity: Identify complex functions

  • Coupling: Find tightly coupled components

  • Cohesion: Assess module cohesion

  • Dependencies: Map critical dependencies

  • Technical Debt: Highlight areas needing refactoring
  • Rate each area and provide actionable recommendations.

    Performance Analysis

    Analyze this code for performance issues:

  • Time Complexity: Big O analysis

  • Space Complexity: Memory usage patterns

  • I/O Bottlenecks: Database, network, disk

  • Algorithmic Issues: Inefficient patterns

  • Quick Wins: Easy optimizations
  • Prioritize findings by impact.

    Security Review

    Perform a security review of this code:

  • Input Validation: Check all inputs

  • Authentication/Authorization: Access control

  • Data Protection: Sensitive data handling

  • Injection Vulnerabilities: SQL, XSS, etc.

  • Dependencies: Known vulnerabilities
  • Classify issues by severity (Critical/High/Medium/Low).

    🎨 Creative Prompts

    Brainstorm Features

    Brainstorm features for [PRODUCT]:

    For each feature, provide:

  • Name and one-line description

  • User value proposition

  • Implementation complexity (Low/Med/High)

  • Dependencies on other features
  • Generate 10 ideas, then rank top 3 by impact/effort ratio.

    Name Generator

    Generate names for [PROJECT/FEATURE]:

    Provide 10 options in these categories:

  • Descriptive (what it does)

  • Evocative (how it feels)

  • Acronyms (memorable abbreviations)

  • Metaphorical (analogies)
  • For each, explain the reasoning and check domain availability patterns.

    🔄 Transformation Prompts

    Migrate Code

    Migrate this code from [SOURCE] to [TARGET]:

  • Identify equivalent constructs

  • Handle incompatible features

  • Preserve functionality exactly

  • Follow target language idioms

  • Add necessary dependencies
  • Show the migration step by step with explanations.

    Convert Format

    Convert this [SOURCE_FORMAT] to [TARGET_FORMAT]:

    Requirements:

  • Preserve all data

  • Use idiomatic target format

  • Handle edge cases

  • Validate the output

  • Provide sample verification
  • Prompt Engineering Techniques

    Chain of Thought (CoT)

    Let's solve this step by step:
  • First, I'll understand the problem

  • Then, I'll identify the key components

  • Next, I'll work through the logic

  • Finally, I'll verify the solution
  • [Your question here]

    Few-Shot Learning

    Here are some examples of the task:

    Example 1:
    Input: [example input 1]
    Output: [example output 1]

    Example 2:
    Input: [example input 2]
    Output: [example output 2]

    Now complete this:
    Input: [actual input]
    Output:

    Persona Pattern

    You are [PERSONA] with [TRAITS].
    Your communication style is [STYLE].
    You prioritize [VALUES].

    When responding:

  • [Behavior 1]

  • [Behavior 2]

  • [Behavior 3]
  • Structured Output

    Respond in the following JSON format:
    {
    "analysis": "your analysis here",
    "recommendations": ["rec1", "rec2"],
    "confidence": 0.0-1.0,
    "caveats": ["caveat1"]
    }

    Prompt Improvement Checklist

    When crafting prompts, ensure:

  • [ ] Clear objective: What exactly do you want?

  • [ ] Context provided: Background information included?

  • [ ] Format specified: How should output be structured?

  • [ ] Examples given: Are there reference examples?

  • [ ] Constraints defined: Any limitations or requirements?

  • [ ] Success criteria: How do you measure good output?
  • Resources

  • awesome-chatgpt-prompts

  • prompts.chat

  • Learn Prompting

  • > 💡 Tip: The best prompts are specific, provide context, and include examples of desired output.