# Setup Devenv With Chezmoi

> >

- **Type:** Skill
- **Install:** `agentstack add skill-urmzd-dotfiles-setup-devenv-with-chezmoi`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [urmzd](https://agentstack.voostack.com/s/urmzd)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [urmzd](https://github.com/urmzd)
- **Source:** https://github.com/urmzd/dotfiles/tree/main/dot_agents/skills/setup-devenv-with-chezmoi

## Install

```sh
agentstack add skill-urmzd-dotfiles-setup-devenv-with-chezmoi
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Dev Env with Chezmoi

Personal-portfolio extensions to `setup-devenv`. This skill assumes a chezmoi-managed home directory and stays focused on the chezmoi-specific plumbing the portable skill deliberately omits.

## When to Use

- Adding a pinned-version installer for a tool that ships only via a vendor script (gcloud, aws-cli, Snowflake Cortex, etc.).
- Updating the canonical `dot_envrc.project.example` template that new projects copy.
- Standardizing how `~/.local/bin` is wired up across projects.

If you're not on chezmoi, use `setup-devenv` directly. Substitute Brewfile / Nix / your own dotfile manager.

## Pinned Installer Pattern

```text
~/.local/share/chezmoi/run_onchange_after_install-.sh.tmpl
```

Skeleton:

```bash
#!/usr/bin/env bash
set -euo pipefail

_VERSION=""
INSTALL_DIR="$HOME/.local/share//${_VERSION}"
BIN_PATH="${INSTALL_DIR}/"
BIN_LINK="$HOME/.local/bin/"

# Guard must test the actual install path, not a bin/ subdir, or the script
# re-downloads on every `chezmoi apply`.
if [ -x "${BIN_PATH}" ]; then
  exit 0
fi

mkdir -p "${INSTALL_DIR}"
curl -fsSL "" -o "${BIN_PATH}"
chmod +x "${BIN_PATH}"

ln -sf "${BIN_PATH}" "${BIN_LINK}"
```

Conventions:

- **Pin the version at the top in ALL_CAPS.** Bumping is a one-line diff.
- **Install to `~/.local/share///`.** Versioned subdirs let you roll back without re-downloading.
- **Symlink into `~/.local/bin/`.** Keeps `$PATH` stable.
- **Mirror the structure of existing scripts** like `run_onchange_after_install-cloud-clis.sh.tmpl` or `run_onchange_after_install-cortex.sh.tmpl`. Consistency makes the directory scannable.

## Project envrc Template

The canonical project envrc lives at:

```text
~/.local/share/chezmoi/dot_envrc.project.example
```

When a new project needs `.envrc`, copy this file into the project root, strip the per-language idioms that don't apply, and `direnv allow`. The portable patterns the file demonstrates (`layout python`, `use fnm`, `PATH_add bin`, `dotenv`, `source_up`) are documented in `setup-devenv`; this skill owns the file itself.

## Apply Loop

After editing any of the above:

```bash
chezmoi diff
chezmoi apply
```

Run `chezmoi diff` first so you can confirm the rendered output matches expectations before overwriting the home directory.

## Gotchas

- **Don't run installers eagerly.** `run_onchange_after_install-*.sh.tmpl` re-runs only when its content changes. If the version pin doesn't change, chezmoi will skip it; this is intentional.
- **No secrets in templates.** Use `manage-secrets` (1Password) or `.env` references. Templated installer scripts end up in git history.
- **Version subdirs over `latest` symlinks.** A `latest` symlink obscures which version a script actually saw.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [urmzd](https://github.com/urmzd)
- **Source:** [urmzd/dotfiles](https://github.com/urmzd/dotfiles)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-urmzd-dotfiles-setup-devenv-with-chezmoi
- Seller: https://agentstack.voostack.com/s/urmzd
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
