Skip to content
Back to skills

Lean

ASecurity

Token-lean mode. Use when the user says lean, save tokens, cheap mode, low token, hitting limits, or asks to get max result for min tokens. Also audits setup overhead.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 21, 2026
ai-agentspythongoshell

Works with

  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 21, 2026

npx -y skills add binay-py/claude-skills --skill lean --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Lean?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Lean
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/binay-py-lean/badge)](https://www.skillsdirectory.com/skills/binay-py-lean)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: lean
description: Token-lean mode. Use when the user says lean, save tokens, cheap mode, low token, hitting limits, or asks to get max result for min tokens. Also audits setup overhead.
---

# Lean mode

Goal: same quality result, fewest tokens. Context is re-sent every turn, so every byte you pull in is paid for again and again. Follow these rules for the rest of the session.

## Reading
- Grep/Glob first, then Read only the file you need, with `offset`/`limit` around the hit. Never Read a whole large file to find one function.
- Never re-read a file you already read or just edited. Edit fails loudly if it didn't apply.
- Use `output_mode: "files_with_matches"` or `head_limit` on Grep before asking for content.
- Don't open lockfiles, build output, minified, generated or vendored files.

## Commands
- Cap output: `| tail -n 40`, `| head -n 40`, `grep -m 20`, `--quiet`, `-q`, `--silent`. Tests: show failures only (`pytest -q --tb=short`, `npm test 2>&1 | tail -n 40`).
- Never dump logs, JSON blobs or `ls -R`. Filter with grep/jq/python first, print only what matters.
- Chain related shell steps into one call; run independent tool calls in parallel in one message.

## Delegation
- Broad search over many files: one `Explore` agent with `model: "haiku"`, ask for a conclusion of under 150 words. Don't also search yourself.
- Don't spawn agents for things doable in 1–3 tool calls. Never fan out multiple agents unless the work is truly parallel.

## Writing
- Edit with small, exact `old_string` hunks. Never rewrite a whole file to change a few lines.
- No narration between tool calls. No restating the plan or the user's request.
- Final answer: result first, short. Bullets over paragraphs. Show code only when it's new for the user. No summary of what you just did unless asked.

## Thinking
- Act as soon as there's enough info. Don't re-derive facts already in the conversation.
- Pick one approach and go; don't survey options.
- If the task is ambiguous in a way that would waste a lot of work, ask one short question instead of guessing.

## Tell the user (once, briefly) when it helps
- Switching to unrelated work → `/clear` (free) beats `/compact` (costs a full read).
- Simple task on Opus → `/model sonnet` or `/effort low`.
- Session idle a long time → cache is cold; a fresh `/clear` + short brief is cheaper than continuing.

## Setup audit
When asked to check the setup, or the user keeps hitting limits, run:

```
python scripts/lean_check.py [project_dir]
```

(Run from this skill's folder; needs Python 3.8+, no packages.) It prints the fixed per-session overhead (model, CLAUDE.md, MEMORY.md, MCP servers, plugins, skill descriptions, prompt hooks) with fixes. Show the user its output and offer to apply the fixes. Never edit settings without approval. For a deep log analysis, use the `claude-token-audit` skill if installed.

Files in this skill

  • SKILL.md2.8 KB
  • scripts/lean_check.py4.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.