personal-os-setup: Skill for Claude Code

.claude/skills/chezmoi-scripts/SKILL.md

chezmoi-scripts is a skill for Claude Code from AmineDjeghri/personal-os-setup. It costs 109 tokens per session (2,105 once invoked), scanned B, original, MIT.

A guide to scripts managed by chezmoi, a tool that keeps computer configuration files in sync. It explains when those scripts run during a selected-file sync.

In plain words
What is it for?
Use it to add or debug scripts that run once, after every change, or when a configuration file changes, including scripts for Hyprland or Noctalia.
Why use it?
It explains why a script may not run when a nearby configuration file is selected: the script itself must be included in the targeted sync. This helps diagnose seemingly ignored setup actions.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions AGENTS.md.

This is AmineDjeghri/personal-os-setup's own configuration. It tells Claude Code how to work on personal-os-setup itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything personal-os-setup configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AmineDjeghri/personal-os-setup. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/AmineDjeghri/personal-os-setup/main/.claude/skills/chezmoi-scripts/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/AmineDjeghri/personal-os-setup

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for chezmoi-scripts

README.md
[![agentmods](https://agentmods.dev/badge/skills/aminedjeghri/personal-os-setup/chezmoi-scripts/github.svg)](https://agentmods.dev/skills/aminedjeghri/personal-os-setup/chezmoi-scripts)
Your own site
<a href="https://agentmods.dev/skills/aminedjeghri/personal-os-setup/chezmoi-scripts"><img src="https://agentmods.dev/badge/skills/aminedjeghri/personal-os-setup/chezmoi-scripts/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for chezmoi-scripts

Your own site · 80×15
<a href="https://agentmods.dev/skills/aminedjeghri/personal-os-setup/chezmoi-scripts"><img src="https://agentmods.dev/badge/skills/aminedjeghri/personal-os-setup/chezmoi-scripts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,105 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 20
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Privilege Escalation · line 62
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00109 $0.02105
Opus 5.5 $0.00044 $0.00842
Sonnet 5.5 $0.00022 $0.00421
Haiku 4.5 $0.00011 $0.00211

Measured today against content hash 1c7453c9c306, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

chezmoi-scripts scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

Building (`hyprpm add <repo>`) needs hyprpm's internal `sudo`, which works when run directly but **hangs when chezmoi invokes it** (stranded password prompt in the Logs tab, needing a manual kill). So the script never at
.claude/skills/chezmoi-scripts/SKILL.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

chezmoi script scoping in personal-os-setup

The core gotcha: a targeted chezmoi apply does not run sibling scripts

The "Sync dotfiles" tab's apply selected/diff selected buttons never run a bare chezmoi apply — chezmoi_apply() in tasks/system/chezmoi.py always passes the selected paths as explicit targets: chezmoi apply --force --parent-dirs <target1> <target2> .... A run_/run_once_/run_onchange_ script only executes if its own managed path is in that target list — being in the same directory as a targeted file is not enough:

  • chezmoi apply <only .zshrc> → noctalia/hypr untouched, scripts don't run.
  • chezmoi apply <only noctalia/config.toml> (a sibling of the script in the same dir) → the script still does not run.
  • chezmoi apply <the script's own managed path> → script runs.

Reproduce it against a scratch source dir before relying on the behaviour:

mkdir -p /tmp/t/{home,src/dot_config/x} && cd /tmp/t
echo x > src/dot_config/x/file.txt
printf '#!/bin/bash\necho RAN\n' > src/dot_config/x/run_after_thing.sh
HOME=$PWD/home chezmoi --source $PWD/src apply -v --force --parent-dirs $PWD/home/.config/x/file.txt
# "RAN" does not print -- the script's own path wasn't a target.

Why this matters for the frontend's dotfiles tree

chezmoi_managed_paths() (tasks/system/chezmoi.py) calls chezmoi managed --include=files,scripts,symlinks, so scripts show up as their own selectable leaf entries in the tree (app.py's Tree[DotfileTreeNode]), separate from the config files next to them. Tree-node selection (on_tree_node_selected → data.all_file_paths()) selects every leaf under whichever node you click:

  • Select only noctalia/config.toml and click apply selected → the config applies, but run_after_ensure-noctalia-running.sh.tmpl (a sibling leaf) does not fire.
  • Select the whole noctalia folder → the script leaf is included, so it fires.
  • Same rule for run_after_check-hyprland-plugins.sh.tmpl under hypr.

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +3 lines 1c7453c9c306
  2. 6d ago Changed · -14 lines 9616e8faad0c
  3. 28d ago Changed · +3 lines b0b337e71f57
  4. 1mo ago First seen · 79 lines · 109 tokens per session scan B c183870b46a3

Subscribe to this mod's changes

chezmoi-scripts is a skill published in the GitHub repository AmineDjeghri/personal-os-setup (662 stars, last pushed today), licensed MIT. It adds 109 tokens to every session and 2,105 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.