forked from imbytecat/opencode-config
- 删除空的技能目录占位文件 - 添加Apache许可证文件以明确项目使用和分发的条款与条件。 - 添加输出模式参考文档,包含模板模式和示例模式,以确保技能生成一致且高质量的输出。 - 添加工作流模式文档,包含顺序执行和条件分支的流程指导。 - 创建新技能时自动生成包含模板文件和示例资源的完整目录结构 - 添加技能打包脚本以将技能文件夹打包为可分发的 .skill 文件,包含验证、输出路径配置和压缩功能。 - 添加快速验证技能文件的脚本,检查SKILL.md是否存在、frontmatter格式正确性、必需字段完整性及命名和描述的规范性。 - 创建技能的完整指南,涵盖技能设计原则、文件结构、内容组织、创建流程及最佳实践。
83 lines
1.8 KiB
Markdown
83 lines
1.8 KiB
Markdown
# Output Patterns
|
|
|
|
Use these patterns when skills need to produce consistent, high-quality output.
|
|
|
|
## Template Pattern
|
|
|
|
Provide templates for output format. Match the level of strictness to your needs.
|
|
|
|
**For strict requirements (like API responses or data formats):**
|
|
|
|
```markdown
|
|
## Report structure
|
|
|
|
ALWAYS use this exact template structure:
|
|
|
|
# [Analysis Title]
|
|
|
|
## Executive summary
|
|
[One-paragraph overview of key findings]
|
|
|
|
## Key findings
|
|
- Finding 1 with supporting data
|
|
- Finding 2 with supporting data
|
|
- Finding 3 with supporting data
|
|
|
|
## Recommendations
|
|
1. Specific actionable recommendation
|
|
2. Specific actionable recommendation
|
|
```
|
|
|
|
**For flexible guidance (when adaptation is useful):**
|
|
|
|
```markdown
|
|
## Report structure
|
|
|
|
Here is a sensible default format, but use your best judgment:
|
|
|
|
# [Analysis Title]
|
|
|
|
## Executive summary
|
|
[Overview]
|
|
|
|
## Key findings
|
|
[Adapt sections based on what you discover]
|
|
|
|
## Recommendations
|
|
[Tailor to the specific context]
|
|
|
|
Adjust sections as needed for the specific analysis type.
|
|
```
|
|
|
|
## Examples Pattern
|
|
|
|
For skills where output quality depends on seeing examples, provide input/output pairs:
|
|
|
|
```markdown
|
|
## Commit message format
|
|
|
|
Generate commit messages following these examples:
|
|
|
|
**Example 1:**
|
|
Input: Added user authentication with JWT tokens
|
|
Output:
|
|
```
|
|
feat(auth): implement JWT-based authentication
|
|
|
|
Add login endpoint and token validation middleware
|
|
```
|
|
|
|
**Example 2:**
|
|
Input: Fixed bug where dates displayed incorrectly in reports
|
|
Output:
|
|
```
|
|
fix(reports): correct date formatting in timezone conversion
|
|
|
|
Use UTC timestamps consistently across report generation
|
|
```
|
|
|
|
Follow this style: type(scope): brief description, then detailed explanation.
|
|
```
|
|
|
|
Examples help Claude understand the desired style and level of detail more clearly than descriptions alone.
|