关于 prompt-library
prompt-library 是提供现成模板的技能,涵盖角色型、任务型、分析、创意和转换提示词,适合需要提示词示例或常见任务写法的人。
主要功能
- 01角色型提示词模板
- 02任务专用提示词模式
- 03分析与审查提示词
- 04创意与转换提示词
- 05提示词改进清单
适用场景
- 01撰写代码审查请求
- 02创建任务导向的提示词
- 03寻找分析内容的结构
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ sickn33/ agentic-awesome-skills --skill prompt-library安装后在 Claude Code 中输入/prompt-library确认已加载。
详细介绍
📝 提示词库
一个全面的实战验证提示词合集,灵感来自 awesome-chatgpt-prompts 和社区最佳实践。
何时使用此技能
当用户:
- 需要可直接使用的提示词模板
- 想要基于角色的提示词(扮演 X)
- 请求提示词示例或灵感
- 需要针对特定任务的提示词模式
- 想要改进自己的提示词
提示词类别
🎭 基于角色的提示词
专家开发者
Act as an expert software developer with 15+ years of experience. You specialize in clean code, SOLID principles, and pragmatic architecture. When reviewing code:
1. Identify bugs and potential issues
2. Suggest performance improvements
3. Recommend better patterns
4. Explain your reasoning clearly
Always prioritize readability and maintainability over cleverness.
代码审查员
Act as a senior code reviewer. Your role is to:
1. Check for bugs, edge cases, and error handling
2. Evaluate code structure and organization
3. Assess naming conventions and readability
4. Identify potential security issues
5. Suggest improvements with specific examples
Format your review as:
🔴 Critical Issues (must fix)
🟡 Suggestions (should consider)
🟢 Praise (what's done well)
技术文档撰写者
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
系统架构师
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.
🛠️ 特定任务提示词
调试此代码
Debug the following code. Your analysis should include:
1. **Problem Identification**: What exactly is failing?
2. **Root Cause**: Why is it failing?
3. **Fix**: Provide corrected code
4. **Prevention**: How to prevent similar bugs
Provide a concise explanation of the diagnosis, key evidence and verification steps.
像给 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
代码重构
Refactor this code following these priorities:
1. Readability first
2. Remove duplication (DRY)
3. Single responsibility per function
4. Meaningful names
5. Add comments only where necessary
Show before/after with explanation of changes.
编写测试
Write comprehensive tests for this code:
1. Happy path scenarios
2. Edge cases
3. Error conditions
4. Boundary values
Use [FRAMEWORK] testing conventions. Include:
- Descriptive test names
- Arrange-Act-Assert pattern
- Mocking where appropriate
API 文档
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.
📊 分析提示词
代码复杂度分析
Analyze the complexity of this codebase:
1. **Cyclomatic Complexity**: Identify complex functions
2. **Coupling**: Find tightly coupled components
3. **Cohesion**: Assess module cohesion
4. **Dependencies**: Map critical dependencies
5. **Technical Debt**: Highlight areas needing refactoring
Rate each area and provide actionable recommendations.
性能分析
Analyze this code for performance issues:
1. **Time Complexity**: Big O analysis
2. **Space Complexity**: Memory usage patterns
3. **I/O Bottlenecks**: Database, network, disk
4. **Algorithmic Issues**: Inefficient patterns
5. **Quick Wins**: Easy optimizations
Prioritize findings by impact.
安全审查
Perform a security review of this code:
1. **Input Validation**: Check all inputs
2. **Authentication/Authorization**: Access control
3. **Data Protection**: Sensitive data handling
4. **Injection Vulnerabilities**: SQL, XSS, etc.
5. **Dependencies**: Known vulnerabilities
Classify issues by severity (Critical/High/Medium/Low).
🎨 创意提示词
集思广益,构思功能
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.
名称生成器
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.
🔄 转换提示词
迁移代码
Migrate this code from [SOURCE] to [TARGET]:
1. Identify equivalent constructs
2. Handle incompatible features
3. Preserve functionality exactly
4. Follow target language idioms
5. Add necessary dependencies
Show the migration step by step with explanations.
转换格式
Convert this [SOURCE_FORMAT] to [TARGET_FORMAT]:
Requirements:
- Preserve all data
- Use idiomatic target format
- Handle edge cases
- Validate the output
- Provide sample verification
提示词工程技巧
思维链(CoT)
Let's solve this step by step:
1. First, I'll understand the problem
2. Then, I'll identify the key components
3. Next, I'll work through the logic
4. Finally, I'll verify the solution
[Your question here]
少样本学习
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:
人设模式
You are [PERSONA] with [TRAITS].
Your communication style is [STYLE].
You prioritize [VALUES].
When responding:
- [Behavior 1]
- [Behavior 2]
- [Behavior 3]
结构化输出
Respond in the following JSON format:
{
"analysis": "your analysis here",
"recommendations": ["rec1", "rec2"],
"confidence": 0.0-1.0,
"caveats": ["caveat1"]
}
提示词改进清单
编写提示词时,请确保:
- 目标明确:你具体想要什么?
- 提供背景:是否包含背景信息?
- 指定格式:输出应采用什么结构?
- 提供示例:是否有参考示例?
- 定义限制:是否有任何限制或要求?
- 成功标准:如何衡量输出是否良好?
资源
💡 提示:最好的提示词具体明确、提供背景信息,并包含期望输出的示例。
局限性
- 仅当任务明确符合上述范围时,才使用此技能。
- 不要将输出视为环境特定验证、测试或专家审查的替代品。
- 如果缺少必要的输入、权限、安全边界或成功标准,请暂停并请求澄清。
“15 年经验”等角色提示描述的是期望的视角,而非真实资历。不要声称拥有相关工作经历或认证,也不要声称已执行检查。请索要简洁的推理摘要或证据,而非隐藏的内部思维;占位引用、统计数据和置信度评分在核实前应标注为示例。
评论
支持 Markdown