agentsclimarketplace

Token frugal engineering

Skill nhattrung0911/shipwright/skills/token-frugal-engineering

Production-grade engineering discipline for AI coding agents — 5 composable skills (plan, build, secure, operate) for Claude Code, Codex & Gemini. Never skips a step, never fakes done.

Install
npx -y skills add nhattrung0911/shipwright --skill token-frugal-engineering

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use during any non-trivial coding task in Claude Code — large codebases, long sessions, running tests/builds/logs, repeated file reads, multi-file changes, or whenever context/token usage matters. Stack-agnostic discipline for keeping main context lean.

SKILL.md

4.6 KB, as published. Nobody here has run it

Token-Frugal Engineering

Overview

The expensive resource is main-context tokens, not wall-clock. Every file dumped, log scrolled, or option narrated burns budget you can't get back. This skill is the distilled discipline for spending tokens where they buy correctness and nowhere else.

Core principle: Keep verbose, low-signal work OUT of main context. Pull only the conclusion in.

Announce at start (long/heavy tasks): "Using token-frugal-engineering to keep context lean."

The Essence Rules

#RuleWhy
1Delegate verbose work to subagentswhen output is bulky AND you need only the verdict: tests, builds, log scans, broad searches, doc fetches. Instruct the agent to return capped, structured output ("≤10 lines, failing names only").Raw output never lands in main context. Skip for a short log/tiny suite — agent overhead beats the savings there
2Search, don't read — Grep/Glob to locate; never cat/find/whole-file reads to exploreA read pulls the whole file; a grep pulls 3 lines
3Scoped reads — Read with offset/limit on the part you needDon't load 2000 lines for one function
4Don't re-read to confirm a write landed — Edit/Write already errors on failure; harness tracks state. Legit verification reads (did the logic come out right after a tricky multi-edit) are fine.Confirm-reads are pure waste; correctness-reads are not
5Plan before code on non-trivial tasksMisdirected edits = wasted tokens + rework churn
6Batch independent tool calls in one message (parallel)Fewer round-trips, less restated context
7Deterministic > generative — scripts/validators/generators for mechanical workA regex/linter costs ~0 model tokens vs reasoning each case
8Reference skills by name, never @-load@path force-loads the whole file immediately, before you need it
9Progressive disclosure in skills — thin SKILL.md, heavy detail in reference files loaded on demandAlways-loaded bytes tax every conversation
10Terse output — answer, don't narrate options you won't pursueProse is tokens too
11Session hygiene — between unrelated tasks, /clear; on a long thread, summarize-then-continueRules 1–10 stop adding tokens; this removes tokens already accumulated

Subagent Delegation (rule 1 — the biggest win)

Delegate when output is verbose and you need only the verdict:

  • Running a test suite → "run tests, return pass/fail + failing names only"
  • Scanning logs → "find the error + 5 lines context"
  • Exploring an unknown codebase → use Explore agent, get the map not the dumps
  • Fetching docs → return the one relevant snippet

REQUIRED SUB-SKILL for parallel/independent work: superpowers:dispatching-parallel-agents.

Keep in main context: the decision, the diff, the one file you're actively editing.

Quick Decision

digraph d {
  "About to produce/read bulk output?" [shape=diamond];
  "Need only the conclusion?" [shape=diamond];
  "Delegate to subagent" [shape=box];
  "Do it inline (you need the detail)" [shape=box];
  "About to produce/read bulk output?" -> "Need only the conclusion?" [label="yes"];
  "Need only the conclusion?" -> "Delegate to subagent" [label="yes"];
  "Need only the conclusion?" -> "Do it inline (you need the detail)" [label="no"];
}

Audit & Tune

  • Context feels bloated? Run the context-budget skill to find what's eating tokens.
  • Choosing response depth deliberately? token-budget-advisor.
  • This skill = how to work frugally; those two = measure and dial.

Companion skills

  • Overall delivery engine that pulls this throughout a build → disciplined-delivery.
  • Note: rules 8–9 (@-load, progressive disclosure) are Claude-Code-specific mechanics; the rest are platform-agnostic.

Common Mistakes

MistakeFix
cat-ing a file to "see what's there"Grep for the symbol; scoped Read
Reading a file back after editing itEdit/Write already confirmed; harness tracks state
Running the full test suite inlineDelegate; pull pass/fail summary
Narrating 3 approaches before pickingRecommend one, act
Fat always-on SKILL.md / CLAUDE.mdMove detail to on-demand reference files
Serial tool calls for independent readsBatch them in one message

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.