Runs diagnostics for the Gmail Commander plugin: checks the Gmail CLI binary, environment variables, 1Password CLI, token cache, buildBot() contract, and verifies no retired local bot or digest jobs remain.
Ships in gmail-commander. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Run diagnostics for everything this plugin owns on this machine. The Telegram bot and the scheduled digest run in a private Restate deployment on an always-on Mac mini, so their liveness is not checked here — see step 6.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
PLUGIN="$HOME/.claude/plugins/marketplaces/cc-skills/plugins/gmail-commander"
echo "=== 1. Gmail CLI Binary + Lockfile ==="
ls -la "$PLUGIN/scripts/gmail-cli/gmail" 2>/dev/null && echo "OK binary" || echo "MISSING — run: cd scripts/gmail-cli && bun run build"
ls "$PLUGIN/scripts/gmail-cli/bun.lock" >/dev/null 2>&1 && echo "OK lockfile" || echo "MISSING lockfile — the build is not reproducible"
echo ""
echo "=== 2. Environment Variables (interactive CLI) ==="
echo "GMAIL_OP_UUID: ${GMAIL_OP_UUID:+SET}"
echo "OP_SERVICE_ACCOUNT_TOKEN: ${OP_SERVICE_ACCOUNT_TOKEN:+SET} (optional)"
echo ""
echo "=== 3. 1Password CLI ==="
op account list 2>&1 | head -3
echo ""
echo "=== 4. Token Cache (names only, never contents) ==="
ls ~/.claude/tools/gmail-tokens/ 2>/dev/null | grep -E '\.json$' || echo "No cached tokens — first CLI run will open a browser for consent"
echo ""
echo "=== 5. buildBot() contract (what the deployment imports) ==="
if [ -d "$PLUGIN/node_modules" ]; then
(cd "$PLUGIN" && bun -e 'const m = await import("./scripts/bot.ts"); console.log(typeof m.buildBot === "function" ? "OK buildBot exported" : "FAIL buildBot missing")' 2>&1 | tail -1)
else
echo "SKIPPED — plugin node_modules not installed (grep instead):"
grep -c "export async function buildBot" "$PLUGIN/scripts/bot.ts" 2>/dev/null || echo "FAIL buildBot export not found"
fi
echo ""
echo "=== 6. Deployed bot and digest ==="
echo "Not checkable from here. Send /status to the bot in Telegram; if it does not answer, follow the private deployment's runbook."
echo ""
echo "=== 7. Retired local jobs (expected: none) ==="
{ launchctl list 2>/dev/null || systemctl --user list-units --all --no-legend 2>/dev/null; } | grep -F gmail-commander || echo "none loaded" # launchd on macOS, systemd user units on Linux
ls ~/Library/LaunchAgents 2>/dev/null | grep -F gmail-commander || echo "no plists"
pgrep -fl "gmail-commander/scripts/bot.ts" || echo "no local bot process"
Any hit in step 7 is a leftover from the laptop jobs retired on 2026-09-24, or a standalone bot.ts someone started by hand. A local poller competes with the deployed bot for the same Telegram token and produces 409 Conflict on both. Report it to the operator; do not load, unload or kill it yourself.
After this skill completes, check before closing:
Only update if the issue is real and reproducible — not speculative.
What SKILL.md sets; muted values are Claude Code's defaults
haikuThree short reads, in order
/gmail-commander:healthfrom gmail-commander
npx claudepluginhub terrylica/cc-skills --plugin gmail-commander7 skills in this plugin
/bot-process-controlGmail Commander bot and digest process control - they run unattended in a private Restate deployment, never as workstation launchd jobs. Where they run, how to check them, what not to start locally. TRIGGERS - bot start, bot stop, bot restart, bot status, gmail bot down/email-triageGmail Commander email triage - the three-category Haiku prompt and parser in lib/triage.ts, run on demand by the bot's /digest command. The scheduled digest runs in a private deployment with its own implementation. TRIGGERS - email digest, triage emails, digest categories/gmail-accessAccess Gmail via CLI with 1Password OAuth: read, search and export email, and create drafts. Replies quote the sender verbatim as styled blockquotes and can carry file attachments, built and verified in one command. TRIGGERS - gmail, read email, search inbox, export emails, create draft, compose email, reply to email, draft a reply, quote their words, quoted reply, attach a file to a draft.Other plugins' skills for the same job