一键导入
context
Context window conservation rules. Invoke when approaching context limits or before large tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Context window conservation rules. Invoke when approaching context limits or before large tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | context |
| updated | "2026-02-20T00:00:00.000Z" |
| description | Context window conservation rules. Invoke when approaching context limits or before large tasks. |
| argument-hint | (no arguments) |
| allowed-tools | Read, Edit, Glob, Grep |
Rules for maximizing work done per context window. Every token spent on exploration is a token not spent on implementation.
| Need | Use | NOT |
|---|---|---|
| Find a file by name | Glob | Explore agent, find, ls -R |
| Find a symbol in code | Grep (files_with_matches) | Explore agent, Read + scan |
| Read specific lines | Read (offset/limit) | cat, head, full-file Read |
| Simple edit | Edit | sed, awk, Write (full rewrite) |
| Repeated pattern edit | Edit with replace_all: true | Multiple individual Edits |
Don't use Explore/Task agent when:
Do use Explore agent when:
Don't invoke a skill when:
Do invoke a skill when:
BAD: Read(file, offset=1, limit=2000) // entire file, huge context cost
BAD: Read(file) // same — default reads everything
OK: Read(file, offset=350, limit=50) // 50 lines around target
GOOD: Read(file, offset=368, limit=5) // just the lines you need
After a Grep gives line 370, read lines 368-373 (offset=368, limit=6). Not 300-450.
replace_all: true — for patterns repeated across a file (e.g., renaming a variable). One Edit, not N.old_string just needs to be unique, not the whole function.Grep(pattern, output_mode="files_with_matches") — cheapest, just filenamesGrep(pattern, output_mode="content", -n=true) on the specific file — gives line numbersRead(file, offset=line-2, limit=10) — surgical readFor identical edits across multiple files:
Total: 1 Grep + N Reads + N Edits. Not a skill invocation + exploration.
| Anti-pattern | Cost | Fix |
|---|---|---|
| Explore agent for known files | ~50K tokens | Direct Grep + Read |
| Full-file Read to find one function | ~5K tokens | Grep for function name first |
| Reading file before every Edit | 2x reads | Read once, Edit, trust output |
| Loading large skill for small task | ~3K tokens | Just do the task directly |
| Re-reading after successful Edit | Wasted read | Edit tool already confirms |
| Sequential reads that could be parallel | Wasted turns | Batch into one message |
Run the build and intelligently fix errors with guardrails. Stops if fixes introduce more errors or the same error persists after 3 attempts.
Security and quality review of uncommitted changes. Checks for vulnerabilities, code smells, and best practice violations. Use before committing.
Create session learning logs that persist institutional memory across Claude Code sessions.
Deep reflection on the skill learning system itself. Analyzes what's working, what's stale, and proposes structural improvements. The meta-skill.
Deep security audit for web applications. Checks secrets, input validation, XSS, API security, and dependency vulnerabilities.
Pre-PR verification loop. Runs build, type check, lint, security audit, and debug statement scan. Use before creating PRs or merging.