Agent skill

Utility

by athola in athola/claude-night-market

Scores agent actions by expected gain, cost, uncertainty, and redundancy.

MITAuto-check passed

Install Utility

skills CLI
$ npx skills add athola/claude-night-market --skill utility -a claude-code

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

GitHub CLI
$ gh skill install athola/claude-night-market utility --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/athola/claude-night-market.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/leyline/skills/utility .claude/skills/utility && 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
utility
GitHub stars
342
Token cost
~1.2k tokens
SKILL.md length
455 words
Files
8
Skills in repo
160
Repo updated
First seen
Licence
MIT

At a glance

Scores agent actions by expected gain, cost, uncertainty, and redundancy.

  • Works in 4 steps: Construct state: gather task context per → Score candidates: evaluate each action… → Prefer highest utility: select the… → …
  • Deciding whether to dispatch an agent
  • SKILL.md covers Overview, When To Use, When NOT to Use and Action Space, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Utility is an agent skill from athola/claude-night-market. Scores agent actions by expected gain, cost, uncertainty, and redundancy. Use when deciding whether to dispatch an agent or invoke a tool.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files (for example `modules/action-selector.md`, `modules/gain.md` and `modules/integration.md`).

The repository describes itself as: 23 Claude Code plugins: TDD enforcement hooks, git/PR workflows, spec-driven development, code review, project lifecycle, fix-from-error, maintenance automation, context… The licence is MIT.

When your agent uses it

  • Deciding whether to dispatch an agent

Example prompts

  • “Use the utility skill to score agent actions by expected gain, cost, uncertainty, and redundancy”
  • “/utility”

Workflow steps

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

  1. Construct state: gather task context per
  2. Score candidates: evaluate each action in A per
  3. Prefer highest utility: select the action with the
  4. Log score and decision: record the winning action,

What it can do on your machine

Read from SKILL.md and the folder at commit 9f3eb00. 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

    No scripts in the folder and no shell commands in SKILL.md.

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

  • Network

    No URLs in SKILL.md.

    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

Utility loads about 1.2k tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 455 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~37
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 athola/claude-night-market at commit 9f3eb00, republished under its MIT licence (© athola). 455 words, ~1,183 tokens.

Download SKILL.mdSave it as .claude/skills/utility/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
utility
description
Scores agent actions by expected gain, cost, uncertainty, and redundancy. Use when deciding whether to dispatch an agent or invoke a tool.
alwaysApply
false
category
infrastructure
tags
orchestration, cost-control, decision-making, agent-dispatch
provides.infrastructure
utility-scoring, action-selection, termination-control
provides.patterns
gain-estimation, cost-computation, redundancy-detection
usage_patterns
agent-dispatch-gating, tool-call-decisions, continuation-decisions, model-tier-selection
complexity
intermediate
model_hint
standard
estimated_tokens
600
progressive_loading
true

Utility Skill

Overview

A decision framework for agent orchestration based on Liu et al., "Utility-Guided Agent Orchestration for Efficient LLM Tool Use" (arXiv:2603.19896). Each candidate action is scored by subtracting weighted costs from expected gain, producing a single utility value that guides action selection. The framework prevents over-calling tools and premature stopping by making both errors costly. Utility range is [-2.3, 1.0].

When To Use

  • Deciding whether to dispatch another agent or tool call
  • Gating expensive tool calls (search, code execution, delegation)
  • Selecting the right model tier for a sub-task
  • Continuation decisions after receiving partial results
  • Verification gating before writing or committing output

When NOT to Use

  • Single-step operations with one obvious action
  • Trivial tasks where cost of scoring exceeds benefit
  • Already-committed actions that cannot be undone

Action Space

A = {respond, retrieve, tool_call, verify, delegate, stop}

ActionDescription
respondEmit a final answer from current context
retrieveFetch additional information (search, read, lookup)
tool_callExecute a tool (code runner, API, file write)
verifyCheck a prior result for correctness or completeness
delegateSpawn a sub-agent or hand off to a specialist
stopTerminate the loop and return current state

Utility Function

U(a | s_t) = Gain(a | s_t)
           - λ₁ · StepCost(a | s_t)
           - λ₂ · Uncertainty(a | s_t)
           - λ₃ · Redundancy(a | s_t)
ParameterDefaultRationale
λ₁1.0Cost baseline; all other weights relative to this
λ₂0.5Weak empirical correlation with outcome (r=0.0131)
λ₃0.8Redundancy pruning yields ~10% token savings

Utility range: [-2.3, 1.0]. Positive values indicate the action is worth taking. Values below the floor (-0.5 default) indicate the action should be skipped.

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

Termination Conditions

Stop the loop when any of the following is true:

  • (a) Selected action is stop
  • (b) Step budget exhausted (default: 10 steps)
  • (c) All non-stop actions score below the floor (default: -0.5)

High-gain override: If Gain >= 0.7 for any action, condition (c) may be overridden. Document the override and the gain value in your reasoning trace.

Quick Start

Minimal 4-step advisory pattern:

  1. Construct state: gather task context per modules/state-builder.md
  2. Score candidates: evaluate each action in A per modules/action-selector.md
  3. Prefer highest utility: select the action with the maximum U(a | s_t), subject to termination conditions
  4. Log score and decision: record the winning action, its utility value, and step count before executing

Detailed Resources

  • State Builder: modules/state-builder.md, how to populate s_t from task context
  • Gain: modules/gain.md, estimating expected information or progress gain
  • Step Cost: modules/step-cost.md, token, latency, and monetary cost tables
  • Uncertainty: modules/uncertainty.md, confidence estimation and calibration
  • Redundancy: modules/redundancy.md, detecting duplicate or low-delta actions
  • Action Selector: modules/action-selector.md, scoring loop and tie-breaking rules
  • Integration: modules/integration.md, wiring utility scoring into existing orchestration loops

Exit Criteria

  • State constructed with task goal and prior steps
  • All six actions scored before selecting one
  • Termination condition checked after each step
  • Score and decision logged for each step taken
  • High-gain overrides documented with gain value

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

Files

SKILL.md and 7 other files in plugins/leyline/skills/utility of athola/claude-night-market.

  • SKILL.md
  • modules/action-selector.md
  • modules/gain.md
  • modules/integration.md
  • modules/redundancy.md
  • modules/state-builder.md
  • modules/step-cost.md
  • modules/uncertainty.md

Open the folder on GitHubat commit 9f3eb00

Compare with similar skills

Utility 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.

Utility compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Utility this skillathola/claude-night-market342—~1.2kAutomated safety check: PassMIT
Cost Trackingaffaan-m/ECC274k1 repos~1.3kAutomated safety check: PassMIT
Cost Conversationruvnet/ruflo74k—~407Automated safety check: NotesMIT
Cost Reportruvnet/ruflo74k—~830Automated safety check: NotesMIT
Actions And Utilitiesautonomous-ai/openharness1.1k—~4.2kAutomated safety check: PassMIT
Cost Budget Checkruvnet/ruflo74k—~645Automated safety check: NotesMIT

Similar skills

  • Cost Tracking

    affaan-m/ECC

    Track and report Claude Code token usage, spending, and budgets from the local ECC cost-tracker metrics log.

    274k GitHub starsUsed in 1 repo~1.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Cost Conversation

    ruvnet/ruflo

    Per-conversation cost view — list every session in cost-tracking with started-at, message count, top model, and total cost

    74k GitHub stars~407 tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Cost Report

    ruvnet/ruflo

    Generate a cost report showing token usage and USD costs by agent and model

    74k GitHub stars~830 tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Actions And Utilities

    autonomous-ai/openharness

    A skill your agent uses when working with Phaser 4 utility functions, actions, alignment, grid layout, or batch operations on game objects.

    1.1k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Cost Budget Check

    ruvnet/ruflo

    Read accumulated cost-tracking spend + budget config, compute utilization, emit 50/75/90/100% alert ladder

    74k GitHub stars~645 tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Cost Optimize

    ruvnet/ruflo

    Analyze token usage patterns and recommend cost optimizations with estimated savings

    74k GitHub stars~997 tokensUpdated today
    AI & LLM EngineeringAuto-check: notes

More from athola/claude-night-market

All 160 skills in this repo
  • Night Market Diagnostics Toolkit

    athola/claude-night-market

    Run and interpret repo diagnostic scripts (ratchets, validators, token stats).

    342 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Skills Eval

    athola/claude-night-market

    Evaluate Claude skill quality through auditing. An agent skill from athola/claude-night-market.

    342 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Agent Teams

    athola/claude-night-market

    Coordinates Claude agent teams via filesystem protocol. An agent skill from athola/claude-night-market.

    342 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Delegation Core

    athola/claude-night-market

    Delegates execution to eight CLIs (Gemini, Qwen, MiniMax, GLM, Muse, Codex, OpenCode, Glimmer).

    342 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Elegant Code

    athola/claude-night-market

    Guide minimal code via a decision ladder with full safety, edge, and negative-case coverage.

    342 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Skill Library Mission

    athola/claude-night-market

    Build a project skill library in .claude/skills/ via discovery, parallel authoring, and review.

    342 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed

Questions about Utility

What does Utility do?

Scores agent actions by expected gain, cost, uncertainty, and redundancy. Utility is an agent skill from athola/claude-night-market. Scores agent actions by expected gain, cost, uncertainty, and redundancy.

When should I use Utility?

Utility fits situations like: deciding whether to dispatch an agent.

How do I install Utility in Claude Code?

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

How do I install Utility in Codex?

Run `npx skills add athola/claude-night-market --skill utility -a codex`. Or copy the skill folder (plugins/leyline/skills/utility in athola/claude-night-market) into .agents/skills/utility in your project. Codex loads it when a task matches its description.

Can I use Utility 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 athola/claude-night-market --skill utility -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/utility, .gemini/skills/utility, .github/skills/utility and .opencode/skills/utility in your project.

What does Utility need to run?

SKILL.md names no scripts, command-line tools or credentials: Utility is instructions for the agent only.

Does Utility access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Utility 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 Utility use?

Utility 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 Utility use?

About 1.2k tokens (SKILL.md is roughly 4.7k 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 Utility?

Skills that share tags, products or a category with Utility: Cost Tracking (affaan-m/ECC, 274k stars), Cost Conversation (ruvnet/ruflo, 74k stars), Cost Report (ruvnet/ruflo, 74k stars) and Actions And Utilities (autonomous-ai/openharness, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Utility?

athola (a GitHub user) maintains it in athola/claude-night-market, which has 342 GitHub stars. The repository holds 160 skills in this directory. The repository was last updated on October 6, 2026.

Source: athola/claude-night-market on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.