skill-standardization

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill Standardization

Skill 标准化

When to use this skill

何时使用此Skill

  • Creating new SKILL.md files following the standard template
  • Converting existing skills with non-standard section headings
  • Validating skill files against the project specification
  • Batch processing multiple skill files for consistency
  • Ensuring all skills have required sections (Examples, Best practices, References)
  • 按照标准模板创建新的SKILL.md文件
  • 将具有非标准章节标题的现有Skill转换为标准格式
  • 验证Skill文件是否符合项目规范
  • 批量处理多个Skill文件以确保一致性
  • 确保所有Skill包含必填章节(Examples、Best practices、References)

Instructions

操作步骤

Step 1: Run the conversion script

步骤1:运行转换脚本

Execute the main conversion script to standardize all SKILL.md files:
bash
cd /path/to/.agent-skills
python3 scripts/convert_skills.py
This script will:
  • Convert Korean section headings to English
  • Standardize frontmatter (add missing tags, platforms)
  • Add missing required sections with templates
执行主转换脚本以标准化所有SKILL.md文件:
bash
cd /path/to/.agent-skills
python3 scripts/convert_skills.py
该脚本将:
  • 将韩文章节标题转换为英文
  • 标准化frontmatter:添加缺失的标签、平台信息
  • 为缺失的必填章节添加模板内容

Step 2: Remove duplicate sections

步骤2:移除重复章节

If files have duplicate sections after conversion:
bash
python3 scripts/remove_duplicates.py
如果转换后文件存在重复章节:
bash
python3 scripts/remove_duplicates.py

Step 3: Final cleanup

步骤3:最终清理

For any remaining non-standard headings:
bash
python3 scripts/final_cleanup.py
针对任何剩余的非标准标题:
bash
python3 scripts/final_cleanup.py

Available Scripts

可用脚本

ScriptPurpose
convert_skills.py
Main conversion script - handles section headings, frontmatter, missing sections
remove_duplicates.py
Removes duplicate Examples, Best practices, References sections
final_cleanup.py
Direct string replacement for remaining Korean headings
脚本用途
convert_skills.py
主转换脚本:处理章节标题、frontmatter、缺失章节
remove_duplicates.py
移除重复的Examples、Best practices、References章节
final_cleanup.py
对剩余的韩文标题进行直接字符串替换

Section Heading Conversions

章节标题转换对照表

KoreanEnglish
## 목적 (Purpose)
## Purpose
## 사용 시점 (When to Use)
## When to use this skill
## 작업 절차 (Procedure)
## Instructions
## 작업 예시 (Examples)
## Examples
## 베스트 프랙티스
## Best practices
## 참고 자료
## References
## 출력 포맷 (Output Format)
## Output format
## 제약사항 (Constraints)
## Constraints
## 메타데이터
## Metadata
### N단계:
### Step N:
韩文英文
## 목적 (Purpose)
## Purpose
## 사용 시점 (When to Use)
## When to use this skill
## 작업 절차 (Procedure)
## Instructions
## 작업 예시 (Examples)
## Examples
## 베스트 프랙티스
## Best practices
## 참고 자료
## References
## 출력 포맷 (Output Format)
## Output format
## 제약사항 (Constraints)
## Constraints
## 메타데이터
## Metadata
### N단계:
### Step N:

Standard SKILL.md Structure

标准SKILL.md结构

markdown
---
name: skill-name
description: Clear description (max 1024 chars)
tags: [tag1, tag2]
platforms: [Claude, ChatGPT, Gemini]
---
markdown
---
name: skill-name
description: Clear description (max 1024 chars)
tags: [tag1, tag2]
platforms: [Claude, ChatGPT, Gemini]
---

Skill Title

Skill Title

When to use this skill

When to use this skill

  • Scenario 1
  • Scenario 2
  • Scenario 1
  • Scenario 2

Instructions

Instructions

Step 1: [Action]

Step 1: [Action]

Content...
Content...

Step 2: [Action]

Step 2: [Action]

Content...
Content...

Examples

Examples

Example 1: [Scenario]

Example 1: [Scenario]

Content...
Content...

Best practices

Best practices

  1. Practice 1
  2. Practice 2
  1. Practice 1
  2. Practice 2

References

References

  • Link
undefined
  • Link
undefined

Examples

示例

Example 1: Convert a single file manually

示例1:手动转换单个文件

python
from pathlib import Path
import re

filepath = Path('backend/new-skill/SKILL.md')
content = filepath.read_text()
python
from pathlib import Path
import re

filepath = Path('backend/new-skill/SKILL.md')
content = filepath.read_text()

Convert Korean to English

Convert Korean to English

content = content.replace('## 베스트 프랙티스', '## Best practices') content = content.replace('## 참고 자료', '## References') content = re.sub(r'### (\d+)단계:', r'### Step \1:', content)
filepath.write_text(content)
undefined
content = content.replace('## 베스트 프랙티스', '## Best practices') content = content.replace('## 참고 자료', '## References') content = re.sub(r'### (\d+)단계:', r'### Step \1:', content)
filepath.write_text(content)
undefined

Example 2: Validate a skill file

示例2:验证Skill文件

bash
undefined
bash
undefined

Check for required sections

Check for required sections

grep -E "^## (When to use|Instructions|Examples|Best practices|References)" SKILL.md
undefined
grep -E "^## (When to use|Instructions|Examples|Best practices|References)" SKILL.md
undefined

Best practices

最佳实践

  1. Run all three scripts in sequence for complete standardization
  2. Review changes before committing to ensure content wasn't lost
  3. Keep section content - only headings are converted, not content
  4. Test with one file first when making script modifications
  1. 按顺序运行所有三个脚本以完成完整的标准化
  2. 提交前检查更改,确保内容未丢失
  3. 保留章节内容:仅转换标题,不修改内容
  4. 修改脚本时先测试单个文件

References

参考资料