mcpField
I
implicit-token-savings

implicit-token-savings

github.com/jpcaparasAgent workflows56127 installsUpdated 1d ago
Repository

About implicit-token-savings

implicit-token-savings is an agent skill for choosing the smallest local shell command that answers a task. It provides decision trees, command references, and helper scripts for efficient repository inspection and development checks.

Key features

  1. 01Task-based command selection
  2. 02Compact repository and file inspection
  3. 03Focused Git status and diff guidance
  4. 04Stack-specific test and lint commands
  5. 05Fallbacks and command pitfalls
  6. 06Helper scripts for validation and probes

Use cases

  1. 01Inspecting a repository without broad file dumps
  2. 02Finding a symbol or reading a targeted excerpt
  3. 03Reviewing changes and selecting Git commands
  4. 04Running focused tests or lint checks

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/jpcaparas/skills --skill implicit-token-savings

After installing, type/implicit-token-savingsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

AGENTS.md
metadata.json
README.md
skill-card.prompt.md
agents/
openai.yaml
assets/
.gitkeep
evals/
evals.json
references/
filesystem.md
git.md
gotchas.md
patterns.md
runners.md
scripts/
probe_implicit_token_savings.py
test_probe_implicit_token_savings.py
test_skill.py
validate.py
templates/
session-checklist.md

Details

From the project README

implicit-token-savings

Choose the smallest sufficient local shell command for the real question.

Prefer compact output when it answers the question, especially when requested. Go directly to a known file, relevant diff, or full output when the task needs it; preliminary summaries are not prerequisites.

Decision Tree

What do you need right now?

  • Repo shape, top-level files, or candidate paths

    • Start with ls -1, tree -L 2, or rg --files
    • Read references/filesystem.md
  • A specific symbol, literal, stack trace, or TODO

    • Start with rg -n
    • Read references/filesystem.md
  • A file excerpt or line range

    • Prefer the harness's targeted read tool if one exists
    • Otherwise use sed -n 'start,endp' file, head -n 80, or tail -n 80
    • Read references/filesystem.md
  • Working tree state, scope of change, or recent history

    • Start with git status --short, git diff --stat, git diff --name-only, or git log --oneline
    • Read references/git.md
  • Staging, committing, or pushing

    • Stage only the intended paths
    • Review all staged changes before an authorized commit; use summaries for scope and hunks for semantics
    • Only when pushing is authorized, use HEAD if the intended remote and destination are known
    • Read references/git.md
  • Test, lint, or container health for a specific stack

    • Start with the narrowest stack-native command that exists: cargo test, npm test, ruff check, pytest, go test, or docker ps
    • Read references/runners.md
  • The preferred command is missing

    • Follow the fallback matrix
    • Read references/patterns.md

Default Operating Rules

  1. Use known context to choose a sufficient command directly. Inventory helps when paths are unknown, not when the target file is already named.
  2. Keep scope explicit. Use --files, --name-only, or --stat for scope questions, and content output for semantic questions.
  3. Use rg to locate unknown files or matching lines; read known relevant files without a search ceremony.
  4. Use a path-specific git diff directly when reviewing behavior. Summaries help size or file-list questions but cannot establish semantics.
  5. Use focused tests for local feedback, and run all repository-required validation gates before handoff. Narrow tests do not replace required full suites.
  6. Prefer machine-readable output when another tool or script will consume it: --json, --format '{{json .}}', jq -r.
  7. Choose terse, structured, or full output to match the known need. Preserve errors, exit status, and failure details; never compress away evidence needed for a safe decision.
  8. If a preferred tool is absent, use the nearest cheaper equivalent rather than stalling.

Quick Reference

Choose a row for the question at hand; alternatives are not a required sequence.

NeedCompact optionAlternative when usefulWhy
Top-level repo inventoryls -1ls -lah or tree -L 2File names beat decorative output when you just need bearings
Directory shapetree -L 2 path/tree -a -L 3 path/Depth caps keep structure readable
Candidate paths onlyrg --files path/rg --files path/ | rg 'pattern'Avoid opening file contents at all
Text or symbol searchrg -n -F 'needle' path/rg -n 'regex' path/Choose literal or pattern semantics
File excerptsed -n '1,80p' fileFull read when whole-file context is neededPull enough context in one useful read
Working tree stategit status --short --branchgit statusShort form is enough for most decisions
Change scope or semanticsgit diff --statgit diff --name-only for paths; git diff -- path for semanticsChoose the detail the question requires
Recent historygit log --oneline --decorate -n 15git log --stat -- pathCommit headlines answer many questions quickly
Stage and reviewgit add -- path && git diff --cached --statgit diff --cached -- pathReview only what you are about to commit
Authorized push of current branchgit push -u origin HEADInspect the destination if unknownHEAD is shorthand, not push authorization
Node test surfacenpm test -- <runner-args>npm test -- --help if flags are unknownUse the project's known runner contract
Rust test surfacecargo test name -- --nocapturecargo test package::module::nameChoose a test filter for focused feedback
Python lint surfaceruff check path/ruff check path/ --fixKeep fixes explicit
Python test surfacepytest -q tests/test_file.py -k exprpytest -q tests/Choose focused feedback or suite coverage as needed
Go test surfacego test ./pkg/... -run Patterngo test ./...Package and -run filters cut noise
Container inventorydocker ps --format '{{json .}}'docker ps --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'Structured rows are easier to filter or summarize

Reading Guide

TaskRead
Repo shape, search, and targeted file readsreferences/filesystem.md
Compact git status, diff, history, staging, and push patternsreferences/git.md
Narrow test, lint, and container commandsreferences/runners.md
Context-driven command choices and fallbacksreferences/patterns.md
Missing results, over-compression mistakes, and command trapsreferences/gotchas.md

Gotchas

  1. rg respects ignore rules. Missing results usually need --hidden, -u, or --debug, not a tool switch.
  2. tree is for shape, not truth. Cap depth early or you will spend tokens on directory art.
  3. sed -n is cheaper than cat when you need a slice, but repeated slicing can cost more than one full read once you know the exact short file you need.
  4. git diff --stat hides semantics. Escalate to a path-specific diff before drawing conclusions about behavior.
  5. npm test forwards extra runner flags only after --.
  6. docker ps can succeed while the container you care about is unhealthy. Read Status, not just presence.
  7. git add . is the opposite of token discipline when only one file matters. Stage explicit paths.

Helper Scripts

  • scripts/probe_implicit_token_savings.py detects available tools and verifies compact command behavior on temporary local fixtures.
  • scripts/validate.py checks packaging, required files, and syntax.
  • scripts/test_skill.py runs validation, eval coverage checks, cross-reference checks, and the probe suite.
  • templates/session-checklist.md is a reusable checklist for starting a low-noise coding session.

When Guidance Stops Helping

If a compact command fails or hides needed evidence, use fuller output and inspect installed help or official version-matched docs. Preserve failures and unknowns rather than optimizing them away. Propose a canonical skill update when an example is stale or saves less work than it adds, citing the tool/version and a reproducer. Do not silently edit installed copies or publish the proposal.

Comments

Markdown supported