一键导入
localize-skill-descriptions
记录本地化技能描述的正确工作流 — 使用 git skip-worktree 保护本地修改, 避免 git pull 覆盖。适用于任何通过 git 安装的 OpenCode/Claude Code 技能。 触发场景:翻译技能描述、自定义技能元数据、保护本地修改不被覆盖。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
记录本地化技能描述的正确工作流 — 使用 git skip-worktree 保护本地修改, 避免 git pull 覆盖。适用于任何通过 git 安装的 OpenCode/Claude Code 技能。 触发场景:翻译技能描述、自定义技能元数据、保护本地修改不被覆盖。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | localize-skill-descriptions |
| description | 记录本地化技能描述的正确工作流 — 使用 git skip-worktree 保护本地修改, 避免 git pull 覆盖。适用于任何通过 git 安装的 OpenCode/Claude Code 技能。 触发场景:翻译技能描述、自定义技能元数据、保护本地修改不被覆盖。 |
Document the correct workflow for localizing skill descriptions (or any skill metadata) while protecting local modifications from being overwritten by git pull.
This skill applies to any skills installed via git repositories in AI coding assistants (OpenCode, Claude Code, etc.).
When you want to customize skill descriptions (e.g., translate to Chinese, add custom tags, modify triggers) for skills installed via a git repository, you face a conflict:
git pull updates will overwrite your local changes--assume-unchanged is dangerous — git may still overwrite those filesEdit the SKILL.md files directly in the git-tracked directory.
# Example: Translate description to Chinese
cd ~/.config/opencode/superpowers
for skill in skills/*/SKILL.md; do
# Edit the description field in YAML frontmatter
sed -i '' 's/old description/新描述/' "$skill"
done
cd ~/.config/opencode/superpowers
git update-index --skip-worktree skills/*/SKILL.md
This tells git to ignore local changes to these files during git pull, git checkout, etc.
If the skill discovery mechanism scans a different directory than the git repo, create a symlink:
ln -s ~/.config/opencode/superpowers/skills ~/.config/opencode/skills/superpowers
This avoids duplicating files — the symlink points to the git repo, which already has your localized descriptions.
# Don't do this — you now maintain two copies of each file
cp ~/.config/opencode/superpowers/skills/*/SKILL.md ~/.config/opencode/skills/
# Don't use --assume-unchanged — it's for performance optimization, not local overrides
git update-index --assume-unchanged skills/*/SKILL.md
# Modify in-place, protect with skip-worktree, symlink for discovery
git update-index --skip-worktree skills/*/SKILL.md
ln -s ~/.config/opencode/superpowers/skills ~/.config/opencode/skills/superpowers
| Flag | Purpose | Safe for local overrides? |
|---|---|---|
--skip-worktree | "I modified this locally, don't touch it" | ✅ Yes |
--assume-unchanged | "This file is huge, skip checking it for performance" | ❌ No — git may overwrite it |
# Verify skip-worktree status (S = skip-worktree set)
git ls-files -v skills/*/SKILL.md | grep '^S'
# Verify working tree is clean
git status
# Verify symlink exists
ls -la ~/.config/opencode/skills/superpowers
To restore tracking:
git update-index --no-skip-worktree skills/*/SKILL.md
git checkout -- skills/*/SKILL.md # restores upstream version
git status and git ls-files -v after setup--- 块中的 name 和 description 字段发现和展示技能。没有 frontmatter 的技能不会出现在 /skill-name 命令列表中。---
name: your-skill-name
description: 简短描述技能用途和触发条件(会被 OpenCode 展示给用户)
---
错误路径:直接写 # Skill Title 开头,没有 frontmatter → 技能不被发现。
正确路径:文件必须以 --- 开头,包含 name 和 description。
基于 SOC 职业分类