agentleFS
alunduilalunduil/alunduil-chezmoi/.claude/skills/add-tool/SKILL.md

add-tool

Skill2 starsChanged 2 months ago0BSDView on GitHub

Decide where a new tool slots into the chezmoi bootstrap and README. Use when adding a CLI/binary to the host bootstrap so it lands in the right install pass and the right README block. Routes auth-required tools to "Interactive logins" and fire-and-forget binaries to "PATH check".

  • Installs packages

10 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All passes live under .chezmoiscripts/.

    line 41
  2. Very specific:

    Add an entry to .chezmoiexternal.toml, mirroring vale or lazygit.

    line 75
  3. Distinctive:

    Write the literal release URL, version included wherever the asset name repeats it:

    line 76
  4. Distinctive:

    Run sensors before claiming done:

    line 106

“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Add a tool to bootstrap

First check the tool belongs on the host, then make two decisions independently.

Libraries with no console script

uv tool install needs an executable, so a PyPI library takes one of two shapes:

  1. An installed tool imports it (plugins, optional backends): add it as a pinned --with extra on that tool, as beets carries pyacoustid.
  2. Otherwise, keep it off the host. The caller runs uv run --with <pkg>==<version> <script> and owns the pin. Stop here: no bootstrap change, no README line.

Install a CLI front-end that wraps the library only when its command is itself wanted.

Auth axis

Does the tool need interactive auth (login, browser flow, API token) to do real work?

  • Yes (gh, claude, gcx, readwise, tailscale): list in README "Interactive logins" with a config-path comment so a fresh-host bootstrap surfaces where state lands. No PATH-check line — running the login command itself proves reachability. Auth state is runtime, never managed by chezmoi.
  • No (zellij, lazygit, act, gh-poi): list in README "PATH check" line.

Install mechanism

All passes live under .chezmoiscripts/.

Pick the canonical installer for the ecosystem:

SourceWherePattern
Debian package.chezmoidata/packages.yamlappend to packages.apt
Pinned binary release.chezmoiexternal.tomlexternal entry below
npm packagerun_before_03npm install -g, command -v
Cargo craterun_before_09cargo install, command -v
gh extensionrun_before_05gh extension install --pin
PyPI packagerun_after_install-via-externalsmirror the beets block

A release binary that needs more than a download (signature check, source build) gets a script/install/<tool> script, called from run_before_02 instead; mirror script/install/signal-cli.

Auth and install axes are independent: gcx is auth-required and a chezmoi external; gh-poi is fire-and-forget and uses gh extension install.

Pin the version

Annotate each *_VERSION pin on the line directly above it:

SourceAnnotation
Script-installed tool# renovate: datasource=github-releases depName=<owner>/<tool>
PyPI package# renovate: datasource=pypi depName=<pkg>, one per --with extra too

An external needs no annotation: its version lives in the download URL.

External entry

Add an entry to .chezmoiexternal.toml, mirroring vale or lazygit. Write the literal release URL, version included wherever the asset name repeats it:

[".local/bin/<tool>"]
    type = "archive-file"
    url = "https://github.com/<owner>/<tool>/releases/download/vX.Y.Z/<tool>_X.Y.Z_<arch>.tar.gz"
    path = "<tool>"
    executable = true

Renovate bumps every copy of the version in the URL. Use type = "file" for a raw binary asset. A release asset carries no checksum (ADR 0008); a GitHub source-archive tarball (archive/refs/tags/…) pins checksum.sha256.

A pass that runs the new binary is run_after_, since externals deploy during apply.

Procedure

  1. For a library with no console script, settle its shape first; stop if it stays off the host.
  2. Identify the auth axis and install mechanism.
  3. Wire the installer into the right .chezmoiscripts/ pass, or add the external entry.
  4. Update README:
    • Auth-required → add to "Interactive logins" with config-path comment
    • Fire-and-forget → add to "PATH check" line
  5. Annotate every pin per Pin the version.
  6. Run sensors before claiming done:

    pre-commit run --all-files
    bats --recursive dot_local dot_claude script
    script/checks/chezmoi-apply

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.