nw-ab-optimize-command

nw-ab-optimize-command is a skill for Claude Code from nWave-ai/nWave. It costs 41 tokens per session (469 once invoked), scanned A, original, MIT.

A procedure for turning an oversized command file into a small declarative definition: a file that states what route to use rather than spelling out every step itself.

In plain words
What is it for?
Use it to measure a command, identify repeated content, move knowledge to the right owner, and verify that the shortened command still behaves as intended.
Why use it?
Command files can repeat logic that belongs in an agent or skill, making them harder to read, maintain, and keep consistent.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it to measure a command, identify repeated content, move knowledge to the right owner, and verify that the shortened command still behaves as intended.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nwave-ai/nwave/nw-ab-optimize-command
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 nWave-ai/nWave --skill nw-ab-optimize-command
Clone the repo
git clone --depth 1 https://github.com/nWave-ai/nWave

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 nw-ab-optimize-command

README.md
[![agentmods](https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-ab-optimize-command/github.svg)](https://agentmods.dev/skills/nwave-ai/nwave/nw-ab-optimize-command)
Your own site
<a href="https://agentmods.dev/skills/nwave-ai/nwave/nw-ab-optimize-command"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-ab-optimize-command/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 nw-ab-optimize-command

Your own site · 80×15
<a href="https://agentmods.dev/skills/nwave-ai/nwave/nw-ab-optimize-command"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-ab-optimize-command.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 469 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.00041 $0.00469
Opus 5.5 $0.00016 $0.00188
Sonnet 5.5 $0.00008 $0.00094
Haiku 4.5 $0.00004 $0.00047

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

Security

Grade A, and why

nw-ab-optimize-command 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 4d 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.

nWave/skills/nw-ab-optimize-command/SKILL.md · 32 lines

What it actually says

nw-ab-optimize-command (PROCEDURE)

Kind: PROCEDURE | One job: optimize one command file | One trigger: a command file exceeds its size target (dispatchers 40-150L, orchestrators 100-300L) or carries reducible duplication.

Deterministic step-sequence (run every time, in order)

Run these steps in order:

  1. CLASSIFY — Apply nw-command-design-patterns, supplied by the selected command route's generated trigger under the canonical Skill addressing procedure. Classify dispatcher | orchestrator. Gate: classification chosen.
  2. MEASURE + FLAG — Apply nw-command-optimization-workflow supplied through that same generated route, without a second load directive. wc -l; flag reducible content (the duplication triangle: command-to-command, command-to-agent, command-to-self). Gate: before-count + reducible-list recorded.
  3. EXTRACT — Remove boilerplate, move domain knowledge to the owning agent/skill, delete dead/deprecated references. Gate: extractions listed.
  4. RESTRUCTURE — Rewrite as a declarative dispatcher/orchestrator (forge.md 40-line gold standard for dispatchers). Gate: declarative structure, size within target.
  5. VALIDATE — Confirm the command keeps its invocation contract + success criteria; numbered-task-list workflow, checkbox success criteria. Gate: structure confirmed.
  6. REPORT — before/after line counts. Gate: both numbers reported.

Composition

  • COMPOSES (KNOWLEDGE): nw-command-design-patterns, nw-command-optimization-workflow.
  • Note: this procedure restructures a command DEFINITION; it does not execute the command.

Success Criteria

  • Command classified, reducible content flagged
  • Size within target (dispatcher 40-150L / orchestrator 100-300L)
  • Before/after line counts reported; invocation contract preserved
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. 4d ago First seen · 32 lines · 41 tokens per session scan A 7ff2f5a03234

Subscribe to this mod's changes

nw-ab-optimize-command is a skill published in the GitHub repository nWave-ai/nWave (631 stars, last pushed yesterday), licensed MIT. It adds 41 tokens to every session and 469 once invoked, about $0.0002 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-11-03.

Related

nw-ab-optimize-command compared with skills from other repositories

nw-ab-optimize-command next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nw-ab-optimize-commandnWave-ai/nWaveSkill631yesterdayMITA41Claude Code
computer-usekirodotdev/KiroCrewSkill4.8kyesterdayApache-2.0A62Claude Code, Codex
croncrystal-autobot/autobotSkill475d agoMITA10Claude Code, Codex
addpilotspace/ADDSkill194d agoMITA188Claude Code
agnostic-ai-gh-issueChemaclass/agnostic-aiSkill27todayMITA28Claude Code
startcycle-graph-userhybridlabor-api/bdb-dev-optimized-agent-skillsSkill65d agoApache-2.0A102Claude Code, Codex
tddt1/tdderSkill14yesterdayApache-2.0A102Claude Code