Token导航 LogoToken导航

Agent Skill · 研究检索

chezmoi-config(切兹莫伊配置)

chezmoi-config 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

chezmoi-config 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 40,546。

总安装 1,273周安装 52GitHub Stars 公开资料未说明下载 408核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:chezmoi-config(切兹莫伊配置)
来源仓库:https://github.com/faintghost/skills
仓库路径:skills/chezmoi-config
安装命令:
npx skills add https://github.com/faintghost/skills --skill chezmoi-config
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/faintghost/skills --skill chezmoi-config

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

chezmoi-config 提供 chezmoi dotfile 的综合配置管理指南。涵盖模板、脚本、外部资源和高级设置。仅读验证,禁止直接修改环境。需确认是否允许查看系统文件和运行只读检查。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/chezmoi-config

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/faintghost/skills --skill chezmoi-config;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

chezmoi-config 怎么安装?

在终端执行 npx skills add https://github.com/faintghost/skills --skill chezmoi-config。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

chezmoi-config 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

chezmoi-config 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

chezmoi-config 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

chezmoi-config 用的人多吗?

公开数据是累计安装 1,273 次,近一周安装 52 次,下载 408 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

chezmoi-config 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
chezmoi-config

切兹莫伊配置 · 本页

1,273—接触敏感数据未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Chezmoi Configuration Management

Comprehensive guide for managing chezmoi dotfiles with templates, scripts, external resources, and advanced configurations.

⚠️ Safety Constraints

This skill is READ-ONLY and validation-only. It MUST NOT modify your actual environment.

Forbidden Operations

NEVER execute these commands - they will modify your system:

  • chezmoi apply - Applies changes to your home directory
  • chezmoi apply --force - Forcefully applies changes
  • chezmoi update - Updates source state and may change managed files
  • Any operations that directly execute scripts (scripts run automatically during chezmoi apply)

Allowed Safe Operations

ONLY use these read-only validation commands:

  • chezmoi diff - Preview what would change (safe)
  • chezmoi apply --dry-run - Simulate changes without applying (safe)
  • chezmoi doctor - Check configuration validity (safe)
  • chezmoi data - Display template data variables (safe)
  • chezmoi managed - List files currently managed by chezmoi (read-only, safe)
  • chezmoi unmanaged - List files currently unmanaged by chezmoi (read-only, safe)
  • chezmoi ignored - List files ignored by chezmoi (read-only, safe)
  • chezmoi execute-template < file.tmpl - Preview expanded template output (safe)
  • chezmoi state dump - View script execution state (safe)
  • chezmoi verify - Verify source state integrity (safe)
  • chezmoi cd - Enter source directory (safe)
  • chezmoi source-path - Show source directory path (safe)

User Responsibility

This skill helps you create and validate chezmoi configurations. To apply changes, you must manually run chezmoi apply in your terminal after reviewing the output.

Quick Start

Creating a New Template

  1. Add existing file as template: chezmoi add --template ~/.gitconfig
  2. Or create manually: chezmoi cd $EDITOR dot_gitconfig.tmpl
  3. Use Go template syntax: [user] name = {{.name}} {{- if eq.chezmoi.os "darwin"}} [credential] helper = osxkeychain {{- end}}

Managing External Resources

Create .chezmoiexternal.toml.tmpl:

[".oh-my-zsh"]
    type = "archive"
    url = "https://github.com/ohmyzsh/ohmyzsh/archive/master.tar.gz"
    exact = true
    stripComponents = 1

Writing Scripts

Create run_onchange_install-packages.sh.tmpl:

{{ if eq .chezmoi.os "darwin" -}}
#!/bin/bash
brew install git vim ripgrep
{{ end -}}

Reference Documentation

This skill includes comprehensive reference documentation. Consult these guides for detailed information:

Common Tasks

1. Create Platform-Specific Configuration

Template file (dot_gitconfig.tmpl):

[user]
    name = {{ .name }}
    email = {{ .email }}

{{- if eq .chezmoi.os "darwin" }}
[credential]
    helper = osxkeychain
{{- else if eq .chezmoi.os "linux" }}
[credential]
    helper = cache
{{- end }}

Configuration (chezmoi.toml):

[data]
    name = "John Doe"
    email = "john@example.com"

2. Manage Secrets with Password Managers

{{- if (bitwarden "github") }}
[github]
    token = {{ (bitwarden "github").login.password }}
{{- end }}

3. Install Packages Conditionally

run_onchange_install-packages.sh.tmpl:

{{ if eq .chezmoi.os "darwin" -}}
#!/bin/bash
brew bundle --file=/dev/stdin <<EOF
{{ range .packages.darwin.brews -}}
brew "{{ . }}"
{{ end -}}
EOF
{{ else if eq .chezmoi.os "linux" -}}
#!/bin/bash
sudo apt install -y {{ range .packages.linux }}{{ . }} {{ end }}
{{ end -}}

.chezmoidata/packages.yaml:

darwin:
  brews:
    - git
    - vim
    - ripgrep

linux:
  - git
  - vim
  - ripgrep
  - fd-find

4. Include External Resources

.chezmoiexternal.toml.tmpl:

[".vim/autoload/plug.vim"]
    type = "file"
    url = "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"

[".oh-my-zsh"]
    type = "archive"
    url = "https://github.com/ohmyzsh/ohmyzsh/archive/master.tar.gz"
    exact = true
    stripComponents = 1
    refreshPeriod = "168h"

[".local/bin/age"]
    type = "archive-file"
    url = "https://github.com/FiloSottile/age/releases/download/v1.1.1/age-v1.1.1-{{ .chezmoi.os }}-{{ .chezmoi.arch }}.tar.gz"
    path = "age/age"
    executable = true

5. Configure Interactive Prompts

.chezmoi.toml.tmpl:

{{- $editor := promptChoice "favorite editor" ["vim" "neovim" "vscode"] -}}
[data]
    name = "{{ promptString "your name" }}"
    email = "{{ promptString "your email" }}"
    editor = {{ $editor }}

{{ if promptBool "enable work config?" -}}
[data.work]
    enabled = true
    work_email = "{{ promptString "work email" }}"
{{ end }}

6. Ignore Files Conditionally

.chezmoiignore (template-aware):

README.md
*.log

{{- if ne .chezmoi.hostname "work-laptop" }}
.work
{{- end }}

{{- if eq .chezmoi.os "windows" }}
Documents/*
!Documents/*PowerShell/
{{- end }}

7. Interpret chezmoi managed / chezmoi unmanaged Output (Config Files)

When reviewing chezmoi unmanaged, note that the *destination* config file is ~/.config/chezmoi/chezmoi.toml, while the *source* is typically managed as a template such as dot_config/chezmoi/chezmoi.toml.tmpl (or private_dot_config/chezmoi/chezmoi.toml.tmpl) in the chezmoi source state.

If ~/.config/chezmoi appears as unmanaged:

  • First check chezmoi managed to confirm whether the config file is already managed in source.
  • If it is not managed, add it as a template and manage it in source (recommended when you maintain machine-specific values in chezmoi.toml).

8. Manage run_once Scripts

run_once_000-bootstrap.sh.tmpl:

#!/bin/bash
{{ if eq .chezmoi.os "darwin" -}}
if ! command -v brew &> /dev/null; then
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
{{ end -}}

Reset run_once state:

# Clear all run_once script state
chezmoi state delete-bucket --bucket=scriptState

Built-in Variables

Commonly used chezmoi variables available in all templates:

VariableDescriptionExample
.chezmoi.osOperating systemlinux, darwin, windows
.chezmoi.archArchitectureamd64, arm64
.chezmoi.hostnameMachine hostnamemy-laptop
.chezmoi.usernameCurrent userjohn
.chezmoi.homeDirHome directory/home/john
.chezmoi.sourceDirSource state directory/home/john/.local/share/chezmoi
.chezmoi.env.VAREnvironment variables.chezmoi.env.EDITOR

Template Syntax Reference

Conditionals

{{ if eq .chezmoi.os "darwin" }}
# macOS-specific
{{ else if eq .chezmoi.os "linux" }}
# Linux-specific
{{ end }}

Loops

{{ range .packages.darwin.brews -}}
brew "{{ . }}"
{{ end -}}

String Operations

{{ .name | quote }}          # Add quotes
{{ .chezmoi.homeDir }}        # No trimming
{{- "content" -}}            # Trim whitespace

Best Practices

  1. Use templates for cross-platform configs - Leverage .chezmoi.os, .chezmoi.arch
  2. Store secrets in password managers - Never hardcode sensitive data
  3. Make scripts idempotent - Safe to run multiple times
  4. Use descriptive filenames - run_once_000-bootstrap.sh.tmpl
  5. Test templates locally - Use chezmoi execute-template < file.tmpl
  6. Organize.chezmoidata - Separate concerns into multiple files
  7. Document dependencies - Comment complex configurations
  8. Use appropriate refresh periods - Balance freshness and bandwidth

Consulting Latest Documentation

This skill can consult the latest chezmoi documentation via Context7 to ensure accuracy:

# When in doubt, ask for the latest docs
"Check the chezmoi documentation for [topic]"

If the question involves .tmpl behavior (especially .chezmoiignore{,.tmpl}), prefer checking the official docs first.

Useful Commands

# ⚠️ FORBIDDEN - Apply all changes (must run manually)
chezmoi apply

# Dry run (preview changes) - SAFE
chezmoi apply --dry-run

# ⚠️ FORBIDDEN - Update source state (may change managed files)
chezmoi update

# Edit source state - SAFE
chezmoi cd

# Add file as template - SAFE
chezmoi add --template ~/.config/file

# Verify configuration - SAFE
chezmoi doctor

# View all template data - SAFE
chezmoi data

# List ignored files - SAFE
chezmoi ignored

# Test template (preview output) - SAFE
chezmoi execute-template < ~/.local/share/chezmoi/dot_file.tmpl

# View run_once state - SAFE
chezmoi state dump

# Clear run_once script state (use with caution) - SAFE
chezmoi state delete-bucket --bucket=scriptState

# Clear run_onchange script state (use with caution) - SAFE
chezmoi state delete-bucket --bucket=entryState

# See what would change - SAFE
chezmoi diff

# Verify files match expected state - SAFE
chezmoi verify

File Structure

Standard chezmoi source state structure:

~/.local/share/chezmoi/
├── .chezmoi.toml.tmpl          # Main configuration (optional)
├── .chezmoiexternal.toml.tmpl   # External resources (optional)
├── .chezmoiignore.tmpl          # Ignore rules (template-aware, optional)
├── .chezmoidata/
│   ├── packages.yaml            # Custom data
│   └── work.yaml
├── dot_gitconfig.tmpl           # Regular templates
├── dot_zshrc.tmpl
├── run_once_000-bootstrap.sh.tmpl
├── run_onchange_install-packages.sh.tmpl
└── run_after_dot_vimrc.sh.tmpl

Debugging

注意:调试时也不要执行 chezmoi update,如需检查变更请用 chezmoi diff 或 chezmoi apply --dry-run。

Verbose output:

chezmoi apply --verbose

Check what would change:

chezmoi diff

Validate configuration:

chezmoi doctor

See expanded template:

chezmoi execute-template < template-file

When to Use This Skill

Use this skill whenever you're:

  • Creating new chezmoi templates with Go syntax
  • Modifying existing.chezmoi configuration files
  • Managing.chezmoiignore/.chezmoiignore.tmpl rules
  • Setting up.chezmoiexternal for external resources
  • Writing run_once/run_onchange scripts
  • Integrating password managers for secrets
  • Managing cross-platform dotfiles
  • Debugging template issues
  • Organizing.chezmoidata files

For specific concerns, refer to the detailed reference documentation listed above.

平台分布

Codex

33.85%
按下载量换算138

Claude

31.2%
按下载量换算127

Cursor

17.62%
按下载量换算72

Gemini CLI

9.64%
按下载量换算39

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills