command-skill-token-efficiency

A review aid for deciding whether instructions belong in a command, skill, or agent file, while checking how much context the file uses. Skills are loaded only when relevant; commands and agents may load their full files when invoked.

In plain words
What is it for?
Use it when creating, editing, reviewing, or shortening coding-agent commands, skills, and agents, and when deciding where instructions should live.
Why use it?
It helps reduce unnecessary context and keep frequently used command files shorter without losing procedures that are needed only occasionally.

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/data-wise/craft/command-skill-token-efficiency
Any agent
npx skills add Data-Wise/craft --skill command-skill-token-efficiency
Clone the repo
git clone --depth 1 https://github.com/Data-Wise/craft

Made for: Claude Code, Codex.

Per session 234 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,827 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.00234 $0.01827
Opus 5 $0.00117 $0.00914
Sonnet 5 $0.00047 $0.00365
Haiku 4.5 $0.00023 $0.00183

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

Security

Grade A, and why

command-skill-token-efficiency 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 yesterday.

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.

skills/code/command-skill-token-efficiency/SKILL.md · 81 lines

How it starts

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

Command/Skill Token Efficiency

Helps decide where content belongs when authoring or resizing a craft command, skill, or agent file, and runs the quantitative check that backs the decision up. Grew out of feature/token-usage-reduction (PR #232), which measured a 48% reduction in always-loaded line count across /refine (630→42 lines), /brainstorm (528→112 lines), and orchestrator-v2.md (1473→1212 lines). Line count and token count correlate but aren't identical — real /usage validation of the token-usage hypothesis is a separate, not-yet-completed step (see "Further reading" below). Full research and methodology: docs/specs/SPEC-token-efficiency-research-2026-06-30.md.

Why this matters

Command and agent files load into context in full, every time they're invoked — regardless of which part of the file is actually relevant that turn. Skills load conditionally, only when their description matches the conversation. That single structural fact is the entire lever this skill exists to apply: content that's genuinely procedure (the step-by-step logic of what a command does) costs less if it lives in a skill instead of the command file, because then it only loads when needed rather than every time.

This isn't a rule to apply mechanically everywhere — a short, focused command file is already fine. The skill matters most when a command file has grown large, or when a new command is being designed and there's a real choice about where its logic should live.

The classification: command vs. skill

When writing or reviewing a command/skill/agent file, sort its content into two buckets:

Stays in the command file (invocation-specific):

  • Flag parsing and the documentation of those flags
  • Frontmatter (deprecated:, replaced-by:, argument hints)
  • Anything that has to be present even if skill-routing hasn't fired yet — the command always runs; the skill it might delegate to is conditional

Belongs in a skill (procedure):

Read the full file on GitHub · 81 lines

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. yesterday First seen · 81 lines · 234 tokens per session scan A b1d486aefecc

Subscribe to this mod's changes

command-skill-token-efficiency is a skill published in the GitHub repository Data-Wise/craft (4 stars, last pushed 16d ago), licensed MIT. It adds 234 tokens to every session and 1,827 once invoked, about $0.0012 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-31.

Related

Other skills, from other repositories

github-actions-workflow

Scaffolds or audits a GitHub Actions CI/CD workflow for a project. Covers job structure, caching, secrets handling, concurrency groups, environment gates, and reusable workflows via workflowcall. Invoked when the user asks to set up CI, add a GitHub Actions workflow, improve pipeline performance, or share workflow…

soulcodex/agentic · 72 tokens

specflow

Spec-driven development with executable contracts.

Hulupeep/Specflow · 9 tokens

specflow-loop-selector

Selects the correct Specflow loop and forces a concrete run contract before work starts. Use when an agent is asked to start Specflow work, build a ticket, create/refine a PRD, investigate an existing product, run Gate D, choose between spec-build and feature-build, or "go find out about" Specflow loops. Compatible…

Hulupeep/Specflow · 106 tokens

specflow-simulate

Simulates end-to-end usage of a Specflow story across multiple personas and divergent routes to discover gaps, edge cases, and unhandled branches BEFORE the story is built — then proposes each finding as a concrete story addition (new REQ, negative-path AC, Gherkin branch, or journey step). This is the high-value…

Hulupeep/Specflow · 172 tokens

specflow-audit

Audits a Specflow story/ticket for spec-compliance and surgically uplifts it — adding only the missing executable contract sections (SQL/RLS, TypeScript interfaces, invariant codes, Gherkin, acceptance criteria, Definition of Done, data-testid coverage) — then runs a pre-flight gate that refuses to mark the ticket…

Hulupeep/Specflow · 199 tokens

architecture-review

Conducts a comprehensive multi-perspective architecture review using ALL architecture team members. Use when the user requests "Start architecture review", "Full architecture review", "Review architecture for version X.Y.Z", "Conduct comprehensive review", or when they want assessment from multiple perspectives. Do…

codenamev/ai-software-architect · 80 tokens