Claude Code 环境一键同步工具。从 GitHub 仓库同步所有配置到本地:output-styles 风格、CLAUDE.md 全局提示词、MCP 服务器配置、Agent 配置、Plugin 配置。适用于多设备统一环境、换电脑恢复、团队共享配置等场景。当用户需要从 GitHub 仓库同步 Claude Code/OpenClaw 环境配置时使用此 skill。

MITAuto-check: notesAgent Workflows

Install Env Setup

skills CLI
$ npx skills add majiayu000/claude-skill-registry --skill env-setup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install majiayu000/claude-skill-registry env-setup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/majiayu000/claude-skill-registry.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/bash/env-setup .claude/skills/env-setup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
env-setup
GitHub stars
666
Used in
1 other repo
Token cost
~1.7k tokens
SKILL.md length
270 words
Files
2
Skills in repo
1,273
Repo updated
First seen
Licence
MIT

At a glance

Claude Code 环境一键同步工具。从 GitHub 仓库同步所有配置到本地:output-styles 风格、CLAUDE.md 全局提示词、MCP 服务器配置、Agent 配置、Plugin 配置。适用于多设备统一环境、换电脑恢复、团队共享配置等场景。当用户需要从 GitHub 仓库同步 Claude Code/OpenClaw 环境配置时使用此 skill。

  • Works in 3 steps: 创建团队 GitHub 仓库 → 每个成员克隆到 ~/.claude/skills/ → 定期运行 sync_env.py 同步更新
  • Tasks that involve Hooks and plugins
  • SKILL.md covers 功能概述, GitHub 仓库结构, 配置目录说明 and 使用方法, plus 5 more sections
  • Calls git and python; reaches github.com; needs GITHUB_PERSONAL_ACCESS_TOKEN

What it does

Env Setup is an agent skill from majiayu000/claude-skill-registry. Claude Code 环境一键同步工具。从 GitHub 仓库同步所有配置到本地:output-styles 风格、CLAUDE.md 全局提示词、MCP 服务器配置、Agent 配置、Plugin 配置。适用于多设备统一环境、换电脑恢复、团队共享配置等场景。当用户需要从 GitHub 仓库同步 Claude Code/OpenClaw 环境配置时使用此 skill。

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `metadata.json`).

It sits in Agent Workflows, covering Hooks and plugins, Agent instruction files and MCP servers. It works with Model Context Protocol, GitHub and Bash. The repository describes itself as: Searchable Claude Code skills catalog with source-linked guides and generated registry artifacts. The licence is MIT.

When your agent uses it

  • Tasks that involve Hooks and plugins
  • Tasks that involve Agent instruction files
  • Tasks that involve MCP servers

Example prompts

  • “/env-setup”

Requirements

  • Python 3
  • A credential in GITHUB_PERSONAL_ACCESS_TOKEN

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 创建团队 GitHub 仓库
  2. 每个成员克隆到 ~/.claude/skills/
  3. 定期运行 sync_env.py 同步更新

What it can do on your machine

Read from SKILL.md and the folder at commit 2d14a69. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GITHUB_PERSONAL_ACCESS_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Env Setup loads about 1.7k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 270 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:310
    .env

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from majiayu000/claude-skill-registry at commit 2d14a69, republished under its MIT licence (© majiayu000). 270 words, ~1,699 tokens.

Download SKILL.mdSave it as .claude/skills/env-setup/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
env-setup
description
Claude Code 环境一键同步工具。从 GitHub 仓库同步所有配置到本地:output-styles 风格、CLAUDE.md 全局提示词、MCP 服务器配置、Agent 配置、Plugin 配置。适用于多设备统一环境、换电脑恢复、团队共享配置等场景。当用户需要从 GitHub 仓库同步 Claude Code/OpenClaw 环境配置时使用此 skill。

Claude Code & OpenClaw 环境一键同步工具

从 GitHub 仓库一键同步所有配置到本地 Claude Code 和 OpenClaw 环境。

功能概述

本 skill 提供一键同步功能,将配置从 GitHub 仓库同步到本地:

  • sync_env.py - 同步所有配置到本地
同步内容
组件来源目标说明
Output Stylesconfig/output-styles/~/.claude/output-styles/Claude Code 对话风格
CLAUDE.mdconfig/CLAUDE.md~/.claude/CLAUDE.md全局提示词
MCP Configconfig/mcp_config.json~/.claude.jsonMCP 服务器(合并)
Agent Configsagents/~/.openclaw/agents/OpenClaw Agent 配置
MCP Serversmcp/集成到 ~/.claude.jsonMCP 服务器独立配置
Pluginsplugins/~/.openclaw/plugins/OpenClaw 插件配置

GitHub 仓库结构

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/
    └── ...

配置目录说明

agents/ - Agent 配置

用于存放 OpenClaw Agent 的配置:

agents/
├── multimodal-agent/
│   ├── AGENT.md           (Agent 描述)
│   └── system.md          (System prompt)
├── healthcare-monitor/
│   ├── AGENT.md
│   └── system.md
└── ...

同步目标: ~/.openclaw/agents/

mcp/ - MCP 服务器配置

用于存放 MCP 服务器的独立配置:

mcp/
├── github/
│   ├── config.json         (MCP 服务器配置)
│   └── README.md          (使用说明)
├── lark-mcp/
│   └── ...
└── ...

同步目标: 集成到 ~/.claude.json 的 mcpServers

plugins/ - 插件配置

用于存放 OpenClaw 插件配置:

plugins/
├── feishu/
│   └── config.json
├── telegram/
│   └── config.json
└── ...

同步目标: ~/.openclaw/plugins/

使用方法

一、初始化 GitHub 仓库

在主设备上创建仓库:

bash
# 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
二、在新设备上同步
bash
# 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
三、命令行选项
bash
# 基本用法(同步所有配置)
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.md
  • mcp_config - 同步 MCP 服务器配置
  • agents - 同步 Agent 配置
  • mcp - 同步独立 MCP 服务器配置
  • plugins - 同步插件配置

配置文件格式

mcp_config.json
json
{
  "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"
      }
    }
  }
}

⚠️ 安全提醒:

  • 不要在仓库中提交真实的 API keys 或 tokens!
  • 敏感信息应使用环境变量或本地配置文件(在 .gitignore 中排除)
  • 使用占位符标注需要填写的密钥位置,例如:"GITHUB_PERSONAL_ACCESS_TOKEN": "your_token_here"
Agent 配置

每个 Agent 目录包含:

  • AGENT.md - Agent 描述和能力说明
  • system.md - System prompt
插件配置

每个插件目录包含:

  • config.json 或 config.yaml - 插件配置

使用场景

场景 1:多设备环境统一

在多台电脑上保持一致的配置:

bash
# 主设备:更新配置后
git add .
git commit -m "Update config"
git push

# 其他设备:拉取并同步
git pull
python scripts/sync_env.py
场景 2:团队共享配置

团队成员共享统一的配置:

  1. 创建团队 GitHub 仓库
  2. 每个成员克隆到 ~/.claude/skills/
  3. 定期运行 sync_env.py 同步更新
场景 3:快速换电脑
bash
# 新电脑上
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
场景 4:版本管理配置
bash
# 回滚到之前的配置
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

注意事项

配置同步策略
  • MCP 配置:采用合并模式,不会覆盖现有的其他 MCP 服务器
  • Agent 配置:直接复制到目标目录,会覆盖同名 Agent
  • 插件配置:直接复制到目标目录,会覆盖同名插件
  • 不使用 --force:跳过已存在的文件(除了 MCP 配置,始终合并)
  • 使用 --force:覆盖已存在的文件
重启应用

同步完成后需要重启才能生效:

  • Claude Code - Output styles 会重新加载
  • OpenClaw Gateway - Agents/MCP/Plugins 会重新加载
敏感信息管理
  • 不要提交真实的 API keys 或 tokens
  • 使用环境变量或本地配置文件
  • 在 .gitignore 中排除敏感文件
# .gitignore 示例
config/mcp_config.json.local
config/secrets/
*.key
*.token
.env
跨平台兼容
  • 脚本自动处理 Windows/macOS/Linux 路径差异
  • 配置文件使用 UTF-8 编码

高级用法

分支管理
bash
# 创建设备特定配置分支
git checkout -b my-custom-config

# 切换回主配置
git checkout main
部分同步
bash
# 只同步 agents 和 plugins,不改变其他配置
python scripts/sync_env.py --components agents plugins

# 只同步 MCP,不改变其他配置
python scripts/sync_env.py --components mcp
自动化同步(可选)

创建定期同步脚本:

bash
# 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"

  • 解决: 确认 Claude Code/OpenClaw 已安装并运行过一次

问题: Agent 配置没有生效

  • 解决: 检查配置格式是否正确,重启 OpenClaw Gateway
Git 相关

问题: 推送失败

  • 解决: 检查 GitHub 仓库权限、网络连接
密钥安全问题

问题: 意外提交了密钥

  • 解决: 使用 git filter-branch 或 git filter-repo 从历史中删除
bash
# 从历史中删除包含密钥的文件
git filter-branch --force --tree-filter 'git rm -f filename' -- --all

# 强制推送
git push origin --force --all

© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/bash/env-setup of majiayu000/claude-skill-registry.

  • SKILL.md
  • metadata.json

Open the folder on GitHubat commit 2d14a69

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in majiayu000/claude-skill-registry, which our catalogue first saw on October 8, 2026.

Compare with similar skills

Env Setup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Env Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Env Setup this skillmajiayu000/claude-skill-registry6661 repos~1.7kAutomated safety check: NotesMIT
Crush Configurationcharmbracelet/crush29k—~3.7kAutomated safety check: PassCustom licence
Agent Setup Health Audittw93/Waza7.2k—~5.2kAutomated safety check: NotesMIT
Working With Claude Code Docsobra/superpowers-developing-for-claude-code142—~1.5kAutomated safety check: PassNone
Releasejgravelle/jcodemunch-mcp2.7k—~6.5kAutomated safety check: PassCustom licence
Context Mode Upgrademksglu/context-mode26k—~291Automated safety check: PassCustom licence

Similar skills

  • Crush Configuration

    charmbracelet/crush

    Explains how to configure the Crush coding agent with crushrc or crush.json, covering providers, models, LSPs, MCP servers, hooks, permissions and config precedence.

    29k GitHub stars~3.7k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Audits a project's agent configuration, instruction drift, hooks, MCP and AI maintainability, then reports prioritized findings with evidence and next actions.

    7.2k GitHub stars~5.2k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check: notes
  • Working With Claude Code Docs

    obra/superpowers-developing-for-claude-code

    Looks up official Claude Code documentation stored as reference files instead of guessing about CLI commands, configuration, or plugin APIs.

    142 GitHub stars~1.5k tokensUpdated 10 mo ago
    Agent WorkflowsAuto-check passed
  • Release

    jgravelle/jcodemunch-mcp

    Publishing a jMunch release (jcodemunch-mcp, jdocmunch-mcp, jdatamunch-mcp, jragmunch-cli), reviewing/merging/closing PRs, and responding to the community.

    2.7k GitHub stars~6.5k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Context Mode Upgrade

    mksglu/context-mode

    Update context-mode from GitHub and fix hooks/settings. Pulls latest, builds, installs, updates npm global, configures hooks. Trigger: /context-mode:ctx-upgrade

    26k GitHub stars~291 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Claude Code Mastery Squad

    ohmyjahh/xquads-squads

    Routes a request to one of eight specialist agents covering hooks, skills, subagents, MCP integration and context engineering for Claude Code.

    276 GitHub stars~1.1k tokensUpdated 9 days ago
    Agent WorkflowsAuto-check passed

More from majiayu000/claude-skill-registry

All 1,273 skills in this repo
  • Deep Research

    majiayu000/claude-skill-registry

    Multi-source deep research using firecrawl and exa MCPs. An agent skill from majiayu000/claude-skill-registry.

    666 GitHub starsUsed in 6 repos~1.1k tokens
    Auto-check passed
  • Exa Search

    majiayu000/claude-skill-registry

    Neural search via Exa MCP for web, code, and company research.

    666 GitHub starsUsed in 5 repos~856 tokens
    Auto-check passed
  • Fal AI Media

    majiayu000/claude-skill-registry

    Unified media generation via fal.ai MCP — image, video, and audio.

    666 GitHub starsUsed in 5 repos~1.7k tokens
    Auto-check passed
  • Pyzotero

    majiayu000/claude-skill-registry

    Interact with Zotero reference management libraries using the pyzotero Python client.

    666 GitHub starsUsed in 5 repos~1.6k tokens
    Auto-check: notes
  • Bgpt Paper Search

    majiayu000/claude-skill-registry

    Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server.

    666 GitHub starsUsed in 4 repos~619 tokens
    Auto-check: notes
  • Bio Alignment Pairwise

    majiayu000/claude-skill-registry

    Perform pairwise sequence alignment using Biopython Bio.Align.PairwiseAligner.

    666 GitHub starsUsed in 4 repos~1.7k tokens
    Auto-check passed

Categories

Questions about Env Setup

What does Env Setup do?

Claude Code 环境一键同步工具。从 GitHub 仓库同步所有配置到本地:output-styles 风格、CLAUDE.md 全局提示词、MCP 服务器配置、Agent 配置、Plugin 配置。适用于多设备统一环境、换电脑恢复、团队共享配置等场景。当用户需要从 GitHub 仓库同步 Claude Code/OpenClaw 环境配置时使用此 skill。. Env Setup is an agent skill from majiayu000/claude-skill-registry.

When should I use Env Setup?

Env Setup fits situations like: tasks that involve Hooks and plugins; tasks that involve Agent instruction files; tasks that involve MCP servers.

How do I install Env Setup in Claude Code?

Run `npx skills add majiayu000/claude-skill-registry --skill env-setup -a claude-code`. Or copy the skill folder (skills/bash/env-setup in majiayu000/claude-skill-registry) into .claude/skills/env-setup in your project. Claude Code loads it when a task matches its description.

How do I install Env Setup in Codex?

Run `npx skills add majiayu000/claude-skill-registry --skill env-setup -a codex`. Or copy the skill folder (skills/bash/env-setup in majiayu000/claude-skill-registry) into .agents/skills/env-setup in your project. Codex loads it when a task matches its description.

Can I use Env Setup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/claude-skill-registry --skill env-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/env-setup, .gemini/skills/env-setup, .github/skills/env-setup and .opencode/skills/env-setup in your project.

What does Env Setup need to run?

Going by SKILL.md and its folder, Env Setup needs the command-line tools its instructions call (git and python) and credentials named GITHUB_PERSONAL_ACCESS_TOKEN. Our summary lists: Python 3; A credential in GITHUB_PERSONAL_ACCESS_TOKEN.

Does Env Setup access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Env Setup safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Env Setup use?

Env Setup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Env Setup use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Env Setup?

Skills that share tags, products or a category with Env Setup: Crush Configuration (charmbracelet/crush, 29k stars), Agent Setup Health Audit (tw93/Waza, 7.2k stars), Working With Claude Code Docs (obra/superpowers-developing-for-claude-code, 142 stars) and Release (jgravelle/jcodemunch-mcp, 2.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Env Setup?

majiayu000 (a GitHub user) maintains it in majiayu000/claude-skill-registry, which has 666 GitHub stars. The repository holds 1,273 skills in this directory. The repository was last updated on October 7, 2026.

Source: majiayu000/claude-skill-registry on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.