cast-debug

A diagnostic procedure for finding why a Cast agent or Cast server did or did not produce an expected result. Cast is a system that runs agents and routes messages between them.

In plain words
What is it for?
Use it to investigate missing replies, unexpected tool calls, undelivered messages, container-start failures, gateway problems, agent-runner errors, and host-server issues.
Why use it?
It traces the problem through the relevant records and logs, helping separate agent behavior problems from message-delivery or server failures.

Skill for Claude CodeCodex

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 skills/yaodub/cast/cast-debug
Any agent
npx skills add yaodub/cast --skill cast-debug
Clone the repo
git clone --depth 1 https://github.com/yaodub/cast

Made for: Claude Code, Codex.

Per session 138 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,056 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.00138 $0.02056
Opus 5 $0.00069 $0.01028
Sonnet 5 $0.00028 $0.00411
Haiku 4.5 $0.00014 $0.00206

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

Security

Grade A, and why

cast-debug 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.

.claude/skills/cast-debug/SKILL.md · 95 lines

How it starts

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

Cast — diagnosis

You are Claude Code in Cast's debugging lane. The operator wants you to figure out why something happened (or didn't). Read first; don't propose fixes until the cause is named.

Scope

Argument: <folder> (optional).

  • With folder → focus on one agent. Read its state/, home/, sessions/ first; consult the gateway and host server logs second.
  • Without folder → server-scope problem. The gateway, host logs, and code under packages/cast/ are the primary read surface.

If the user's question doesn't make either scope obvious, ask which agent (or "across the fleet") before diving in.

Two audiences, same read surface

Most debug sessions fall into one of two shapes. The read surface is the same; the question filters which layer you read first.

Question shape Read first Then
Agent misbehavior — "why did the agent say X?" / "why did it call tool Y with those args?" / "why didn't it produce output?" Session transcript, agent-runner debug log, agent.db message_log Gateway DB (only if delivery is also in question), host logs (for ACL blocks or lifecycle events)
Cast-server / pipeline — "why isn't this message arriving?" / "the container won't start" / "ACL is rejecting something it shouldn't" / "the scheduler isn't firing" Gateway DB, host server logs, packages/cast/src/... source agent.db, agent-runner log (only after pipeline cause is ruled out)

Don't pick one and stick to it. The cause often crosses the boundary — an agent that produces no output (misbehavior) might be reacting to an unexpected stdin-message piped in by a self-loop (pipeline).

Read this first — authoritative

packages/cast/manuals/dev/debugging.md is the reference for this skill. It covers:

  • The full message lifecycle (transport → gateway → bus → manager → conversation → container → SDK → output → transport).
  • Delivery semantics (at-most-once, fire-and-forget, the abnormal-exit retry loop).
  • Where to look, ordered by usefulness (gateway DB, agent message log, host logs, agent-runner debug log, session transcripts, scheduled tasks).
  • The cross-check matrix ("did the agent spawn with my new mount?", "did the ACL block the reply?", etc.).
  • Common scenarios (no response, wrong output, intermediate leaks, scheduled task fires but content missing, lifecycle messages, container tool failures, SDK turn never completes, cross-agent request/response issues).
  • The reset patterns (forcing a fresh session without restarting the server).
  • The bug-report format — the mechanism-as-proof standard, environment block, redaction discipline, and template — for filing a Cast software defect upstream.
  • File locations and log levels.

Read the full file on GitHub · 95 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 · 95 lines · 138 tokens per session scan A 8971c0cf1d62

Subscribe to this mod's changes

cast-debug is a skill published in the GitHub repository yaodub/cast (41 stars, last pushed 10d ago), licensed MIT. It adds 138 tokens to every session and 2,056 once invoked, about $0.0007 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-30.

Related

Other skills, from other repositories

agent-self-scheduling

Schedule AI agent runs with cron, loops, or external clocks while avoiding unsafe tight autonomous timers.

sickn33/agentic-awesome-skills · 24 tokens

semantix

Install and use the semantix memory kernel as a middleware in your agent: extract user preferences / workflows / experience from past sessions, retrieve and inject them on demand. One binary + your agent's own tools.

Gnosil/semantix · 47 tokens

semantix-guide

Troubleshoot and configure Semantix capabilities: Skills (project/custom/global/builtin priority, discovery dirs), Commands (override order, /dir:file naming), Hooks (11 events, automatic project loading, matchers, timeouts), MCP (semantix-agent.toml + .mcp.json + plugin packages, autostart), plugin packages…

Gnosil/semantix · 115 tokens

rn-device-control

This skill should be used when the user asks to "control the simulator", "take a screenshot", "boot the emulator", "install the app", "read UI hierarchy", "manage device state", "open a deep link", "grant permissions", "stream native logs", "disable animations", "change device locale", or needs guidance on xcrun…

Lykhoyda/rn-dev-agent · 98 tokens

rn-feature-development

This skill should be used when building any new feature in a React Native or Expo app, or when the /rn-dev-agent:rn-feature-dev command runs. Triggers on "build a feature", "add X to the app", "implement Y", "create a new screen", "rn-feature-dev", "feature development", "build me X", "add a screen", "wire up this…

Lykhoyda/rn-dev-agent · 86 tokens

rn-testing

This skill should be used when the user asks to "write a Maestro test", "create E2E flows", "add testIDs", "run UI tests", "run E2E tests", "verify a feature works", "test my screen", "set up maestro-runner", "mock network requests", "inspect store state", "write test assertions", or needs guidance on test timing…

Lykhoyda/rn-dev-agent · 106 tokens