From gencast
This skill should be used when the user asks to "explain my gencast cost.json", "why did that podcast cost so much", "what made my gencast run expensive", or wants a plain-language breakdown of a gencast cost.json file with optimisation suggestions. Cross-references against `gencast estimate` predictions when the original notebook is available.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gencast:cost-explainThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Read a gencast `cost.json` and translate it into a plain-language breakdown of where the money went, plus concrete optimisations. Compares predicted vs actual cost when the original notebook is also provided.
Read a gencast cost.json and translate it into a plain-language breakdown of where the money went, plus concrete optimisations. Compares predicted vs actual cost when the original notebook is also provided.
The rate table below is injected at skill-load time:
gencast estimate --rates-only --json 2>/dev/null | jq -r 'to_entries[] | "- **\(.key)**: $\(.value.input_per_1k * 1)/1k in, $\(.value.output_per_1k * 1)/1k out"' || echo "(gencast not installed or --rates-only failed)"
Version check (need gencast>=1.2.0): !gencast --version 2>/dev/null | python3 -c "import sys,re; v=sys.stdin.read().strip(); m=re.search(r'(\d+)\.(\d+)', v); sys.exit(1) if not v else print(v if m and (int(m[1]),int(m[2]))>=(1,2) else f'TOO OLD: need gencast>=1.2.0, found {v} — run: pipx upgrade gencast')" 2>/dev/null || echo "MISSING — install with: pipx install gencast"
cost.json file produced by gencast generate. Located at <output_dir>/<notebook_name>.cost.json.notebook.yaml (lets the skill compare predicted vs actual via gencast estimate).Read cost.json. Validate it has the expected schema:
total_usd: float and stages: [...] or stages: {name: {...}}{name|kind: str, model: str, usd: float, ...} (or compatible)
If the schema does not match, stop and tell the user this does not look like a gencast cost.json.Compute proportions. For each stage, calculate (stage_usd / total_usd) * 100. Order stages by descending USD.
If the original notebook is available, predict vs actual.
gencast estimate <NB.yaml> --json
Parse total_usd from the prediction. Compute delta % against actual. Print: "Predicted $X, actual $Y (delta Z%)."
Plain-language breakdown. Walk top-3 most-expensive stages:
Suggest optimisations. From the rate table above + the cost breakdown:
num_segments was high in the notebook (visible in cost.json's per-segment count) → suggest 4–6 instead.tts-1-hd was used → suggest tts-1 for 50% TTS savings.--cache-llm flag. If multiple runs of the same notebook are likely → enable LLM cache.Output format. 5–8 lines of prose, optionally followed by a 3-bullet "what to try next" list.
litellm.model_cost, the same source gencast uses at runtime).gencast generate automatically. This skill is post-mortem only.npx claudepluginhub cadrianmae/gencast --plugin gencastCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.