بنقرة واحدة
nbl-install-rules
从 GitHub 仓库安装最新规则文件到本地 ~/.claude/rules/ 目录。 触发条件:用户请求安装规则、从远程更新本地规则。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
从 GitHub 仓库安装最新规则文件到本地 ~/.claude/rules/ 目录。 触发条件:用户请求安装规则、从远程更新本地规则。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | nbl.install-rules |
| description | 从 GitHub 仓库安装最新规则文件到本地 ~/.claude/rules/ 目录。 触发条件:用户请求安装规则、从远程更新本地规则。 |
从 GitHub 仓库 icefrag/nbl-superpowers 的 rules/ 目录安装所有规则文件到本地 ~/.claude/rules/,存在则覆盖。
调用 GitHub API 获取仓库文件树:
curl -s "https://api.github.com/repos/icefrag/nbl-superpowers/git/trees/main?recursive=1"
从返回的 JSON 中筛选 rules/ 目录下的文件:
path 以 rules/ 开头type 为 blob对每个匹配的文件,通过 GitHub Contents API 获取内容并解码写入:
注意:禁止使用 raw.githubusercontent.com,该域名在 Windows Schannel 下会因 SSL 重协商失败。
对每个文件执行以下命令(将 {path} 替换为文件路径如 rules/common/architecture.md,{relative_path} 替换为 rules/ 之后的部分如 common/architecture.md):
curl -s "https://api.github.com/repos/icefrag/nbl-superpowers/contents/{path}" | python -c "import json,sys,base64,os; d=json.load(sys.stdin); p=os.path.expanduser('~/.claude/rules/{relative_path}'); os.makedirs(os.path.dirname(p),exist_ok=True); open(p,'wb').write(base64.b64decode(d['content'])); print('OK: {relative_path} (' + str(d['size']) + ' bytes)')"
写入规则:
~/.claude/rules/{相对路径}向用户展示同步结果:
# Rules Sync Report
## Synced
- rules/common/architecture.md (updated)
- rules/common/coding-conventions.md (updated)
- rules/common/naming.md (new)
...
## Summary
Total: X files synced (Y updated, Z new)
GITHUB_TOKEN 环境变量rules/ 目录下无文件,提示用户确认仓库路径是否正确Use when executing implementation plans with independent tasks in the current session
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Use when you have a spec or requirements for a multi-step task, before touching code
Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
Use when creating new skills, editing existing skills, or verifying skills work before deployment