From agi-super-team
Syncs Claude Code and OpenClaw environment configurations from a GitHub repository to local, including output styles, CLAUDE.md, MCP servers, agents, and plugins. Useful for multi-device setup, recovery after machine change, or team config sharing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agi-super-team:env-setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
从 GitHub 仓库一键同步所有配置到本地 Claude Code 和 OpenClaw 环境。
config/CLAUDE.mdconfig/ccline/models.tomlconfig/ccline/themes/cometix.tomlconfig/ccline/themes/default.tomlconfig/ccline/themes/gruvbox.tomlconfig/ccline/themes/minimal.tomlconfig/ccline/themes/nord.tomlconfig/ccline/themes/powerline-dark.tomlconfig/ccline/themes/powerline-light.tomlconfig/ccline/themes/powerline-rose-pine.tomlconfig/ccline/themes/powerline-tokyo-night.tomlconfig/mcp_config.jsonconfig/output-styles/engineer-professional.mdconfig/output-styles/laowang-engineer.mdconfig/output-styles/nekomata-engineer.mdconfig/output-styles/ojousama-engineer.mdconfig/servers/CHANGELOG.mdconfig/servers/CONTRIBUTING.mdconfig/servers/LICENSEconfig/servers/README.md从 GitHub 仓库一键同步所有配置到本地 Claude Code 和 OpenClaw 环境。
本 skill 提供一键同步功能,将配置从 GitHub 仓库同步到本地:
sync_env.py - 同步所有配置到本地| 组件 | 来源 | 目标 | 说明 |
|---|---|---|---|
| Output Styles | config/output-styles/ | ~/.claude/output-styles/ | Claude Code 对话风格 |
| CLAUDE.md | config/CLAUDE.md | ~/.claude/CLAUDE.md | 全局提示词 |
| MCP Config | config/mcp_config.json | ~/.claude.json | MCP 服务器(合并) |
| Agent Configs | agents/ | ~/.openclaw/agents/ | OpenClaw Agent 配置 |
| MCP Servers | mcp/ | 集成到 ~/.claude.json | MCP 服务器独立配置 |
| Plugins | plugins/ | ~/.openclaw/plugins/ | OpenClaw 插件配置 |
your-claude-env/ (GitHub 仓库)
├── env-setup.skill/ (或任意名称,放在 skills/ 下)
│ ├── SKILL.md
│ ├── scripts/
│ │ ├── sync_env.py (主同步脚本)
│ │ ├── backup_env.py (备份脚本,可选)
│ │ └── restore_env.py (恢复脚本,可选)
│ └── config/ (配置模板目录)
│ ├── output-styles/ (对话风格配置)
│ ├── CLAUDE.md (全局提示词)
│ └── mcp_config.json (MCP服务器配置)
├── agents/ (Agent 配置目录)
│ ├── multimodal-agent/
│ │ ├── AGENT.md
│ │ └── system.md
│ ├── healthcare-monitor/
│ └── ...
├── mcp/ (MCP 服务器配置)
│ ├── github/
│ │ ├── config.json
│ │ └── README.md
│ ├── lark-mcp/
│ └── ...
└── plugins/ (插件配置)
├── feishu/
│ └── config.json
├── telegram/
└── ...
用于存放 OpenClaw Agent 的配置:
agents/
├── multimodal-agent/
│ ├── AGENT.md (Agent 描述)
│ └── system.md (System prompt)
├── healthcare-monitor/
│ ├── AGENT.md
│ └── system.md
└── ...
同步目标: ~/.openclaw/agents/
用于存放 MCP 服务器的独立配置:
mcp/
├── github/
│ ├── config.json (MCP 服务器配置)
│ └── README.md (使用说明)
├── lark-mcp/
│ └── ...
└── ...
同步目标: 集成到 ~/.claude.json 的 mcpServers
用于存放 OpenClaw 插件配置:
plugins/
├── feishu/
│ └── config.json
├── telegram/
│ └── config.json
└── ...
同步目标: ~/.openclaw/plugins/
在主设备上创建仓库:
# 1. 创建项目目录
mkdir claude-env-sync
cd claude-env-sync
# 2. 复制 env-setup skill
cp -r ~/.claude/skills/env-setup ./
# 3. 复制当前配置到 config/
cp -r ~/.claude/output-styles/* env-setup/config/output-styles/
cp ~/.claude/CLAUDE.md env-setup/config/
# 4. 复制 agents 配置(如果有)
cp -r ~/.openclaw/agents/* env-setup/agents/
# 5. 提取 MCP 配置(如果有独立配置)
mkdir -p env-setup/mcp
# (手动复制 MCP 服务器配置)
# 6. 提取插件配置(如果有)
mkdir -p env-setup/plugins
# (手动复制插件配置)
# 7. 推送到 GitHub
git init
git add .
git commit -m "Initial Claude env config"
git remote add origin https://github.com/yourusername/claude-env-sync.git
git push -u origin main
# 1. 克隆仓库到 skills 目录
cd ~/.claude/skills
git clone https://github.com/yourusername/claude-env-sync.git
# 2. 运行同步脚本
python ~/.claude/skills/claude-env-sync/env-setup/scripts/sync_env.py
# 3. 重启 Claude Code / OpenClaw Gateway
# 基本用法(同步所有配置)
python scripts/sync_env.py
# 强制覆盖已存在的文件
python scripts/sync_env.py --force
# 只同步特定组件
python scripts/sync_env.py --components agents mcp plugins
# 指定配置目录
python scripts/sync_env.py --claude-dir "/path/to/.claude" --openclaw-dir "/path/to/.openclaw"
同步选项:
output_styles - 同步对话风格配置claude_md - 同步全局 CLAUDE.mdmcp_config - 同步 MCP 服务器配置agents - 同步 Agent 配置mcp - 同步独立 MCP 服务器配置plugins - 同步插件配置{
"mcpServers": {
"chrome-devtools": {
"type": "stdio",
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"]
},
"github": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your_token_here"
}
}
}
}
⚠️ 安全提醒:
"GITHUB_PERSONAL_ACCESS_TOKEN": "your_token_here"每个 Agent 目录包含:
AGENT.md - Agent 描述和能力说明system.md - System prompt每个插件目录包含:
config.json 或 config.yaml - 插件配置在多台电脑上保持一致的配置:
# 主设备:更新配置后
git add .
git commit -m "Update config"
git push
# 其他设备:拉取并同步
git pull
python scripts/sync_env.py
团队成员共享统一的配置:
~/.claude/skills/sync_env.py 同步更新# 新电脑上
git clone https://github.com/yourusername/claude-env-sync.git ~/.claude/skills/
python ~/.claude/skills/claude-env-sync/env-setup/scripts/sync_env.py --force
# 回滚到之前的配置
git log --oneline
git checkout <commit-hash>
python scripts/sync_env.py --force
1. 修改本地配置
↓
2. 更新相应目录 (config/, agents/, mcp/, plugins/)
↓
3. git add . && git commit -m "Update xxx"
↓
4. git push
↓
5. 其他设备: git pull && python scripts/sync_env.py
--force:跳过已存在的文件(除了 MCP 配置,始终合并)--force:覆盖已存在的文件同步完成后需要重启才能生效:
# .gitignore 示例
config/mcp_config.json.local
config/secrets/
*.key
*.token
.env
# 创建设备特定配置分支
git checkout -b my-custom-config
# 切换回主配置
git checkout main
# 只同步 agents 和 plugins,不改变其他配置
python scripts/sync_env.py --components agents plugins
# 只同步 MCP,不改变其他配置
python scripts/sync_env.py --components mcp
创建定期同步脚本:
# sync.sh
#!/bin/bash
cd ~/.claude/skills/claude-env-sync
git pull
python env-setup/scripts/sync_env.py
添加到 cron 或 Task Scheduler 定期执行。
问题: "config/agents not found"
问题: ".claude.json not found"
问题: Agent 配置没有生效
问题: 推送失败
问题: 意外提交了密钥
# 从历史中删除包含密钥的文件
git filter-branch --force --tree-filter 'git rm -f filename' -- --all
# 强制推送
git push origin --force --all
npx claudepluginhub aaaaqwq/agi-super-team --plugin agi-super-teamSyncs cc-settings with upstream Claude Code changelog (maintainer) or updates local cc-settings install (user).
Deep expertise in Claude Code CLI configuration, hooks, MCPs, CLAUDE.md, sub-agents, permissions, and workflows. Activate for setup, optimization, or troubleshooting of Claude Code features.
Maximizes productivity with Anthropic's Claude Code CLI: shortcuts, hooks, MCPs, advanced configuration, workflows, CLAUDE.md, memory, sub-agents, permissions, and ecosystem integrations. Activate for configuring Claude Code, creating hooks, optimizing CLAUDE.md, using MCPs, resolving CLI errors, or advanced workflows.