kit-health

kit-health is a command for coding agents from dwarvesf/dwarves-kit. It costs 27 tokens per session (3,637 once invoked), scanned B, original, MIT.

A self-check for the kit installation and its supporting files. It examines things such as file count, hook performance, source citations, configuration validity, and other structural checks.

In plain words
What is it for?
Use it to assess whether the kit is installed correctly and whether its own files and reporting systems remain healthy.
Why use it?
It helps reveal stale installations, broken checks, missing executable files, or drift between recorded data and the tools that read it.

Command

Part of the kit plugin — 11 skills, 38 commands, 30 agents, 10 hooks shipped together

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/dwarvesf/dwarves-kit/kit-health
Clone the repo
git clone --depth 1 https://github.com/dwarvesf/dwarves-kit

Or install kit, the plugin that ships this one along with the rest of its 11 skills, 38 commands, 30 agents, 10 hooks.

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 kit-health

README.md
[![agentmods](https://agentmods.dev/badge/commands/dwarvesf/dwarves-kit/kit-health.svg)](https://agentmods.dev/commands/dwarvesf/dwarves-kit/kit-health)
Your own site
<a href="https://agentmods.dev/commands/dwarvesf/dwarves-kit/kit-health"><img src="https://agentmods.dev/badge/commands/dwarvesf/dwarves-kit/kit-health.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,637 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.1 $0.00027 $0.03637
Opus 5 $0.00014 $0.01818
Sonnet 5 $0.00005 $0.00727
Haiku 4.5 $0.00003 $0.00364

Measured 5d ago against content hash ad228df0b43f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade B, and why

kit-health 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 5d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

echo "Files: $(find ~/.claude/dwarves-kit -type f | grep -v '.git/' | wc -l)"
commands/kit-health.md · 192 lines

How it starts

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

You are running a health check on the dwarves-kit installation. This command evaluates the kit against its own design principles from PHILOSOPHY.md.

Process

Step 1: Run automated checks

Include the install-staleness probe (SPEC-066): if ~/.claude/dwarves-kit/INSTALL-STAMP exists, compare its sha= against git rev-parse --short HEAD of the kit repo; a mismatch means the pinned install predates the checkout: report "stale install; re-run install.sh" (advisory). No stamp + symlinked hooks = a pre-SPEC-066 install; recommend re-running install.sh to pin.

Include the lane-telemetry probe (SPEC-061): bash lib/telemetry/lane-telemetry.sh report must exit 0 and print either aggregates or (no run ledgers); a parse failure means the ledger format and the reader have drifted apart.

Execute these checks and collect results:

# 1. File count
echo "Files: $(find ~/.claude/dwarves-kit -type f | grep -v '.git/' | wc -l)"

# 2. Hook executability
for f in ~/.claude/dwarves-kit/hooks/*.sh; do
  [ -x "$f" ] && echo "  [ok] $(basename $f)" || echo "  [FAIL] $(basename $f) not executable"
done

# 3. Settings.json validity
jq . ~/.claude/dwarves-kit/settings.json >/dev/null 2>&1 && echo "settings.json: valid" || echo "settings.json: INVALID"

# 4. All hooks in settings.json point to files that exist
jq -r '[.hooks | to_entries[] | .value[] | .hooks[] | .command] | .[]' ~/.claude/dwarves-kit/settings.json | while read cmd; do
  SCRIPT=$(echo "$cmd" | sed "s|bash \$HOME|bash $HOME|" | awk '{print $2}')
  SCRIPT=$(eval echo "$SCRIPT")
  [ -f "$SCRIPT" ] && echo "  [ok] $SCRIPT" || echo "  [MISSING] $SCRIPT"
done

# 5. Hook performance (time each one with sample input)
for f in ~/.claude/dwarves-kit/hooks/*.sh; do
  NAME=$(basename "$f")
  case "$NAME" in
    anti-rationalization.sh)
      INPUT='{"stop_hook_active":false,"assistant_response":"test response"}';;
    safety-gate.sh|spec-drift-guard.sh)
      INPUT='{"tool_input":{"command":"ls","file_path":"test.ts"}}';;
    permission-auto-approve.sh)
      INPUT='{"tool_name":"Bash","tool_input":{"command":"ls"}}';;
    slop-cleaner.sh)
      INPUT='{"stop_hook_active":false,"assistant_response":"done"}';;
    *)
      INPUT='{}';;
  esac
  ELAPSED=$( { time echo "$INPUT" | bash "$f" >/dev/null 2>&1; } 2>&1 | grep real | awk '{print $2}')
  echo "  $NAME: $ELAPSED"
done

# 6. No compiled binaries
BINS=$(find ~/.claude/dwarves-kit -type f \( -name "*.exe" -o -name "*.bin" -o -name "*.so" -o -name "*.dylib" \) | wc -l | tr -d ' ')
echo "Compiled binaries: $BINS"

# 7. Every command has a description in YAML frontmatter
for f in ~/.claude/dwarves-kit/commands/*.md; do
  DESC=$(grep '^description:' "$f" | head -1)
  [ -n "$DESC" ] && echo "  [ok] $(basename $f)" || echo "  [MISSING] $(basename $f) has no description"
done

# 8. Hook logs exist and show recent activity
LOG_DIR="$HOME/.claude/dwarves-kit/logs"
if [ -d "$LOG_DIR" ]; then
  for f in "$LOG_DIR"/*.log; do
    [ -f "$f" ] || continue
    LINES=$(wc -l < "$f" | tr -d ' ')
    LAST=$(tail -1 "$f" | cut -d'|' -f1 | tr -d ' ')
    echo "  $(basename $f): $LINES entries, last: $LAST"
  done
else
  echo "  No log directory yet (hooks haven't fired)"
fi

# 9. Source citations in README credits
CREDITS=$(sed -n '/## Credits/,/## /p' ~/.claude/dwarves-kit/README.md | grep -c '\[')
echo "Source citations in README: $CREDITS"

# 10. TODOs/FIXMEs in hook scripts
TODOS=$(grep -r "TODO\|FIXME" ~/.claude/dwarves-kit/hooks/ 2>/dev/null | wc -l | tr -d ' ')
echo "TODOs/FIXMEs in hooks: $TODOS"

# 11. Release hygiene: a phantom version cut (VERSION names an untagged version)
# Repo-scoped: reads the repo's .git + VERSION via the current working dir (git
# tags + CHANGELOG live in the repo, not the installed copy under ~/.claude). The
# guard degrades to a no-op outside a git repo / without VERSION, never errors.
if [ -f VERSION ] && git rev-parse --git-dir >/dev/null 2>&1; then
  VER=$(tr -d '[:space:]' < VERSION)
  # CHANGELOG resolution (SPEC-185): docs/CHANGELOG.md wins if present, else root CHANGELOG.md.
  CL=CHANGELOG.md; [ -f docs/CHANGELOG.md ] && CL=docs/CHANGELOG.md
  if [ -n "$VER" ] && [ -z "$(git tag -l "v$VER")" ]; then
    echo "  [WARN] release hygiene: VERSION is $VER but tag v$VER does not exist (phantom cut)"
    # Accumulation context: [Unreleased] NON-empty => work piling above an untagged cut (same awk as ship.md, DEC-006).
    if [ -f "$CL" ] && awk '/## \[Unreleased\]/{f=1;next} /^## /{f=0} f && NF{print}' "$CL" | grep -q .; then
      echo "         and CHANGELOG [Unreleased] is accumulating above it"
    fi
  else
    echo "  release hygiene: ok (v$VER tagged, or clean)"
  fi
else
  echo "  release hygiene: skipped (not in the kit repo / no VERSION)"
fi

Read the full file on GitHub · 192 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. 5d ago First seen · 192 lines · 27 tokens per session scan B ad228df0b43f

Subscribe to this mod's changes

kit-health is a command published in the GitHub repository dwarvesf/dwarves-kit (11 stars, last pushed 2d ago), licensed MIT. It adds 27 tokens to every session and 3,637 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.