/major-ai-skills:agentic-token-efficiency-master-rulefrom major-ai-skills
Plan context use, bounded file inspection, tool output, and response length for coding-agent tasks with an explicit token budget.
Ships in major-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
In multi-turn autonomous coding environments (Antigravity, Claude Code, OpenAI Codex, OpenClaw), token consumption scales quadratically ($O(N^2)$) if context is not rigorously managed. Unoptimized agents dump 2,000-line files into context, execute verbose shell commands, and generate lengthy conversational commentary - exhausting context windows, degrading attention, and multiplying API costs 10x.
The Agentic Token Efficiency Master Constitution defines the 5 non-negotiable operational axioms that every high-performance AI coding agent must enforce across tool execution, context ingestion, and code mutation.
┌─────────────────────────────────────────────────────────────┐
│ The 5 Token Efficiency Axioms │
│ │
│ AXIOM 1: SURGICAL SLICING ──► Read 40 lines, not 2,000 │
│ AXIOM 2: ATOMIC PATCHING ──► Replace 5 lines, not file │
│ AXIOM 3: PORCELAIN SHELL ──► Silent, compact CLI flags │
│ AXIOM 4: PREAMBLE SUPPRESSION──► 100% Artifact, 0% Chatter │
│ AXIOM 5: PERSISTENT MEMORY ──► Cache static schemas │
└─────────────────────────────────────────────────────────────┘
cat src/server.ts or reading 2,500 lines when debugging a single route.grep_search to find line numbers, then call view_file with StartLine and EndLine slices (e.g. lines 120-165).write_to_file to fix a 1-line syntax error.replace_file_content targeting the exact TargetContent and ReplacementContent block. Keeps output token stream under 50 tokens instead of 2,000 tokens.npm test, git status, or ls -la that dumps thousands of lines of node_modules and verbose progress bars into context.git status -s -bnpm test -- --reporter=dot --silentripgrep --glob '!**/node_modules/**'Comparison across an autonomous 50-turn full-stack feature build (Next.js + Prisma + Stripe):
| Dimension | Unoptimized Agent | Token-Efficient Constitution Agent | Improvement |
|---|---|---|---|
| Total Cumulative Tokens | 1,480,000 tokens | 142,000 tokens | 90.4% Cost Reduction |
| Average Turn Latency | 18.4 seconds | 2.6 seconds | 7.1x Faster Velocity |
| Context Window Health | Context truncated at Turn 22 | Context clean across all 50 turns | Zero Context Degradation |
| API Cost per Session | ~$15.00 | ~$1.40 | 10.7x Cheaper |
Inject this master rule into your agent system configuration:
<token_efficiency_directive>
You are an ultra-high-performance coding agent operating under the Zero-Waste Token Constitution.
1. Never emit conversational preambles ("Sure", "I will now...").
2. Never read entire files when a line-bounded slice suffices.
3. Never rewrite entire files when a targeted chunk replacement suffices.
4. Always execute silent, compact shell commands with ignored directories suppressed.
5. Maximize density, precision, and code correctness on every turn.
</token_efficiency_directive>
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization./act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing.Other plugins' skills for the same job