sharing-skills
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSharing Skills
分享Skill
Overview
概述
Contribute skills from your local branch back to the upstream repository.
Workflow: Branch → Edit/Create skill → Commit → Push → PR
将你本地分支中的Skill贡献回上游仓库。
工作流: 创建分支 → 编辑/创建Skill → 提交 → 推送 → 创建PR
When to Share
何时分享
Share when:
- Skill applies broadly (not project-specific)
- Pattern/technique others would benefit from
- Well-tested and documented
- Follows writing-skills guidelines
Keep personal when:
- Project-specific or organization-specific
- Experimental or unstable
- Contains sensitive information
- Too narrow/niche for general use
适合分享的场景:
- Skill具有广泛适用性(非项目专属)
- 其模式/技巧能为其他开发者带来帮助
- 已完成充分测试并配有文档
- 符合writing-skills的编写规范
适合保留为个人Skill的场景:
- 项目专属或组织专属
- 处于实验阶段或不稳定
- 包含敏感信息
- 适用范围过窄、过于小众
Prerequisites
前置条件
- CLI installed and authenticated
gh - Working directory is (your local clone)
~/.config/superpowers/skills/ - REQUIRED: Skill has been tested using writing-skills TDD process
- 已安装并完成认证的CLI
gh - 工作目录为(你的本地克隆仓库)
~/.config/superpowers/skills/ - 必填项: Skill已通过writing-skills的TDD流程完成测试
Sharing Workflow
分享流程
1. Ensure You're on Main and Synced
1. 确保处于主分支并同步上游代码
bash
cd ~/.config/superpowers/skills/
git checkout main
git pull upstream main
git push origin main # Push to your forkbash
cd ~/.config/superpowers/skills/
git checkout main
git pull upstream main
git push origin main # Push to your fork2. Create Feature Branch
2. 创建功能分支
bash
undefinedbash
undefinedBranch name: add-skillname-skill
Branch name: add-skillname-skill
skill_name="your-skill-name"
git checkout -b "add-${skill_name}-skill"
undefinedskill_name="your-skill-name"
git checkout -b "add-${skill_name}-skill"
undefined3. Create or Edit Skill
3. 创建或编辑Skill
bash
undefinedbash
undefinedWork on your skill in skills/
在skills/目录下处理你的Skill
Create new skill or edit existing one
创建新Skill或编辑现有Skill
Skill should be in skills/category/skill-name/SKILL.md
Skill应存放于skills/category/skill-name/SKILL.md路径下
undefinedundefined4. Commit Changes
4. 提交变更
bash
undefinedbash
undefinedAdd and commit
暂存并提交变更
git add skills/your-skill-name/
git commit -m "Add ${skill_name} skill
$(cat <<'EOF'
Brief description of what this skill does and why it's useful.
Tested with: [describe testing approach]
EOF
)"
undefinedgit add skills/your-skill-name/
git commit -m "Add ${skill_name} skill
$(cat <<'EOF'
Brief description of what this skill does and why it's useful.
Tested with: [describe testing approach]
EOF
)"
undefined5. Push to Your Fork
5. 推送到你的Fork仓库
bash
git push -u origin "add-${skill_name}-skill"bash
git push -u origin "add-${skill_name}-skill"6. Create Pull Request
6. 创建Pull Request
bash
undefinedbash
undefinedCreate PR to upstream using gh CLI
使用gh CLI向上游仓库创建PR
gh pr create
--repo upstream-org/upstream-repo
--title "Add ${skill_name} skill"
--body "$(cat <<'EOF'
--repo upstream-org/upstream-repo
--title "Add ${skill_name} skill"
--body "$(cat <<'EOF'
gh pr create
--repo upstream-org/upstream-repo
--title "Add ${skill_name} skill"
--body "$(cat <<'EOF'
--repo upstream-org/upstream-repo
--title "Add ${skill_name} skill"
--body "$(cat <<'EOF'
Summary
Summary
Brief description of the skill and what problem it solves.
Brief description of the skill and what problem it solves.
Testing
Testing
Describe how you tested this skill (pressure scenarios, baseline tests, etc.).
Describe how you tested this skill (pressure scenarios, baseline tests, etc.).
Context
Context
Any additional context about why this skill is needed and how it should be used.
EOF
)"
undefinedAny additional context about why this skill is needed and how it should be used.
EOF
)"
undefinedComplete Example
完整示例
Here's a complete example of sharing a skill called "async-patterns":
bash
undefined以下是分享名为"async-patterns"的Skill的完整示例:
bash
undefined1. Sync with upstream
1. 同步上游代码
cd ~/.config/superpowers/skills/
git checkout main
git pull upstream main
git push origin main
cd ~/.config/superpowers/skills/
git checkout main
git pull upstream main
git push origin main
2. Create branch
2. 创建分支
git checkout -b "add-async-patterns-skill"
git checkout -b "add-async-patterns-skill"
3. Create/edit the skill
3. 创建/编辑Skill
(Work on skills/async-patterns/SKILL.md)
(在skills/async-patterns/SKILL.md中进行操作)
4. Commit
4. 提交变更
git add skills/async-patterns/
git commit -m "Add async-patterns skill
Patterns for handling asynchronous operations in tests and application code.
Tested with: Multiple pressure scenarios testing agent compliance."
git add skills/async-patterns/
git commit -m "Add async-patterns skill
Patterns for handling asynchronous operations in tests and application code.
Tested with: Multiple pressure scenarios testing agent compliance."
5. Push
5. 推送到Fork仓库
git push -u origin "add-async-patterns-skill"
git push -u origin "add-async-patterns-skill"
6. Create PR
6. 创建PR
gh pr create
--repo upstream-org/upstream-repo
--title "Add async-patterns skill"
--body "## Summary Patterns for handling asynchronous operations correctly in tests and application code.
--repo upstream-org/upstream-repo
--title "Add async-patterns skill"
--body "## Summary Patterns for handling asynchronous operations correctly in tests and application code.
gh pr create
--repo upstream-org/upstream-repo
--title "Add async-patterns skill"
--body "## Summary Patterns for handling asynchronous operations correctly in tests and application code.
--repo upstream-org/upstream-repo
--title "Add async-patterns skill"
--body "## Summary Patterns for handling asynchronous operations correctly in tests and application code.
Testing
Testing
Tested with multiple application scenarios. Agents successfully apply patterns to new code.
Tested with multiple application scenarios. Agents successfully apply patterns to new code.
Context
Context
Addresses common async pitfalls like race conditions, improper error handling, and timing issues."
undefinedAddresses common async pitfalls like race conditions, improper error handling, and timing issues."
undefinedAfter PR is Merged
PR合并后的操作
Once your PR is merged:
- Sync your local main branch:
bash
cd ~/.config/superpowers/skills/
git checkout main
git pull upstream main
git push origin main- Delete the feature branch:
bash
git branch -d "add-${skill_name}-skill"
git push origin --delete "add-${skill_name}-skill"当你的PR被合并后:
- 同步本地主分支:
bash
cd ~/.config/superpowers/skills/
git checkout main
git pull upstream main
git push origin main- 删除功能分支:
bash
git branch -d "add-${skill_name}-skill"
git push origin --delete "add-${skill_name}-skill"Troubleshooting
故障排查
"gh: command not found"
- Install GitHub CLI: https://cli.github.com/
- Authenticate:
gh auth login
"Permission denied (publickey)"
- Check SSH keys:
gh auth status - Set up SSH: https://docs.github.com/en/authentication
"Skill already exists"
- You're creating a modified version
- Consider different skill name or coordinate with the skill's maintainer
PR merge conflicts
- Rebase on latest upstream:
git fetch upstream && git rebase upstream/main - Resolve conflicts
- Force push:
git push -f origin your-branch
"gh: command not found"
- 安装GitHub CLI:https://cli.github.com/
- 完成认证:
gh auth login
"Permission denied (publickey)"
- 检查SSH密钥:
gh auth status - 配置SSH:https://docs.github.com/en/authentication
"Skill already exists"
- 你正在创建一个修改版本
- 考虑使用不同的Skill名称,或与该Skill的维护者沟通协调
PR合并冲突
- 基于最新上游代码变基:
git fetch upstream && git rebase upstream/main - 解决冲突
- 强制推送:
git push -f origin your-branch
Multi-Skill Contributions
多Skill贡献注意事项
Do NOT batch multiple skills in one PR.
Each skill should:
- Have its own feature branch
- Have its own PR
- Be independently reviewable
Why? Individual skills can be reviewed, iterated, and merged independently.
请勿在单个PR中批量提交多个Skill。
每个Skill都应该:
- 拥有独立的功能分支
- 拥有独立的PR
- 可被独立评审
原因: 单个Skill能够被独立评审、迭代和合并。
Related Skills
相关技能
- writing-skills - REQUIRED: How to create well-tested skills before sharing
- writing-skills - 必填项:了解如何在分享前创建经过充分测试的Skill