From nbl.superpowers
Syncs rule files from icefrag/nbl-superpowers GitHub repo's rules/ dir to ~/.claude/rules/ via API, overwriting existing and creating subdirs. Triggers on install or remote update requests.
npx claudepluginhub icefrag/nbl-superpowers --plugin nbl.superpowersThis skill uses the workspace's default tool permissions.
从 GitHub 仓库 `icefrag/nbl-superpowers` 的 `rules/` 目录安装所有规则文件到本地 `~/.claude/rules/`,存在则覆盖。
Installs Claude plugin rules into project's .claude/rules/ directory for persistent use without plugin loaded. Supports --all, --dry-run, --force, smart merge of modified rules, and --customize for overrides.
Syncs built-in rule templates and generated rule artifacts in .agent-team/rules to fix rule drift. Use when asked to sync or update rules.
Syncs KNOWLEDGE.jsonl or session learnings to project .claude/rules/ as best-practice.md and avoid.md. Use for updating rules, extracting learnings, organizing anti-patterns.
Share bugs, ideas, or general feedback.
从 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/ 目录下无文件,提示用户确认仓库路径是否正确