implicit-token-savings
implicit-token-savings
Bias every coding session toward the smallest command that answers the real question.
Prefer inventories, summaries, scoped searches, and path-selective test commands before full file dumps, wide diffs, or whole-repo test runs.
Decision Tree
What do you need right now?
-
Repo shape, top-level files, or candidate paths
- Start with
ls -1,tree -L 2, orrg --files - Read
references/filesystem.md
- Start with
-
A specific symbol, literal, stack trace, or TODO
- Start with
rg -n - Read
references/filesystem.md
- Start with
-
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, ortail -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, orgit log --oneline - Read
references/git.md
- Start with
-
Staging, committing, or pushing
- Stage only the intended paths
- Review the staged summary before the commit
- Push
HEADinstead of spelling the branch when the remote is already 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, ordocker ps - Read
references/runners.md
- Start with the narrowest stack-native command that exists:
-
The preferred command is missing
- Follow the fallback matrix
- Read
references/patterns.md
Default Operating Rules
- Inventory before contents. Ask "which path?" before "what does the whole file say?"
- Scope before detail. Prefer
--files,--name-only,--stat, and explicit paths before raw output. - Search before read. Use
rgto identify the few files worth opening. - Summarize before hunk. Use
git diff --statorgit diff --name-onlybeforegit diff. - Narrow test surfaces aggressively. Run the smallest path, package, test name, or pattern that can answer the question.
- Prefer machine-readable output when another tool or script will consume it:
--json,--format '{{json .}}',jq -r. - Escalate in steps: terse, then structured, then full output.
- If a preferred tool is absent, use the nearest cheaper equivalent rather than stalling.
Quick Reference
| Need | Start here | Escalate only if needed | Why |
|---|---|---|---|
| Top-level repo inventory | ls -1 |
ls -lah, then tree -L 2 |
File names beat decorative output when you just need bearings |
| Directory shape | tree -L 2 path/ |
tree -a -L 3 path/ |
Depth caps keep structure readable |
| Candidate paths only | rg --files path/ |
rg --files path/ | rg 'pattern' |
Avoid opening file contents at all |
| Text or symbol search | rg -n -F 'needle' path/ |
rg -n 'regex' path/ |
Match first, read later |
| File excerpt | sed -n '1,80p' file |
head -n 120 file, then full read |
Pull only the needed slice |
| Working tree state | git status --short --branch |
git status |
Short form is enough for most decisions |
| Change scope | git diff --stat |
git diff --name-only, then git diff -- path |
Summaries first, hunks last |
| Recent history | git log --oneline --decorate -n 15 |
git log --stat -- path |
Commit headlines answer many questions quickly |
| Stage and review | git add -- path && git diff --cached --stat |
git diff --cached -- path |
Review only what you are about to commit |
| Push current branch | git push -u origin HEAD |
git remote -v, then explicit branch push |
HEAD avoids branch-name lookup noise |
| Node test surface | npm test -- --help |
npm test -- <runner-args> |
Confirm how the project forwards args before widening |
| Rust test surface | cargo test name -- --nocapture |
cargo test package::module::name |
Target a single test before a suite |
| Python lint surface | ruff check path/ |
ruff check path/ --fix |
Keep fixes explicit |
| Python test surface | pytest -q tests/test_file.py -k expr |
pytest -q tests/ |
Start with a file or expression, not the whole suite |
| Go test surface | go test ./pkg/... -run Pattern |
go test ./... |
Package and -run filters cut noise |
| Container inventory | docker ps --format '{{json .}}' |
docker ps --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}' |
Structured rows are easier to filter or summarize |
Reading Guide
| Task | Read |
|---|---|
| Repo shape, search, and targeted file reads | references/filesystem.md |
| Compact git status, diff, history, staging, and push patterns | references/git.md |
| Narrow test, lint, and container commands | references/runners.md |
| Fallbacks, escalation ladders, and session choreography | references/patterns.md |
| Missing results, over-compression mistakes, and command traps | references/gotchas.md |
Verified Environment
- Verified locally on April 19, 2026 in a Unix-like shell.
- Found during verification:
/bin/ls,tree 2.2.1,ripgrep 15.1.0,git 2.53.0,npm 11.7.0,docker 28.5.2, andjq 1.8.1. - Not on
PATHduring verification:cargo,ruff,pytest, andgo. - Re-run
python3 scripts/probe_implicit_token_savings.py --format prettyto refresh availability and behavior on the current machine.
Gotchas
rgrespects ignore rules. Missing results usually need--hidden,-u, or--debug, not a tool switch.treeis for shape, not truth. Cap depth early or you will spend tokens on directory art.sed -nis cheaper thancatwhen you need a slice, but repeated slicing can cost more than one full read once you know the exact short file you need.git diff --stathides semantics. Escalate to a path-specific diff before drawing conclusions about behavior.npm testforwards extra runner flags only after--.docker pscan succeed while the container you care about is unhealthy. ReadStatus, not just presence.git add .is the opposite of token discipline when only one file matters. Stage explicit paths.
Helper Scripts
scripts/probe_implicit_token_savings.pydetects available tools and verifies compact command behavior on temporary local fixtures.scripts/validate.pychecks packaging, required files, and syntax.scripts/test_skill.pyruns validation, eval coverage checks, cross-reference checks, and the probe suite.templates/session-checklist.mdis a reusable checklist for starting a low-noise coding session.
More from jpcaparas/skills
markdown-new
Use markdown.new when the user explicitly wants markdown.new, Cloudflare Markdown for Agents, URL-to-Markdown conversion, file-to-Markdown conversion, crawl-to-Markdown, or the hosted markdown.new editor. Trigger on: 'markdown.new', 'convert this URL to markdown', 'crawl this docs site into markdown', 'file to markdown', 'upload this PDF to markdown', 'markdown.new API', or 'markdown editor'. Do NOT trigger for generic web search/scraping when another tool is enough, or for editing local Markdown without using the markdown.new service.
32skill-creator-advanced
Advanced skill creator for mission-critical, installable skills — API wrappers, progressively-disclosed technical documentation, CLI tool integrations, and complex multi-reference skills. Use when creating or improving skills that demand rigorous progressive disclosure, verified examples, tested operations, cross-harness compatibility, smart placement into the right repo-local or global skills directory, and self-improvement feedback loops. Triggers on: 'advanced skill', 'create API skill', 'create wrapper skill', 'production skill', 'installable skill', 'improve this skill for progressive disclosure', 'rigorous skill', 'mission-critical skill', or when skill-creator's output needs to be more thorough. Also use when upgrading an existing skill to production quality.
32azure-devops-wiki-markdown
Use when writing, fixing, or reviewing Azure DevOps wiki Markdown, Mermaid diagrams, `_TOC_` and `_TOSP_`, collapsible `<details>` blocks, query-table embeds, `@` mentions, work-item links, KaTeX math, HTML video embeds, code fences, or Azure DevOps surface-specific support differences across Wiki, PR, README, Widget, and Done fields. Triggers on Azure DevOps wiki, markdown guidance, Mermaid sequence/graph/timeline/ER diagrams, proposal decision trees, table-of-subpages, query-table, code fence aliases, line-break bugs, and wiki page formatting. Do NOT use for GitHub-only Markdown, generic Mermaid authoring outside Azure DevOps, or non-Azure documentation platforms.
30ripgrep
Prefer ripgrep (`rg`) for text search, recursive codebase search, ignore-aware grep replacement, filename discovery via `rg --files`, and machine-readable search output. Use when the user asks to search for text, find occurrences, inspect a large tree, locate files by name or pattern, or when `grep`, `grep -R`, `find | grep`, or manual file reads would be slower. Triggers on: 'search for', 'find occurrences', 'grep', 'grep -R', 'ripgrep', 'rg', 'find files', 'look for pattern'. Do NOT trigger for reading entire files, structured JSON queries better handled by `jq`, or filesystem metadata tasks that need `find` or `fd`.
29synthetic-search
Use this skill when the user explicitly wants Synthetic Search, the Synthetic API, `api.synthetic.new`, `SYNTHETIC_API_KEY`, or zero-data-retention web search with raw `curl`/`jq` examples. It covers live-verified search requests, quota checks, and a zero-dependency Node helper for readable output. Triggers on: 'Synthetic Search', 'Synthetic API', 'api.synthetic.new', 'SYNTHETIC_API_KEY', 'Synthetic quotas'. Do NOT trigger for general browser automation, full-site crawling, or unrelated search providers.
29tweet-replicate
Rebuild a public X/Twitter status into a deterministic local replica with a frozen snapshot, local HTML/CSS, Playwright capture, X-like media-frame fill behavior, a high-quality MP4 master, and a companion GIF capped under 24 MB. Use when asked to replicate a tweet/X post, freeze a status into video, make a tweet look like X offline, or create rerenderable tweet assets with a saved build folder. Trigger on: 'replicate this tweet', 'turn this X post into MP4', 'make this tweet into a GIF too', 'freeze this status locally'. Do NOT use for plain tweet text extraction, raw media download only, live X browser capture, authenticated pages, DMs, or promises of a pixel-perfect private X renderer.
29