cast-lessons

cast-lessons is a skill for Claude Code from codecast-sh/codecast. It costs 85 tokens per session (1,109 once invoked), scanned A, original, MIT.

A team-wide review of corrections made during coding-agent sessions. It groups repeated human feedback into rules, decisions, or documentation.

In plain words
What is it for?
Use it to search session messages, identify recurring corrections, and propose updates to project instructions or shared records.
Why use it?
Corrections otherwise remain scattered across separate conversations, so the same mistake can happen again. It helps distinguish missing guidance from rules that agents already ignore.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to search session messages, identify recurring corrections, and propose updates to project instructions or shared records.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/codecast-sh/codecast/cast-lessons
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.

Any agent
npx skills add codecast-sh/codecast --skill cast-lessons
Clone the repo
git clone --depth 1 https://github.com/codecast-sh/codecast

Made for: Claude Code.

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-lessons

README.md
[![agentmods](https://agentmods.dev/badge/skills/codecast-sh/codecast/cast-lessons/github.svg)](https://agentmods.dev/skills/codecast-sh/codecast/cast-lessons)
Your own site
<a href="https://agentmods.dev/skills/codecast-sh/codecast/cast-lessons"><img src="https://agentmods.dev/badge/skills/codecast-sh/codecast/cast-lessons/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 cast-lessons

Your own site · 80×15
<a href="https://agentmods.dev/skills/codecast-sh/codecast/cast-lessons"><img src="https://agentmods.dev/badge/skills/codecast-sh/codecast/cast-lessons.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,109 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00085 $0.01109
Opus 5.5 $0.00034 $0.00444
Sonnet 5.5 $0.00017 $0.00222
Haiku 4.5 $0.00009 $0.00111

Measured 2d ago against content hash 307dcc4c5e2c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

packages/cli/skills/cast-lessons/SKILL.md · 94 lines

How it starts

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

Every session captures its own corrections at best. Nobody reads the corrections across the team, so the same one is made in ten threads.

Lessons belong to a project (docs/architecture/line-profile.md LP5). Run from the root of the repository whose lessons you are mining, and read its profile first with cast line profile --json: its project is where the signals go, and its principles are the project's own files, which new principles are written into. The clusters are matched against those files and the shared set together; cast goals --json returns both as one text (principles). A repository without a profile is mined the same way against the shared set alone, and its signals carry no project.

Find the corrections

cast search "don't|do not|never|stop|wrong|not like that|instead|revert" -s <window> -n 50
cast search "why did you|I said|again" -s <window> -n 30

The first line's words are REDIRECT_WORDS in packages/shared/contracts/redirectWords.ts, the same words the session insight keeps when it samples a long session.

When mining one project, keep the search to its sessions (add repo:<name> to the query). For each hit, cast read <id> <line> with a few messages of context to see what the agent did and what the human wanted instead. Keep the ones where a human corrected an agent; drop agent to agent messages and corrections that were about a one time misunderstanding.

Cluster

Group by the rule that would have prevented them, not by the words used. Three sessions told to stop rewriting files they did not own are one rule. For each cluster: the rule in one sentence, how many sessions hit it, the short ids, and whether the repository's instructions already say it (read them; a rule that is written and still ignored is a different problem than one that is missing).

Then match each cluster against the shared set and the project's principles files. A cluster is that principle when the principle, as written, would have prevented every correction in it; one that only shares a topic is not. A match is a repeat of a rule the team already holds, and its count belongs to that principle. A cluster with no match, seen in two or more sessions, is a candidate principle: write it as the file writes them (the principle, why it matters, the evidence) under the next free id in its area, in that file's own id scheme, so a project's ids keep its prefix.

Read the full file on GitHub · 94 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 Changed 307dcc4c5e2c
  2. 9d ago Changed · +2 lines 9d09301cf409
  3. 11d ago Changed · +11 lines dee8b38b3d55
  4. 12d ago Changed · +15 lines 61e26e3008a4
  5. 13d ago Changed · +21 lines 512d5cb17950
  6. 1mo ago First seen · 45 lines · 85 tokens per session scan A 0a7b06647136

Subscribe to this mod's changes

cast-lessons is a skill published in the GitHub repository codecast-sh/codecast (40 stars, last pushed today), licensed MIT. It adds 85 tokens to every session and 1,109 once invoked, about $0.0003 per session on Opus 5.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-09-15.