Ai Dotfiles banner
freemty freemty

Ai Dotfiles

DevOps community

Description

🤖 Sync AI CLI configs (Claude Code, Codex, Gemini) across machines with automatic API key redaction. Deploy to remote servers in one command.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

ai-dotfiles

跨机器同步 AI CLI 和 shell 配置。用 [GNU Stow](https://www.gnu.org/software/stow/) 做 symlink 管理,一个目录 = 一个 package。

密钥/登录态由 [CC-Switch](https://github.com/freemty/cc-switch) 单独管理,不进此 repo。

快速上手

git clone git@github.com:freemty/ai-dotfiles.git ~/dotfiles
cd ~/dotfiles
./install.sh                 # stow 所有 packages 到 $HOME
./scripts/bootstrap.sh       # clone yuanbo-skills + 装第三方 skills

目录结构

ai-dotfiles/
├── claude/.claude/
│   ├── settings.json           # env、hooks、enabledPlugins(密钥字段留空)
│   ├── mcp.json                # MCP server 配置(token 留空)
│   ├── rules/                  # 11 个 md(语言、编码风格、hooks、agents…)
│   └── agents/                 # cc-advisor, fars-system-expert
├── codex/.codex/
│   ├── config.toml
│   ├── hooks.json
│   └── rules/default.rules
├── gemini/.gemini/
│   ├── settings.json
│   └── GEMINI.md
├── zsh/                        # .zshrc, .zprofile, .p10k.zsh
├── git/.gitconfig
├── tmux/.tmux.conf
├── yazi/.config/yazi/          # keymap.toml, package.toml(G 键启动 lazygit)
├── install.sh                  # stow 编排 + 自动备份
└── scripts/
    ├── bootstrap.sh            # skills 安装(personal + 第三方)
    └── third-party-skills.txt  # npx skills add 清单

同步什么 / 不同步什么

✅ 进 repo

  • Claudesettings.json, mcp.json, rules/, agents/
  • Codexconfig.toml, hooks.json, rules/
  • Geminisettings.json, GEMINI.md
  • Shell / Git / Tmux:标准 dotfiles

❌ 不进 repo(见 `.gitignore`)

  • 任何 settings.local.json(machine-local 白名单)
  • auth.json / oauth_creds.json / .env / installation_id(密钥 + 登录态)
  • sessions/ / history.jsonl / *.sqlite / projects/ / tasks/(运行时数据)
  • skills/ 下的具体 skill(由 bootstrap.sh 装)

Skills 管理

两类 skill 分别管:

  1. 个人 skills`yuanbo-skills` monorepo。bootstrap.sh clone 它并跑其 install.sh --target claude
  2. 第三方 skillsscripts/third-party-skills.txt 清单,bootstrap.shnpx skills add 批量装

新增一个第三方 skill:

ech