focus
Skill0 starsChanged 6 months agoMITView on GitHub
Tidy and right-size the files Claude loads on every session — CLAUDE.md and the memory index MEMORY.md. Analyzes them for obsolete content, disorganization, and size-limit problems, then proposes a plan (delete obsolete / reorder / split oversized files into indexed topic files) for the user to approve before applying anything. Use when the user runs /focus, asks to clean up, trim, or check their CLAUDE.md or memory, mentions context hygiene, or when these files have grown stale or oversized.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- whawkinsiv/solo-founder-skillstheir own version, first seen Oct 25, 2026
- wheslleyrimar/BuildCLI-Agentstheir own version, first seen Oct 22, 2026
- whawkinsiv/claude-code-skillstheir own version, first seen Oct 17, 2026
- yanfeid/claude-ambertheir own version, first seen Oct 13, 2026
- Haumer/claude-skillstheir own version, first seen Oct 11, 2026
- devinat1/skillstheir own version, first seen Oct 6, 2026
Used with
Projects with it also use build.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Microsoft AzureSkillbuild
Build the TypeSpec Rust emitter from source. Run this after cloning the repo, after pulling changes, or when TypeScript source files have been modified.
Also in 3 projects that use this
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- whawkinsiv/solo-founder-skills★ 260same name
- whawkinsiv/claude-code-skills★ 258same name
- kennethleungty/claude-music★ 23same name
- wheslleyrimar/BuildCLI-Agents★ 3same name
- yanfeid/claude-amber★ 2same name
- devinat1/skills★ 1same name
- vishk23/screenblock-mcp★ 1same name
- breethomas/bette-os★ 0same name
- Haumer/claude-skills★ 0same name
- markbaindesign/bain-studio★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
Analyze → propose → confirm: Never silently rewrite CLAUDE.md or MEMORY.md.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
focus — context-file hygiene
Keeps the files Claude loads on EVERY session lean, accurate, and well-indexed: CLAUDE.md (project and user-global ~/.claude/CLAUDE.md) and the memory index MEMORY.md. Bloat, staleness, or exceeding size limits in these files silently degrade every session — through truncation, misleading instructions, and attention diluted by noise.
This skill only analyzes and proposes. Never edit CLAUDE.md or MEMORY.md without explicit user confirmation.
Why it matters
MEMORY.mdis loaded every session as the routing index — but only the first 200 lines or 25 KB, whichever comes first; beyond that it's truncated (not loaded at startup, only readable on-demand), so part of the index silently disappears and relevant memories may never be recalled. [docs: code.claude.com/docs/en/memory]CLAUDE.mdis loaded every session as instructions. Stale content actively misleads (e.g. pointing to deleted files); bloat costs tokens every turn and dilutes attention away from what matters.- Nested
CLAUDE.md/AGENTS.md(in subfolders) are loaded on-demand — only when you work in that subtree, not every session. So they carry no per-session tax, and the MEMORY ~200-line truncation rule does NOT apply to them. But a stale nested file still misleads while you work there → check them too, with a lighter pass, and only the ones that are yours. AGENTS.md: Claude Code does not auto-load it (it readsCLAUDE.md). It enters context only if bridged — via an@AGENTS.mdimport insideCLAUDE.md(imports are expanded at launch → it becomes effectively always-loaded), or aCLAUDE.md→AGENTS.mdsymlink (Windows needs admin → prefer the@import). So check its bridge status to pick the case: (a) bridged → full CLAUDE.md treatment (bridge + duplicated content = double-paid → consolidate); (b) unbridged & for another tool → not in your context → skip it, don't edit; (c) unbridged BUT full of real project instructions → Claude is silently IGNORING them → flag it ("bridge via@importor those instructions are lost") — the opposite of bloat: missing context. [docs: code.claude.com/docs/en/memory#agents-md].claude/agents/(subagent definitions) are a DIFFERENT thing fromAGENTS.mddespite the name: one.mdper subagent (frontmatter + system-prompt body). Per docs: descriptions are surfaced for the delegation decision (not a fixed per-session startup tax), and each body loads only when that subagent is invoked, in its own context. So treatment = prune unused subagents + keep descriptions sharp (clarity drives correct delegation), but never trim a working system-prompt for tokens (you'd break its behavior). [docs: code.claude.com/docs/en/sub-agents]
Best-practice sizes
- MEMORY.md → a lean index: ideally one line per memory, with detail pushed to separate topic files. Keep well under the 200-line / 25 KB load cap. It should read as a list of pointers, not a content dump.
- CLAUDE.md → focused and accurate: no hard limit, but treat a few hundred lines as a soft ceiling. Keep it as the entry index + active rules + current state; move reference material and long detail into linked docs.
Procedure
- Locate & measure. Find the always-loaded files: the project
CLAUDE.md, the user-global~/.claude/CLAUDE.md, and the projectMEMORY.md(plus its topic files, if any). Report each file's line count and approximate tokens (bytes ÷ 4). Also expand any@pathimports inside the always-loadedCLAUDE.md— imported files are loaded at launch (up to 4 hops deep), so they count toward the always-loaded budget; measure and tidy them too. Then find nestedCLAUDE.md/AGENTS.mdin the repo — but EXCLUDE vendored/third-party trees:node_modules/,vendor/,.git/, and any cloned dependency or sub-repo (a subdir with its own.git). Those instruction files are upstream's, not yours. The remaining (yours) nested files get the same staleness/organization pass, but as context-loaded (no per-session-tax, no MEMORY line-limit framing). - Flag size issues. MEMORY.md over the line limit (→ truncated on load), or CLAUDE.md oversized.
- Detect content issues:
- Obsolete — references to deleted files/dirs, outdated dates/snapshots, completed or dead tasks, superseded sections.
- Disorganized — detail inline that belongs in a linked or topic file; mixed concerns; a missing or stale index.
- Oversized — a file past its best-practice size → candidate to split: move detail into topic files and leave a one-line pointer in the index.
- Duplication — if
AGENTS.mdis bridged intoCLAUDE.md(via@AGENTS.mdimport or symlink) AND the same instructions are also duplicated inline inCLAUDE.md, they load twice → propose keepingAGENTS.mdas the single source and reducingCLAUDE.mdto the@AGENTS.mdimport + only Claude-specific extras. - Semantic rot (lint) — beyond dead file references: contradictions between entries/topic-files, stale-superseded claims (an entry a newer note has obsoleted), and orphan / dangling links (index→topic-file links that don't resolve, or topic files with no inbound link from the index). The link checks are mechanically verifiable — run them every time. (Inspired by the "lint" operation in Karpathy's LLM-Wiki gist.)
- Irrelevant-in-always-loaded (evict by next-step relevance) — content in the always-loaded layer that is reference-only / never conditions a decision → demote to a topic file even if it's small, because irrelevant tokens cost attention, not just budget. The eviction test is relevance-to-the-next-step, not age or size.
- Propose. Group findings by file. For each issue say what you'd do — delete / reorder / split + index / compact (merge redundancies) / evict to topic file / fix link / keep — and why. Present clearly (a short list, or AskUserQuestion for the key decisions). Recommend, but let the user choose.
- Apply on confirmation. Trim the index, move detail into topic files, update stale sections, merge self-declared redundancies (compaction), fix dangling/orphan links, and keep indices in sync (if you move or rename something, update whatever points to it). Report before/after line and token counts.
- Install the discipline (optional, once per project). So the project stays tidy between runs, offer to add a short context-hygiene rule to
CLAUDE.mdif it isn't already there. Confirm first, keep it to ~3 lines (don't bloat the file you just tidied), and skip if already present. Suggested text:Context hygiene — keep
MEMORY.mda lean index (one line per memory, detail in topic files, under the line limit) andCLAUDE.mdaccurate (no references to deleted files, current snapshot/date). Sync indices and snapshots in the SAME turn as the change, not later. Preserve info by moving it to topic files, not deleting.
This makes focus self-perpetuating: the skill is the periodic deep clean; the installed rule is the passive between-runs discipline that slows the drift.
Principles
- Analyze → propose → confirm. Never silently rewrite CLAUDE.md or MEMORY.md.
- Preserve by default. Move content to topic files rather than deleting; only delete what the user confirms is obsolete.
- Lean index, detail on demand. The always-loaded files hold pointers + active rules; everything else lives in linked docs recalled when relevant.
- Scope = what's loaded, not all
.md. Targets are only files that enter Claude's context — always-loaded (root/globalCLAUDE.md,MEMORY.md),@imported, contextual (nestedCLAUDE.md), or bridgedAGENTS.md. A plain doc/README that's never loaded is NOT focus's concern; being markdown doesn't make it in-scope. - Never touch vendored/upstream files. Nested
CLAUDE.md/AGENTS.mdinside cloned repos,node_modules, orvendorbelong to others — exclude them from the scan, never edit them. - Generic. Works in any project. What counts as "obsolete" or "important" is judged live with the user, not hardcoded.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

