Files
xmwork/scripts/install-plugins.sh
gongzhiyong e5e5f939ee feat: 13 specialist agents + 3 team orchestration commands + az CLI + read-everywhere perms
Agents (10 new, total 13):
- python-fastapi-expert   — chat-gw / xiaoshou / CloudCost / kb-chat-python
- nestjs-expert           — gongdan backend
- react-frontend-expert   — xiaoshou/gongdan/casdoor web
- mcp-tools-architect     — chat-gw tool registry + auth pipeline
- celery-worker-expert    — CloudCost async tasks + beat
- security-auditor        — OWASP + secrets + auth (read-only)
- test-engineer           — coverage + flaky + e2e
- ci-cd-engineer          — 6 repos GitHub Actions
- azure-aca-expert        — ACA + Bicep + Key Vault
- docs-writer             — README / API / runbook

Team orchestration commands:
- /team-feature   — brainstorm → architect → split → parallel impl → QA
- /team-bug-fix   — triage → RCA → fix → regression test → review
- /team-refactor  — scope → test-first → batch → verify

Infrastructure:
- Dockerfile: add Azure CLI (native apt package)
- docker-compose.yml: mount ~/.azure and ~/.config/gh (read-only)
- scripts/enter.sh: banner showing agents/commands on start
- scripts/install-plugins.sh: helper to install superpowers/OMC/agent-browser

Permissions (.claude/settings.json):
- Full read access: az, gh, kubectl, psql SELECT, redis GET/KEYS/INFO
- Controlled write: gh pr create/comment, git push origin (not main)
- Hard deny: az */update|create|delete, gh pr merge, git push --force,
  alembic downgrade, kubectl apply/delete, sudo, rm -rf /

Docs:
- CLAUDE.md: new 'Agent 团队' + '权限模型' sections
- README.md: full agent roster + permission summary

Note: Dockerfile changed — run 'docker compose build' to install Azure CLI
2026-04-24 22:20:13 +08:00

83 lines
3.2 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# 在容器内安装推荐的 Claude Code 插件(superpowers / oh-my-claudecode / agent-browser)
# 必须在容器内 /login 之后、首次使用 /team-* 命令之前运行一次
# 插件会安装到 /root/.claude/plugins,持久化在 claude-home 卷里
set -euo pipefail
cat <<'BANNER'
==================================================================
安装推荐的 Claude Code 插件
==================================================================
此脚本会尝试安装:
- oh-my-claudecode (OMC,含 /team、/ultrawork、/ralph、/brainstorm 等)
- superpowers (含 /brainstorming、/writing-plans 等)
- agent-browser (浏览器自动化 skill)
如果你只想装其中一两个,可以 Ctrl-C 停,手动跑下面对应的命令。
BANNER
read -p "继续?[Y/n] " ans
ans=${ans:-Y}
if [[ "$ans" != "Y" && "$ans" != "y" ]]; then
echo "已取消"
exit 0
fi
# ------------------------------------------------------------------
# 1. oh-my-claudecode(自称 omc)
# ------------------------------------------------------------------
echo ""
echo ">>> [1/3] 安装 oh-my-claudecode"
if command -v omc >/dev/null 2>&1; then
echo " omc 已安装,尝试升级..."
omc update || echo " update 失败,跳过(可能未登录 npm 或网络问题)"
else
# OMC 官方安装方式(可能会变化,建议定期检查 README)
npm install -g @oh-my-claudecode/cli 2>&1 | tail -3 \
|| echo " ⚠️ npm 安装 @oh-my-claudecode/cli 失败;请访问 https://github.com/oh-my-claudecode/oh-my-claudecode 获取最新安装指令"
fi
# ------------------------------------------------------------------
# 2. superpowers
# ------------------------------------------------------------------
echo ""
echo ">>> [2/3] 安装 superpowers"
# superpowers 是 Claude Code 内置 plugin,通过 /plugin install 安装(容器内 claude 里跑)
echo " 请在容器内的 claude 会话执行:"
echo " /plugin install superpowers"
echo " (本脚本不能替你交互式确认,需要手工)"
# ------------------------------------------------------------------
# 3. agent-browser
# ------------------------------------------------------------------
echo ""
echo ">>> [3/3] 安装 agent-browser"
echo " 请在容器内的 claude 会话执行:"
echo " /plugin install agent-browser"
cat <<'POSTBANNER'
==================================================================
后续步骤
==================================================================
1. 进入 claude 会话(容器内执行 'claude')
2. 运行 /plugin list 看已装
3. 运行 /plugin install superpowers
4. 运行 /plugin install agent-browser
5. 如果 OMC 装好了,运行 /oh-my-claudecode:omc-setup
装好后可用的 skill:
/brainstorming 需求澄清
/writing-plans 写计划
/verification-before-completion 完成前验证
/oh-my-claudecode:team CLI 多 agent
/oh-my-claudecode:ultrawork 大并发执行
/oh-my-claudecode:ralph 循环直到完成
/agent-browser 浏览器自动化
所有 skill 可以在 ai-ops 的 team 命令 (/team-feature, /team-bug-fix, /team-refactor) 内被编排调用。
POSTBANNER