用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-prompt-engineering --skill prompt-templates命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | prompt-templates |
| description | Reusable prompt templates for common tasks and optimization patterns |
| sasmp_version | 1.3.0 |
| bonded_agent | 05-prompt-optimization-agent |
| bond_type | PRIMARY_BOND |
Bonded to: prompt-optimization-agent
Skill("custom-plugin-prompt-engineering:prompt-templates")
parameters:
template_category:
type: enum
values: [code, writing, analysis, extraction, generation]
required: true
customization_level:
type: enum
values: [minimal, standard, full]
default: standard
variables:
type: object
description: "Key-value pairs for template placeholders"
syntax:
variable: "{variable_name}"
optional: "{?optional_variable}"
conditional: "{#if condition}content{/if}"
list: "{#each items}{.}{/each}"
default: "{variable|default_value}"
example: |
You are a {role|software engineer}.
{#if context}Context: {context}{/if}
Task: {task}
# Code Review Template
You are a senior {language|software} engineer performing a code review.
## Review Focus
- Security vulnerabilities
- Performance issues
- Code quality and maintainability
- Best practice violations
## Code to Review
```{language}
{code}
For each issue found:
{#if context}
{context} {/if}
Provide a summary at the end with:
### 2. Technical Documentation Template
```markdown
# Documentation Generator Template
You are a technical writer creating documentation for {project_type}.
## Documentation Type
{doc_type|API reference}
## Source Material
{source}
## Output Format
Generate documentation following this structure:
### Overview
- Purpose and use cases
- Key concepts
### {#if is_api}API Reference
For each endpoint/function:
- Signature
- Parameters (name, type, description, required)
- Return value
- Example usage
- Error handling
{/if}
### Examples
- Basic usage
- Common patterns
- Edge cases
### Troubleshooting
- Common issues and solutions
# Bug Analysis Template
You are a debugging expert analyzing a software issue.
## Bug Report
{bug_description}
## Error Information
{#if error_message}
Error: {error_message}
{/if}
{#if stack_trace}
Stack Trace:
{stack_trace}
{/if}
## Relevant Code
```{language}
{code}
Provide:
### 4. Data Extraction Template
```markdown
# Data Extraction Template
You are a data extraction specialist.
## Task
Extract {data_type} from the following {source_type}.
## Source
{source}
## Extraction Schema
{schema}
## Rules
- Extract only explicitly stated information
- Use null for missing fields
- Maintain original formatting for text fields
- {#each additional_rules}{.}{/each}
## Output
Return valid JSON matching the schema above.
# Content Generation Template
You are a {content_role|content writer} creating {content_type}.
## Target Audience
{audience}
## Tone and Style
- Tone: {tone|professional}
- Style: {style|clear and concise}
- Length: {length|medium}
## Topic
{topic}
## Requirements
{#each requirements}
- {.}
{/each}
## Additional Instructions
{#if instructions}{instructions}{/if}
## Output
Generate the {content_type} following all requirements above.
template_lifecycle:
creation:
- Define variables and placeholders
- Set defaults for optional params
- Add validation rules
- Document usage
usage:
- Load template
- Validate variables
- Substitute placeholders
- Return final prompt
maintenance:
- Version templates
- Track usage metrics
- A/B test variants
- Deprecate outdated
optimization:
remove_redundancy:
before: "Please kindly ensure that you carefully..."
after: "Ensure you..."
use_lists:
before: "Check for security issues. Also check for performance. And check for quality."
after: |
Check for:
- Security issues
- Performance
- Quality
template_variables:
before: "You are a Python expert reviewing Python code for Python best practices"
after: "You are a {language} expert reviewing code for best practices"
validation_checklist:
structure:
- [ ] All variables are documented
- [ ] Defaults provided for optional vars
- [ ] Clear output format specified
quality:
- [ ] Tested with real data
- [ ] Edge cases handled
- [ ] Error messages helpful
maintenance:
- [ ] Version tracked
- [ ] Usage documented
- [ ] Examples provided
| Issue | Cause | Solution |
|---|---|---|
| Missing variable | Undeclared placeholder | Check variable names |
| Wrong output | Template mismatch | Verify output format |
| Too verbose | Redundant text | Optimize template |
| Inconsistent | Multiple variants | Standardize templates |
See references/GUIDE.md for template design patterns.
See assets/config.yaml for template configuration.