weigh

weigh is a skill for Claude Code, Codex from mifunedev/openharness. It costs 197 tokens per session (2,715 once invoked), scanned A, original, Apache-2.0.

A method for generating several possible solution paths for one task, then choosing among them with a fixed, reviewable scoring script.

In plain words
What is it for?
It helps compare candidate approaches, apply agreed signals and weights, and report whether one path was selected or no choice was made.
Why use it?
It replaces an unclear model-based choice with a repeatable decision that can be checked and reproduced.

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

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 weigh

README.md
[![agentmods](https://agentmods.dev/badge/skills/mifunedev/openharness/weigh.svg)](https://agentmods.dev/skills/mifunedev/openharness/weigh)
Your own site
<a href="https://agentmods.dev/skills/mifunedev/openharness/weigh"><img src="https://agentmods.dev/badge/skills/mifunedev/openharness/weigh.svg" alt="Measured on agentmods" height="20"></a>
Per session 197 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,715 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 $0.00197 $0.02715
Opus 5 $0.00098 $0.01358
Sonnet 5 $0.00039 $0.00543
Haiku 4.5 $0.00020 $0.00271

Measured 5d ago against content hash ca3eb51bb204, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/__tests__/score-trajectories.test.mjs, scripts/score-trajectories.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.oh/skills/weigh/SKILL.md · 189 lines

How it starts

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

weigh — weighted-trajectory selection

Run sample → attach signals → weight → select over one task. The model side proposes candidate trajectories (this is the Workflow tool's substrate — its judge-panel / adversarial-verify sampling); the harness owns the weight function that picks among them: scripts/score-trajectories.mjs, a pure, zero-dep, frozen-weights scorer. See references/workflow-shape.md for the seam and references/scoring.md for the weighting contract.

Core principle: the model proposes, the scorer disposes. Selection is a deterministic, version-controlled, reconstructable weighted sum — not a vibe.

disable-model-invocation: true suppresses auto-invocation only — the model never fires /weigh on its own (it spawns N agents and burns tokens). A user-typed /weigh runs the full procedure below, including the Step-2 sampling fan-out. allowed-tools includes Agent because Step 2 spawns the N sampling agents — without it the sampling step cannot run.

Result tag

Announce exactly one human result tag at the end of the run:

RESULT: SELECTED | NO-SELECTION | DRY-RUN
Tag Meaning
SELECTED The scorer ran and returned a selected id (or top-K for synthesis).
NO-SELECTION Every trajectory broke the hard floor — the scorer returned { selected: null, reason: "NO-SELECTION", floorViolations }. Report the floor that killed them; do not promote a failure.
DRY-RUN --dry-run was passed: the sampling plan was printed and the run stopped after Step 1.

Steps

Step 1 — Resolve config (and --dry-run gate)

Parse $ARGUMENTS:

Setting Default Notes
task / --cohort <path> (required) A task string to sample for, OR a pre-assembled cohort JSON to score directly (skip Steps 2–3).
--n N 4 Number of trajectories to sample. Hard cap 8 (mirrors /delegate wave discipline + the cost risk). Clamp N into [1, 8].
--method best-of-n One of best-of-n (argmax), vote (largest self-consistency cluster), softmax, synthesis (top-K).
--weights <json> frozen DEFAULT_WEIGHTS Passed through to the scorer verbatim (single shell token); the scorer's validateWeights() rejects bad vectors. --weights '{"consistency":30,"evalPass":20,"auditPass":15,"cost":10,"judge":0}' → a fully deterministic, judge-free weight.
--soft off Convert the hard eligibility floor into a down-weight (least-bad pick allowed).
--dry-run off Print the sampling plan (N, angles, method, weights) and stop here — spawn no agents. Announce RESULT: DRY-RUN, run Step 6's log, stop.

Read the full file on GitHub · 189 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 189 lines · 197 tokens per session scan A ca3eb51bb204

Subscribe to this mod's changes

weigh is a skill published in the GitHub repository mifunedev/openharness (36 stars, last pushed yesterday), licensed Apache-2.0. It adds 197 tokens to every session and 2,715 once invoked, about $0.0010 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.

Related

Other skills, from other repositories

data-visualization

Use for creating publication-quality charts and multi-panel analysis summaries. Triggers when tasks involve visualizing data, plotting results, creating charts, or producing visual reports from analysis output.

langchain-ai/deepagents · 40 tokens

cuml-machine-learning

Use for GPU-accelerated machine learning on tabular data using NVIDIA cuML. Triggers when tasks involve classification, regression, clustering, dimensionality reduction, or model training on datasets.

langchain-ai/deepagents · 43 tokens

social-media

Drafts engaging social media posts, writes hooks, suggests hashtags, creates thread structures, and generates companion images. Use when the user asks to write a LinkedIn post, tweet, Twitter/X thread, social media caption, social post, or repurpose content for social platforms.

langchain-ai/deepagents · 58 tokens

blog-post

Writes and structures long-form blog posts, creates tutorial outlines, and optimizes content for SEO with cover image generation. Use when the user asks to write a blog post, article, how-to guide, tutorial, technical writeup, thought leadership piece, or long-form content.

langchain-ai/deepagents · 58 tokens

schema-exploration

Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in a database. Use when the user asks about database schema, table structure, column types, what tables exist, ERD, foreign keys, or how entities relate.

langchain-ai/deepagents · 57 tokens

remember

Review the current conversation and capture valuable knowledge — best practices, coding conventions, architecture decisions, workflows, and user feedback — into persistent memory (AGENTS.md) or reusable skills. Use when the user says: (1) remember this, (2) save what we learned, (3) update memory, (4) capture…

langchain-ai/deepagents · 71 tokens