cast-refine

cast-refine is a skill for Claude Code, Codex from yaodub/cast. It costs 92 tokens per session (1,497 once invoked), scanned A, original, MIT.

A review procedure for improving a Cast agent after it has accumulated real operating history. It compares the agent’s original design with its current behavior, memory, and operator actions, then produces dated improvement proposals.

In plain words
What is it for?
Use it to review one agent or an entire Cast fleet, assess usage and operator burden, examine memory and capability fit, and propose refinements without applying them automatically.
Why use it?
It helps identify drift, recurring friction, unused capabilities, and role overlaps before anyone changes the agent’s configuration.

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

Made for: Claude Code, Codex.

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 cast-refine

README.md
[![agentmods](https://agentmods.dev/badge/skills/yaodub/cast/cast-refine.svg)](https://agentmods.dev/skills/yaodub/cast/cast-refine)
Your own site
<a href="https://agentmods.dev/skills/yaodub/cast/cast-refine"><img src="https://agentmods.dev/badge/skills/yaodub/cast/cast-refine.svg" alt="Measured on agentmods" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,497 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.1 $0.00092 $0.01497
Opus 5 $0.00046 $0.00749
Sonnet 5 $0.00018 $0.00299
Haiku 4.5 $0.00009 $0.00150

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

Security

Grade A, and why

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

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-refine/SKILL.md · 73 lines

How it starts

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

Cast — introspection-driven refinement

You are Claude Code in Cast's introspection lane. The operator wants an outside read on what one of their agents has become — composed against what it was designed to be. The output is proposals; implementation happens separately.

Scope

Argument: <folder> (optional).

  • With folder → per-agent introspection. Anchor at $CAST_AGENTS_DIR/<folder>/ (default ~/.cast/agents/<folder>/).
  • Without folder → server-scope introspection. The unit of analysis becomes the fleet — how agents relate, where roles overlap, where the composition is right or wrong. See agent-introspection.md § Server scope.

Read this first — authoritative

packages/cast/manuals/dev/agent-introspection.md is the method spec for this skill. Read it before doing anything else. It defines:

  • The five disciplines (ask first, evidence-cite per proposal, bias toward sharpening, propose-don't-apply, mechanical-as-evidence-layer).
  • The eight lenses (usage shape, operator burden, identity coherence, capability fit, composition, memory architecture, subtraction candidates, adjacent moves).
  • The read surface (intent / behavior / memory / operator state) and where each lives on disk.
  • The session flow (scope and intent → survey pass → aspirational reading → proposal generation → operator dialogue → write artifact).
  • The output artifact: per-agent at $CAST_AGENTS_DIR/<folder>/introspection/<YYYY-MM-DD>.md, server-scope at $CAST_CONFIG_DIR/../introspection/<YYYY-MM-DD>.md.

Don't restate the method here at runtime — defer to that doc. Treat the bullets below as reminders, not as the spec.

Supporting reading

Only fetch when the introspection points at them:

  • packages/cast/manuals/MODES.md — the trust model. Read if you're unsure what advanced mode lets you do vs. what consoles do.
  • packages/cast/manuals/console/design/primitives.md — vocabulary for proposals (channels, lifecycle, ACL bits, mounts, push/watch/schedule/memory). Use this when phrasing what a compose or add move would look like.
  • packages/cast/manuals/console/design/recipes/nightly-reflection.md — the agent-side counterpart to introspection. If the agent doesn't already have a reflection cadence, this is the recipe to propose.
  • packages/cast/manuals/console/design/multi-agent-composition.md — when a compose proposal involves splitting the agent or pairing it with a peer.
  • packages/cast/manuals/dev/agent-architecture.md — folder anatomy if you need to look up which directory contains what.

Read the full file on GitHub · 73 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 · 73 lines · 92 tokens per session scan A 31a45f6d6167

Subscribe to this mod's changes

cast-refine is a skill published in the GitHub repository yaodub/cast (41 stars, last pushed 13d ago), licensed MIT. It adds 92 tokens to every session and 1,497 once invoked, about $0.0005 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.