diag

diag is a command for Claude Code from CallMeTechie/fleet-manager. It costs 25 tokens per session (792 once invoked), scanned B, original, MIT.

A diagnostic command for a remote server that checks SSH access, passwordless sudo, Docker, disk usage, and system load. SSH is the secure connection method used to log in to the server.

In plain words
What is it for?
Use it when onboarding a server or troubleshooting access, permissions, Docker installation, storage space, or high system load.
Why use it?
It helps identify whether a server connection or required system setup is preventing other commands from working.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the fleet-manager plugin — 1 skill, 17 commands, 1 agent shipped together

Good fit Use it when onboarding a server or troubleshooting access, permissions, Docker installation, storage space, or high system load.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add CallMeTechie/fleet-manager
Claude Code
/plugin install fleet-manager

Made for: Claude Code.

Or install fleet-manager, the plugin that ships this one along with the rest of its 1 skill, 17 commands, 1 agent.

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 diag

README.md
[![agentmods](https://agentmods.dev/badge/commands/callmetechie/fleet-manager/diag/github.svg)](https://agentmods.dev/commands/callmetechie/fleet-manager/diag)
Your own site
<a href="https://agentmods.dev/commands/callmetechie/fleet-manager/diag"><img src="https://agentmods.dev/badge/commands/callmetechie/fleet-manager/diag/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 diag

Your own site · 80×15
<a href="https://agentmods.dev/commands/callmetechie/fleet-manager/diag"><img src="https://agentmods.dev/badge/commands/callmetechie/fleet-manager/diag.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 792 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.
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.00025 $0.00792
Opus 5.5 $0.00010 $0.00317
Sonnet 5.5 $0.00005 $0.00158
Haiku 4.5 $0.00003 $0.00079

Measured 3mo ago against content hash d864f806ebaa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

diag 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 3mo 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.

Asks for rootmediumPrivilege escalation

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

# 2. Passwordless sudo if "${FM_SSH[@]}" "sudo -n true 2>/dev/null"; then
plugin/commands/diag.md · 73 lines

What it actually says

Diag

set -euo pipefail
source "${CLAUDE_PLUGIN_ROOT:-plugin}/commands/_fleet-lib.sh"

NAME="$(resolve_server "$(printf '%s' "$ARGUMENTS" | tr -d '[:space:]')")"
build_ssh "$NAME"
echo_target "$NAME"
echo "── Diagnostics ──"

# 1. SSH reachability
if "${FM_SSH[@]}" "echo OK" 2>/dev/null | grep -qx OK; then
  echo "PASS  SSH reachable"
else
  echo "FAIL  SSH unreachable — run /setup-ssh $NAME (key not deployed?), check port/host."
  exit 1
fi

# 2. Passwordless sudo
if "${FM_SSH[@]}" "sudo -n true 2>/dev/null"; then
  echo "PASS  passwordless sudo available"
else
  echo "WARN  no passwordless sudo (privileged ops need a NOPASSWD sudoers drop-in)"
fi

# 3. Docker presence + working invocation (probe order: no-sudo, sudo, abs paths)
DOCKER_CMD=""
for cand in "docker" "sudo -n docker" "sudo -n /usr/local/bin/docker" "/usr/local/bin/docker"; do
  if "${FM_SSH[@]}" "$cand info --format '{{.ServerVersion}}' 2>/dev/null" | grep -q '^[0-9][0-9]*\.[0-9]'; then
    DOCKER_CMD="$cand"; break
  fi
done
if [ -n "$DOCKER_CMD" ]; then
  echo "PASS  docker present (via: $DOCKER_CMD)"
else
  echo "WARN  docker not found (Phase 2 compose features unavailable)"
fi

# 4. Disk usage (root fs) — capture first so a transient SSH error here does NOT
#    abort the whole command under `set -e`/`pipefail` after step 1 passed (C1).
if disk_out="$("${FM_SSH[@]}" "df -h / | tail -1" 2>/dev/null)"; then
  printf '%s\n' "$disk_out" | awk '{print "INFO  disk / used "$5" ("$3"/"$2")"}'
else
  echo "WARN  disk query failed (transient SSH error?)"
fi

# 5. Load
if up_out="$("${FM_SSH[@]}" "uptime" 2>/dev/null)"; then
  printf '%s\n' "$up_out" | sed 's/^/INFO  /'
else
  echo "WARN  uptime query failed"
fi

After printing, update the Discovered State section and the UTC Last Updated line of context/servers/<name>.md (use the lib's sanitize_value on stored values). Also persist the docker probe: set docker_available to yes/no and docker_cmd to $DOCKER_CMD (or _not configured_). Lazy migration for pre-Phase-2 profiles that lack the docker_cmd line — insert it after - docker_available::

if ! grep -q '^- docker_cmd:' "$PROFILE"; then
  TMP_P="$(mktemp)"
  awk '/^- docker_available:/ { print; print "- docker_cmd: _not configured_"; next } { print }' "$PROFILE" > "$TMP_P" && mv "$TMP_P" "$PROFILE"
fi
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. 3mo ago First seen · 73 lines · 25 tokens per session scan B d864f806ebaa

Subscribe to this mod's changes

diag is a command published in the GitHub repository CallMeTechie/fleet-manager (1 stars, last pushed 3mo ago), licensed MIT. It adds 25 tokens to every session and 792 once invoked, about $0.0001 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-31.

Related

diag compared with commands from other repositories

diag next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
diagCallMeTechie/fleet-managerCommand13mo agoMITB25Claude Code
marina-serverThe-Focus-AI/marina-skillCommand29mo agononeA15Claude Code
marina-statusThe-Focus-AI/marina-skillCommand29mo agononeA14Claude Code
platformgotempsh/tempsCommand953todayApache-2.0A0Claude Code
deliverygotempsh/tempsCommand953todayApache-2.0A0Claude Code
tunnelsgotempsh/tempsCommand953todayApache-2.0A0Claude Code
delivery-profilesgotempsh/tempsCommand953todayApache-2.0A0Claude Code