← ClaudeAtlas

lean-contextlisted

Use to keep context lean. Read only what you need. Compress aggressively.
liujiarui0918/claude-code-strongest · ★ 0 · AI & Automation · score 62
Install: claude install-skill liujiarui0918/claude-code-strongest
# Keeping the context window lean Claude Code has a large context window, but every token you spend on noise is a token you cannot spend on reasoning. The cost of a sloppy investigation is silent: latency, money, and worse answers later in the same session. ## When to trigger - The task involves exploring an unfamiliar codebase or a large file tree. - You are about to `Read` a file over ~500 lines. - You are running `WebFetch`, `WebSearch`, or an MCP tool whose output you cannot predict. - The user asks "look across the repo" or "find every place that ...". - You catch yourself about to dump a long file or command output into a response. ## Core strategy Always narrow before you read. 1. **Use `Glob` first** to find the candidate files by name pattern. 2. **Use `Grep` next** with `output_mode: "files_with_matches"` or `"count"` to rank files by relevance. 3. **Then `Read` precisely**, with `offset` and `limit`, only the regions you need. Reading the whole file is occasionally the right call - small configs, the entry point you are about to edit - but it should be a deliberate decision, not the default. ## Reading large files - `Read` defaults to 2000 lines. For anything bigger, decide what you actually need. - If the file is a log, `Grep` it with `-n` and `-C 5` to get matching lines plus context. - If the file is source code, `Grep` for the symbol, then `Read` with `offset` set ~20 lines above the match and `limit` 80-150. - Never `Read` a generated file (lock files,