shell-sync-setup

A setup command that installs a shell-startup checker for chezmoi, a tool that manages configuration files across computers.

In plain words
What is it for?
Use it to install the checker in plain zsh, oh-my-zsh, or Powerlevel10k environments and keep it updated through the plugin update command.
Why use it?
It makes remote updates and local changes visible when a zsh shell starts, while only showing the message when the prompt is otherwise empty.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/signalcompose/claude-tools/shell-sync-setup
Clone the repo
git clone --depth 1 https://github.com/signalcompose/claude-tools
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,446 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00011 $0.02446
Opus 5 $0.00005 $0.01223
Sonnet 5 $0.00002 $0.00489
Haiku 4.5 $0.00001 $0.00245

Measured 2d ago against content hash da73786a94ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

shell-sync-setup scanned grade A with 0 findings 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 2d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/chezmoi/commands/shell-sync-setup.md · 332 lines

How it starts

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

Chezmoi Shell Sync Checker Setup

Overview

Installs an interactive dotfiles sync checker that runs on shell startup.

Capabilities:

  • Detects remote updates and local changes at shell startup
  • Compatible with all zsh environments (plain zsh, oh-my-zsh, Powerlevel10k)
  • Non-intrusive: Only shows status on empty Enter press
  • Auto-updates via /plugin update

Use when: "set up shell sync", "install chezmoi checker", "enable startup check", "シェル同期チェッカー設定", "起動時チェック設定", "自動同期チェック"

Don't use for: Syncing dotfiles, committing changes, checking status

Features & Architecture

Features

  • Checks for remote updates and local changes at shell startup
  • Compatible with all zsh environments (plain zsh, oh-my-zsh, Powerlevel10k)
  • Non-intrusive: Only shows status on empty Enter press
  • Auto-updates via /plugin update (external script approach)

Architecture

Uses a minimal loader approach:

zshrc (7 lines)          External script (~150 lines)
┌─────────────────┐      ┌────────────────────────────────────────────┐
│ Loader snippet  │ ───► │ ~/.claude/plugins/.../shell-check.zsh     │
│ (source if      │      │ (auto-updated via /plugin update)         │
│  file exists)   │      └────────────────────────────────────────────┘
└─────────────────┘

Execution

Follow the 3 steps sequentially. Read the Reference sections for detailed instructions.

Step 1: Environment Detection & Migration Check

Detect environment and check for existing installation (see Reference below).

Step 2: Installation

Install the loader code into zshrc (see Reference below).

Step 3: Verification

Verify installation and troubleshoot if needed (see Reference below).

Reference: Environment Detection & Migration Check

Phase 1: Environment Detection

echo "🔍 Detecting environment..."
echo ""

SETUP_READY=true

# Check if zsh
if [[ -n "$ZSH_VERSION" ]]; then
  echo "✅ Shell: zsh $ZSH_VERSION"
else
  echo "❌ Shell: Not zsh (this setup requires zsh)"
  SETUP_READY=false
fi

# Check chezmoi
if command -v chezmoi &>/dev/null; then
  echo "✅ chezmoi: $(chezmoi --version 2>&1 | head -1)"
else
  echo "❌ chezmoi: Not installed"
  echo "   Install with: brew install chezmoi"
  SETUP_READY=false
fi

# Detect zshrc location
ZSHRC_SOURCE=""
if [[ -f ~/.local/share/chezmoi/dot_zshrc ]]; then
  ZSHRC_SOURCE="$HOME/.local/share/chezmoi/dot_zshrc"
  echo "✅ zshrc source: chezmoi managed (dot_zshrc)"
elif [[ -f ~/.zshrc ]]; then
  ZSHRC_SOURCE="$HOME/.zshrc"
  echo "⚠️ zshrc source: ~/.zshrc (not chezmoi managed)"
else
  echo "❌ No zshrc found"
  SETUP_READY=false
fi

# Check external script availability
_s=(~/.claude/plugins/cache/claude-tools/chezmoi/*/scripts/shell-check.zsh(N.om))
if (( ${#_s} )); then
  echo "✅ External script: Found (${_s[1]})"
else
  echo "⚠️ External script: Not found in plugin cache"
  echo "   Make sure chezmoi plugin is installed from claude-tools marketplace"
fi

echo ""
echo "📋 Summary:"
echo "   Source file: $ZSHRC_SOURCE"
echo "   Ready:       $SETUP_READY"

Read the full file on GitHub · 332 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. 2d ago First seen · 332 lines · 11 tokens per session scan A da73786a94ff

Subscribe to this mod's changes

shell-sync-setup is a command published in the GitHub repository signalcompose/claude-tools (4 stars, last pushed 5d ago), licensed MIT. It adds 11 tokens to every session and 2,446 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.