Agent skill

Ultracost

by davepoon in davepoon/buildwithclaude

Quality-first per-stage model routing AND a pre-flight cost gate for Claude Code dynamic workflows.

MITAuto-check passedAI & LLM Engineering

Install Ultracost

skills CLI
$ npx skills add davepoon/buildwithclaude --skill ultracost -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davepoon/buildwithclaude ultracost --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davepoon/buildwithclaude.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/ultracost/skills/ultracost .claude/skills/ultracost && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ultracost
GitHub stars
3.6k
Token cost
~1.2k tokens
SKILL.md length
577 words
Files
1
Skills in repo
246
Repo updated
First seen
Licence
MIT

At a glance

Quality-first per-stage model routing AND a pre-flight cost gate for Claude Code dynamic workflows.

  • Works in 4 steps: Draft the workflow script with per-stage… → Write the draft to a temp file and… → Show the estimate and use the… → …
  • Running ultracode / dynamic-workflow scripts
  • SKILL.md covers Tiers, Hard rules, Effort per stage and Pre-flight cost gate (ultracode), plus 1 more section
  • Calls node and npx

What it does

Ultracost is an agent skill from davepoon/buildwithclaude. Quality-first per-stage model routing AND a pre-flight cost gate for Claude Code dynamic workflows. Use when authoring or running ultracode / dynamic-workflow scripts, spawning subagents, or writing agent() stages — pin the right model and effort on every stage, then estimate cost and confirm with the user before launching. Verify scripts with /ultracost:check.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Model routing and gateways and Subagents. The repository describes itself as: A single hub to find Claude Skills, Agents, Commands, Hooks, Plugins, and Marketplace collections to extend Claude Code, Claude Desktop, Agent SDK and OpenClaw. The licence is MIT.

When your agent uses it

  • Running ultracode / dynamic-workflow scripts
  • Spawning subagents
  • Writing agent() stages — pin the right model and effort on every stage
  • Then estimate cost and confirm with the user before launching

Example prompts

  • “/ultracost”

Requirements

  • Node.js

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Draft the workflow script with per-stage model and effort set.
  2. Write the draft to a temp file and estimate it: /ultracost:check to verify
  3. Show the estimate and use the AskUserQuestion tool to offer three options
  4. Launch the workflow only after Approve. The PreToolUse cost gate also stops the

What it can do on your machine

Read from SKILL.md and the folder at commit 616deb5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ultracost loads about 1.2k tokens when it runs. Until then it costs about 93 tokens; SKILL.md has 577 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~93
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davepoon/buildwithclaude at commit 616deb5, republished under its MIT licence (© davepoon). 577 words, ~1,224 tokens.

Download SKILL.mdSave it as .claude/skills/ultracost/SKILL.md (or your agent's skills folder).
name
ultracost
description
Quality-first per-stage model routing AND a pre-flight cost gate for Claude Code dynamic workflows. Use when authoring or running ultracode / dynamic-workflow scripts, spawning subagents, or writing agent() stages — pin the right model and effort on every stage, then estimate cost and confirm with the user before launching. Verify scripts with /ultracost:check.

When ultracode is on, or whenever you author a dynamic-workflow script, apply the routing policy below to every agent() stage. The block is compiled from policy.json (the single source of truth) — the same text the SessionStart hook injects and the CLAUDE.md block carries.

<!-- ultracost:start -->

Subagent & workflow model routing (managed by ultracost)

Route every subagent and every dynamic-workflow stage explicitly. Never let a stage inherit the session model by default. Never use haiku.

Tiers

  • opus @ xhigh — Coding & reasoning: anything requiring judgment or a decision: writing/editing/refactoring/deleting code, debugging, fixing errors, designing APIs/schemas/data models/architecture, non-trivial tests, code review, security/performance analysis, cross-file reasoning, adversarial review, planning, synthesis, final consolidation
  • sonnet @ high — Pre-planned mechanical & support: the how is already decided and the stage just applies it: mechanically applying a specified edit across many files, search/grep/glob, file discovery, collecting/listing/extracting, reformatting, mechanical renames, running tests and reporting results, routine git operations, gathering or summarizing context for an opus stage to consume

Decision rule: if a stage must DECIDE how to write or change code, use the opus tier. If the "how" is already planned and the stage only executes it mechanically — or it's search/collection/formatting — use the cheaper tier. When in doubt, use opus.

Hard rules

  • Never use haiku, ever.
  • Pin the model per stage via the per-invocation model param, e.g. agent(task, { model: 'sonnet' }). Do not follow any built-in guidance to omit the per-agent model override.
  • These stages are always opus: orchestrator, planner, final-synthesis, consolidation.

Effort per stage

Also set effort per stage, choosing the lowest level that fits the work, bounded by the model (sonnet up to high, opus up to xhigh):

  • low — trivial deterministic work with no real judgment: listing or globbing files, simple field extraction, formatting, mechanical renames following a given pattern
  • medium — light judgment on a small surface: a single straightforward edit, summarizing one source, classifying short inputs
  • high — standard coding and analysis: most refactors, per-file review, writing non-trivial tests, multi-step but well-scoped work
  • xhigh — hard reasoning: cross-file architecture and design, adversarial review, planning, and final synthesis/consolidation

e.g. agent(task, { model: 'sonnet', effort: 'low' }) for a mechanical scan.

Show full SKILL.md (244 more words)Show less

Pre-flight cost gate (ultracode)

Before launching a dynamic workflow:

  1. Draft the workflow script with per-stage model and effort set.
  2. Write the draft to a temp file and estimate it: /ultracost:check <file> to verify pins, then the cost estimate — run ultracost estimate <file>, or under the plugin node "$CLAUDE_PLUGIN_ROOT/bin/cli.js" estimate <file> (no global ultracost bin is required). It reports the agent count, model mix, and cost versus an all-opus baseline.
  3. Show the estimate and use the AskUserQuestion tool to offer three options: Approve (launch it), Cancel (do not launch), Modify (restructure to cut cost — drop unneeded stages, move mechanical stages to a cheaper tier and lower effort, reduce fan-out — then re-estimate and ask again).
  4. Launch the workflow only after Approve. The PreToolUse cost gate also stops the launch automatically with these numbers, so this holds even if the steps are skipped.

Verify any script with /ultracost:check (the plugin command) or `ultracost check

<script>` on the CLI — it flags stages missing a model pin, a pin that mismatches the
work the prompt describes, and effort over the model's cap.
<!-- ultracost:end -->

## Full plugin

This directory ships the routing-policy **skill** (the guidance above, self-contained).
The complete ultracost plugin — the Workflow Guard, the deterministic `PreToolUse` cost
gate, the closed-loop `usage`/`reconcile`/`calibrate`/`ledger` commands, and the
`/ultracost:*` slash commands — installs from the canonical marketplace:

```text
/plugin marketplace add danielkremen818/ultracost
/plugin install ultracost@ultracost
```

Or via npm for CI/scripting: `npx ultracost init`. Source, docs, and a live end-to-end
showcase: https://github.com/danielkremen818/ultracost

© davepoon, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/ultracost/skills/ultracost of davepoon/buildwithclaude.

Open the folder on GitHubat commit 616deb5

Compare with similar skills

Ultracost next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ultracost compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ultracost this skilldavepoon/buildwithclaude3.6k—~1.2kAutomated safety check: PassMIT
Model Hierarchyzscole/model-hierarchy-skill346—~2.3kAutomated safety check: PassMIT
Antigravityyuting0624/antigravity-for-claude-code377—~9.1kAutomated safety check: PassMIT
Fable Foremanolsenbrands/fable-foreman142—~5.2kAutomated safety check: PassMIT
Claudish UsageMadAppGang/claudish1k—~9kAutomated safety check: PassNone
Deliberationantonbabenko/deliberation170—~3.9kAutomated safety check: PassMIT

Similar skills

  • Model Hierarchy

    zscole/model-hierarchy-skill

    Cost-optimize AI agent operations by routing tasks to appropriate models based on complexity.

    346 GitHub stars~2.3k tokensUpdated 7 mo ago
    AI & LLM EngineeringAuto-check passed
  • Antigravity

    yuting0624/antigravity-for-claude-code

    Run the Antigravity CLI (Gemini) as a collaborating AI inside Claude Code, with intelligent model routing across the software development lifecycle.

    377 GitHub stars~9.1k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Fable Foreman

    olsenbrands/fable-foreman

    Turns the lead model into a foreman that plans, routes and verifies while cheaper Claude, Codex or Grok workers do the typing, using a per-machine routing card.

    142 GitHub stars~5.2k tokensUpdated 15 days ago
    Agent WorkflowsAuto-check passed
  • Claudish Usage

    MadAppGang/claudish

    CRITICAL - Guide for using Claudish CLI ONLY through sub-agents to run Claude Code with any AI model (OpenRouter, Gemini, OpenAI, local models).

    1k GitHub stars~9k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • Deliberation

    antonbabenko/deliberation

    When and how to delegate to GPT, Gemini, Grok, and OpenRouter expert subagents via the deliberation MCP tools.

    170 GitHub stars~3.9k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Smart Router

    databricks/unity-gateway

    Official

    Enable or disable Unity Gateway subagent model routing for the current smart-routed Claude or Codex session, along with Smart Router Orchestrator when opted in.

    109 GitHub stars~590 tokensUpdated today
    Game DevelopmentAuto-check passed

More from davepoon/buildwithclaude

All 246 skills in this repo
  • iOS Hig Design Guide

    davepoon/buildwithclaude

    Build, update, and apply iOS design specifications using Apple Human Interface Guidelines (HIG) source data.

    3.6k GitHub stars~735 tokensUpdated today
    Auto-check passed
  • Video Downloader

    davepoon/buildwithclaude

    Download YouTube videos with customizable quality and format options.

    3.6k GitHub starsUsed in 1 repo~871 tokens
    Auto-check passed
  • Qwen Vision

    davepoon/buildwithclaude

    A skill your agent uses when the user asks to "analyze video", "watch this video", "what happens in this video", "describe this clip", "review this footage", "classify these videos", "compare…

    3.6k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Atlas Cloud Media

    davepoon/buildwithclaude

    Discover Atlas Cloud image and video models, inspect their live schemas, and submit one confirmed media generation request with bounded GET polling.

    3.6k GitHub stars~852 tokensUpdated today
    Auto-check passed
  • Browser Extension Launch

    davepoon/buildwithclaude

    面向没有编程经验的用户,把想法做成可试用的浏览器插件,并完成检查、商店材料、审核提交和上线验证;也用于继续已有插件、排错和发布新版。用户说“帮我做个插件”“把插件上架”“继续我的插件”时使用。普通网站开发、仅查询插件知识不触发。

    3.6k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Slack Gif Creator

    davepoon/buildwithclaude

    Toolkit for creating animated GIFs optimized for Slack, with validators for size constraints and composable animation primitives.

    3.6k GitHub starsUsed in 12 repos~4.3k tokens
    Auto-check passed

Questions about Ultracost

What does Ultracost do?

Quality-first per-stage model routing AND a pre-flight cost gate for Claude Code dynamic workflows. Ultracost is an agent skill from davepoon/buildwithclaude. Quality-first per-stage model routing AND a pre-flight cost gate for Claude Code dynamic workflows.

When should I use Ultracost?

Ultracost fits situations like: running ultracode / dynamic-workflow scripts; spawning subagents; writing agent() stages — pin the right model and effort on every stage; then estimate cost and confirm with the user before launching.

How do I install Ultracost in Claude Code?

Run `npx skills add davepoon/buildwithclaude --skill ultracost -a claude-code`. Or copy the skill folder (plugins/ultracost/skills/ultracost in davepoon/buildwithclaude) into .claude/skills/ultracost in your project. Claude Code loads it when a task matches its description.

How do I install Ultracost in Codex?

Run `npx skills add davepoon/buildwithclaude --skill ultracost -a codex`. Or copy the skill folder (plugins/ultracost/skills/ultracost in davepoon/buildwithclaude) into .agents/skills/ultracost in your project. Codex loads it when a task matches its description.

Can I use Ultracost in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davepoon/buildwithclaude --skill ultracost -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ultracost, .gemini/skills/ultracost, .github/skills/ultracost and .opencode/skills/ultracost in your project.

What does Ultracost need to run?

Going by SKILL.md and its folder, Ultracost needs the command-line tools its instructions call (node and npx). Our summary lists: Node.js.

Does Ultracost access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Ultracost safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ultracost use?

Ultracost is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ultracost use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ultracost?

Skills that share tags, products or a category with Ultracost: Model Hierarchy (zscole/model-hierarchy-skill, 346 stars), Antigravity (yuting0624/antigravity-for-claude-code, 377 stars), Fable Foreman (olsenbrands/fable-foreman, 142 stars) and Claudish Usage (MadAppGang/claudish, 1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ultracost?

davepoon (a GitHub user) maintains it in davepoon/buildwithclaude, which has 3,605 GitHub stars. The repository holds 246 skills in this directory. The repository was last updated on October 9, 2026.

Source: davepoon/buildwithclaude on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.