claude-token-efficient
```markdown
What this skill does
```markdown
---
name: claude-token-efficient
description: Drop-in CLAUDE.md file that reduces Claude output verbosity by ~63% through behavior rules targeting sycophancy, formatting noise, and scope creep
triggers:
- reduce claude token usage
- cut claude output verbosity
- claude is too verbose
- claude keeps adding sycophantic responses
- optimize claude code output
- drop in claude md to reduce tokens
- claude adds unnecessary suggestions
- stop claude from being wordy
---
# claude-token-efficient
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
A single `CLAUDE.md` file you drop into any project root. Claude Code (and other AI coding agents that read context files) picks it up automatically and changes output behavior immediately — no code changes, no API wrappers, no configuration.
---
## What It Does
Injects behavioral rules into Claude's context that suppress:
- Sycophantic openers ("Sure!", "Great question!", "Absolutely!")
- Hollow closings ("I hope this helps! Let me know if anything!")
- Prompt restatement before answering
- Em dashes, smart quotes, Unicode characters that break parsers
- "As an AI..." framing
- Unnecessary disclaimers
- Unsolicited suggestions beyond the requested scope
- Over-engineered code abstractions
- Hallucination on uncertain facts (forces "I don't know")
- Scope creep into untouched files
Benchmarked at ~63% output token reduction on a 5-prompt test suite. Net positive only when output volume is high enough to offset the persistent input token cost of loading the file.
---
## Installation
### Universal (any project)
```bash
curl -o CLAUDE.md https://raw.githubusercontent.com/drona23/claude-token-efficient/main/CLAUDE.md
```
### Clone and select a profile
```bash
git clone https://github.com/drona23/claude-token-efficient
cd your-project
# Universal
cp ../claude-token-efficient/CLAUDE.md .
# Dev/coding projects
cp ../claude-token-efficient/profiles/CLAUDE.coding.md CLAUDE.md
# Automation pipelines and agent loops
cp ../claude-token-efficient/profiles/CLAUDE.agents.md CLAUDE.md
# Data analysis and research
cp ../claude-token-efficient/profiles/CLAUDE.analysis.md CLAUDE.md
```
### Manual
Copy the contents of `CLAUDE.md` from the repo and paste into `your-project/CLAUDE.md`.
### Global install (applies to all projects)
```bash
mkdir -p ~/.claude
curl -o ~/.claude/CLAUDE.md https://raw.githubusercontent.com/drona23/claude-token-efficient/main/CLAUDE.md
```
---
## Profile Selection
| Profile | File | Best For |
|---|---|---|
| Universal | `CLAUDE.md` | Any project, general use |
| Coding | `profiles/CLAUDE.coding.md` | Dev, code review, debugging |
| Agents | `profiles/CLAUDE.agents.md` | Automation, multi-agent systems |
| Analysis | `profiles/CLAUDE.analysis.md` | Data analysis, research, reporting |
---
## File Structure After Install
```
your-project/
├── CLAUDE.md <- behavior rules, read automatically by Claude Code
├── src/
└── ...
```
For layered rules using Claude's multi-file CLAUDE.md support:
```
~/.claude/CLAUDE.md <- global preferences (tone, ASCII, format)
your-project/CLAUDE.md <- project-level constraints
your-project/src/CLAUDE.md <- task/module-specific rules
```
---
## What the CLAUDE.md File Contains
The file is plain text — a set of behavioral directives Claude reads as context. Key rule categories included:
```
# Output Rules
- Answer is always line 1. No openers.
- No closing statements or offers to help further.
- Do not restate the prompt. Execute immediately.
- ASCII only. No em dashes, smart quotes, or Unicode symbols.
- Never say "As an AI".
- No disclaimers unless genuine safety risk.
- Do not add suggestions outside the requested scope.
- Write the simplest working solution. No unsolicited abstractions.
- On uncertain facts: say "I don't know". Do not guess.
- User corrections become session ground truth immediately.
- Never read the same file twice in one session.
- Do not touch code outside the explicit request.
```
---
## Usage in Automation Pipelines
When running Claude programmatically, pass the CLAUDE.md content as a system prompt prefix or include it in your project directory if using Claude Code's file-reading behavior.
### Python — prepend rules to system prompt
```python
import os
import anthropic
def load_claude_rules(path: str = "CLAUDE.md") -> str:
if os.path.exists(path):
with open(path, "r") as f:
return f.read()
return ""
client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])
rules = load_claude_rules()
response = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=1024,
system=rules,
messages=[
{"role": "user", "content": "Review this function for bugs: def add(a, b): return a - b"}
]
)
print(response.content[0].text)
# Output: Bug: subtraction used instead of addition. Fix: return a + b
```
### Python — batch processing with token tracking
```python
import anthropic
import os
client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])
def load_rules() -> str:
with open("CLAUDE.md") as f:
return f.read()
def process_prompts(prompts: list[str]) -> dict:
rules = load_rules()
total_input = 0
total_output = 0
results = []
for prompt in prompts:
response = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=512,
system=rules,
messages=[{"role": "user", "content": prompt}]
)
total_input += response.usage.input_tokens
total_output += response.usage.output_tokens
results.append(response.content[0].text)
return {
"results": results,
"total_input_tokens": total_input,
"total_output_tokens": total_output,
}
prompts = [
"What is a closure in JavaScript?",
"Review: for(let i=0; i<=arr.length; i++) console.log(arr[i])",
"What does REST stand for?",
]
stats = process_prompts(prompts)
for i, result in enumerate(stats["results"]):
print(f"--- Prompt {i+1} ---")
print(result)
print(f"\nTotal input tokens: {stats['total_input_tokens']}")
print(f"Total output tokens: {stats['total_output_tokens']}")
```
### Node.js — pipeline usage
```javascript
import Anthropic from "@anthropic-ai/sdk";
import { readFileSync, existsSync } from "fs";
const client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY });
function loadRules(path = "CLAUDE.md") {
if (existsSync(path)) {
return readFileSync(path, "utf-8");
}
return "";
}
async function ask(prompt) {
const rules = loadRules();
const response = await client.messages.create({
model: "claude-sonnet-4-5",
max_tokens: 512,
system: rules,
messages: [{ role: "user", content: prompt }],
});
return {
text: response.content[0].text,
inputTokens: response.usage.input_tokens,
outputTokens: response.usage.output_tokens,
};
}
const result = await ask("Explain async/await in one paragraph.");
console.log(result.text);
console.log(`Output tokens: ${result.outputTokens}`);
```
---
## Composing Custom Rules
Extend the base file for your specific failure modes. Specific rules outperform generic ones.
```bash
cat CLAUDE.md > CLAUDE.project.md
cat >> CLAUDE.project.md << 'EOF'
# Project-Specific Rules
- Never modify files under /config without explicit confirmation.
- When a step fails, stop immediately and report the full error with traceback before attempting any fix.
- All database queries must use parameterized statements. Never interpolate user input into SQL strings.
- Output only valid JSON when the task involves data transformation. No prose before or after.
EOF
mv CLAUDE.project.md CLAUDE.md
```
---
## Override Rule
The file never fights you. If you explicitly ask for verbose output, detailed explanation, or debate on alternatives, Claude follows your instruction. User instructions alwRelated in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.