← 返回 Skills 市场
129
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install chezmoi
功能描述
chezmoi dotfile management. consolidate - merge duplicate templates [consolidate.md], cross-platform - Windows/macOS compatibility [cross-platform.md], docto...
使用说明 (SKILL.md)
chezmoi
chezmoi dotfile template management and workflow automation.
Topics
| Topic | Description | Guide |
|---|---|---|
| consolidate | Detect duplicate modify templates and generate shared scripts | consolidate.md |
| cross-platform | macOS/Windows compatibility diagnostics and fixes | cross-platform.md |
| doctor | Check required files and auto-copy if missing | doctor.md |
| mcp-sync | MCP server configuration synchronization | mcp-sync.md |
Related Skills
| Feature | Skill |
|---|---|
| Commit splitting | commit-splitter |
Quick Reference
Consolidate (Template Merging)
"chezmoi check duplicates" → Detect templates with identical content
"merge templates" → Consolidate into shared scripts
Doctor (Environment Validation)
"chezmoi doctor" → Check for required scripts
"missing script" → Auto-copy scripts to ~/bin/
MCP Sync (MCP Synchronization)
"add MCP server" → Add to mcp-servers.json and apply
"MCP sync" → Propagate MCP config to all apps
Directory Structure
~/.local/share/chezmoi/
├── .chezmoi-lib/ # Shared scripts
│ ├── executable_vscode-settings.sh
│ ├── executable_vscode-keybindings.sh
│ ├── executable_mcp-servers.sh
│ ├── executable_generate-utcp-config.sh
│ └── executable_sourcegit-preference.sh
├── .chezmoitemplates/ # Shared data
│ └── mcp-servers.json # MCP server single source of truth
├── .chezmoiignore # OS-specific path branching
├── modify_*.sh.tmpl # Per-app modify templates
├── private_Library/ # macOS app settings
│ └── private_Application Support/
└── AppData/ # Windows app settings
├── Roaming/ # %APPDATA%
└── Local/ # %LOCALAPPDATA%
Required Validation Before Apply
Always run chezmoi diff to review changes before any chezmoi apply.
# 1. Preview changes
chezmoi diff
# 2. Apply after user approval
chezmoi apply
- Skip apply if diff output is empty
- Show diff results to user and get approval via AskUserQuestion
- See the chezmoi section in
~/.agent/rules/iac.md
安全使用建议
This skill appears to implement a real chezmoi workflow, but there are several things to check before you install or let an agent run it autonomously:
- Review the included helper script (bin/claude-source.sh). It launches a local 'claude' command with --dangerously-skip-permissions which bypasses permissions checks for that CLI; only install if you trust that binary and understand the consequences.
- Expect the skill to copy files into your home (~/bin) and to modify multiple application config files (~/.claude.json, ~/.cursor/mcp.json, ~/.utcp_config.json, etc.) via chezmoi apply. Make backups and run chezmoi diff yourself before applying any changes.
- The SKILL.md references several environment variables (MCP_JSON, EXTRA_SETTINGS, SOURCEGIT_EXECUTABLE, CHEZMOI_OS) but the skill metadata does not declare them. Ask the author (or inspect templates) to confirm which variables are required and where they come from. Treat any steps that use undeclared env vars as potentially risky.
- Because the skill can write files and run commands, prefer explicit user invocation rather than allowing autonomous runs. If you will let an agent run it, ensure AskUserQuestion prompts are enforced and review the diffs/ask prompts before any 'chezmoi apply' is executed.
- If anything is unclear, request the maintainer to: (1) declare required env vars in metadata, (2) remove or explain --dangerously-skip-permissions usage, and (3) provide a dry-run-only mode that never writes to home without explicit signed confirmation. If you want, I can extract the specific lines that reference undeclared env vars and the exact files that will be written so you can audit them more easily.
功能分析
Type: OpenClaw Skill
Name: chezmoi
Version: 0.1.1
The skill bundle provides a comprehensive set of tools and instructions for managing dotfiles via chezmoi, specifically focusing on cross-platform compatibility (macOS/Windows) and MCP server synchronization. It includes a helper script (bin/claude-source.sh) for launching Claude Code and a 'doctor' utility (doctor.md) to ensure necessary scripts are present in the user's bin directory. While the skill performs file system operations and configuration changes, its actions are transparently documented, include safety checks like 'chezmoi diff' and user approval prompts, and align entirely with its stated purpose of dotfile automation.
能力评估
Purpose & Capability
The skill's files and guides align with a chezmoi dotfile-management purpose (template consolidation, cross-platform fixes, MCP sync, and a 'doctor' that installs helper scripts). However some pieces are narrowly focused on Claude/Cursor/UTCP workflows (e.g., copying claude-source.sh, editing ~/.claude.json) — that is plausible for a chezmoi repo used to manage those app configs, but it means the skill touches multiple app config files beyond generic dotfiles. Overall capability matches the described purpose, but the scope is broader than a minimal 'chezmoi helper'.
Instruction Scope
The SKILL.md instructs the agent to read and modify many local files (e.g., ~/.local/share/chezmoi/.chezmoitemplates/mcp-servers.json, ~/.claude.json, ~/.cursor/mcp.json, ~/.utcp_config.json) and to copy scripts into ~/bin. It references running chezmoi apply, cp, chmod, jq, and using AskUserQuestion for multi-selects. It also references environment variables (MCP_JSON, EXTRA_SETTINGS, SOURCEGIT_EXECUTABLE, CHEZMOI_OS) and $USER paths that are not declared in the skill metadata. Those undeclared runtime assumptions are scope-creep and could cause the agent to access or write configuration files unexpectedly.
Install Mechanism
This is instruction-only with no install spec; nothing is written by a packaged installer. That lowers supply-chain risk. The only included executable is a small helper script (bin/claude-source.sh) provided in the skill bundle.
Credentials
The skill metadata declares no required env vars, but the instructions and template examples rely on multiple environment variables (MCP_JSON, EXTRA_SETTINGS, SOURCEGIT_EXECUTABLE, CHEZMOI_OS), plus use $USER and assume certain home paths. In particular, MCP_JSON and EXTRA_SETTINGS are used as inputs to jq pipelines. The mismatch between declared and actually-used env variables is a proportionality and transparency issue.
Persistence & Privilege
The skill does not request always:true and does not modify other skills' configs, but its documented workflows include copying files into ~/bin and applying chezmoi changes system-wide (multiple app config files). Autonomous invocation is allowed by default (platform default) — combined with the ability to run chezmoi apply and copy executables, this increases the blast radius if the agent runs the skill without clear user confirmation. The SKILL.md repeatedly emphasizes running 'chezmoi diff' and asking the user for approval before applying; users should ensure those safeguards are enforced.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install chezmoi - 安装完成后,直接呼叫该 Skill 的名称或使用
/chezmoi触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.1
Update cross-platform compatibility, consolidate templates, add claude-source.sh
v0.1.0
Initial release: consolidate, cross-platform, doctor, mcp-sync
元数据
常见问题
chezmoi 是什么?
chezmoi dotfile management. consolidate - merge duplicate templates [consolidate.md], cross-platform - Windows/macOS compatibility [cross-platform.md], docto... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 129 次。
如何安装 chezmoi?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install chezmoi」即可一键安装,无需额外配置。
chezmoi 是免费的吗?
是的,chezmoi 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
chezmoi 支持哪些平台?
chezmoi 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 chezmoi?
由 es6kr(@drumrobot)开发并维护,当前版本 v0.1.1。
推荐 Skills