FREE & OPEN SOURCE

Claude Workspace Optimizer
Your setup is leaking context.

46% of our AI memory was invisible. 3,756 lines of rules loaded every session. One scan found it all. This free tool does the same for your workspace.

pip install claude-workspace-optimizer

Then run claude-workspace-optimizer --open in your project directory

200
Line visibility cap
66%
Context reduced
50min
To optimize
$0
Cost

What the optimizer finds

CRITICAL

Invisible Memory

MEMORY.md over 200 lines? Claude silently ignores everything after line 200. You're running with amnesia and don't know it.

WARNING

Context Bloat

Reference material (SQL guides, API docs, framework templates) loaded on every session even when you're doing something completely unrelated.

WARNING

Inline Memory Bloat

Full tables, code blocks, and multi-line content jammed into the memory index instead of linked topic files. Wastes your 200-line budget.

INFO

Missing Reference Tiering

Claude Code loads tool definitions on-demand, not all at once. Your rules should work the same way: core behavior always-on, reference material on-demand.

Requirements

  • Python 3.10+ (check with python --version)
  • Zero dependencies - pure Python stdlib
  • Does NOT need to be installed inside your Claude Code workspace
  • Read-only analysis - never modifies your files

How it works

1

Install (from anywhere)

pip install claude-workspace-optimizer
2

Point it at your project

claude-workspace-optimizer /path/to/your/project --open
3

Read the report

Opens a visual HTML report in your browser with health score, issues, and prioritized recommendations.

4

Ask Claude to fix it

Feed the report to your Claude Code instance: "Read workspace-report/assessment.html and implement the P0 recommendations." Review the changes before accepting.

Before & after

BEFORE - SCORE: 36/100

Claude Code workspace before optimization - health score 36

AFTER - SCORE: 85/100

Claude Code workspace after optimization - health score 85

FULL ASSESSMENT REPORT

Claude workspace optimizer full assessment report with health score, issues, and recommendations

Our results: 66% less context, zero data lost

We built this tool after applying patterns from the Claude Code source leak to our own 462-skill, 18-container persistent AI environment.

MetricBeforeAfterChange
Memory index373 lines58 lines-84%
Memory visibility54%100%+46%
Always-on rules3,756 lines1,336 lines-64%
Total session context4,129 lines1,394 lines-66%
Topic files2536+11
Information lost--Zero

Based on Claude Code's own architecture

The optimization patterns come from how Anthropic built Claude Code's memory system internally. These aren't guesses. They're engineering decisions from the team that built the tool.

Three-Layer Memory

Lightweight index (always loaded) pointing to topic files (on-demand). 200-line cap on the index. Each entry under 150 characters.

Reference Tiering

Core behavior rules always-on. Reference material (SQL patterns, API docs) loaded only when relevant. Not every session.

Memory Consolidation

Claude Code runs an internal 'autoDream' process that prunes, merges, and enforces budgets on memory. Memory that only grows eventually breaks.

Skeptical Verification

Memory is treated as a hint, not a fact. Before acting on something remembered, verify it against the actual codebase.

Frequently asked questions

Does this send my data anywhere?+
No. The tool runs entirely on your machine. No API calls, no data collection, no telemetry. Your code never leaves your computer.
Does it work with any Claude Code project?+
Yes. It scans the .claude/ directory structure, MEMORY.md, rules, hooks, and settings. Works with any project that uses Claude Code.
Can it automatically fix the issues?+
The optimizer itself generates the report - it doesn't modify your files. However, you can feed the report directly to your Claude Code instance and ask it to implement the recommendations. Claude can read the HTML report and self-modify your MEMORY.md, rules, and file structure based on the findings.
Why is memory visibility so important?+
Claude Code loads the first 200 lines of MEMORY.md into every session. Lines 201+ are invisible. If your memory index is 400 lines, half your stored knowledge is silently ignored every time you start a conversation.
What's the ideal workspace health score?+
80+. Most unoptimized workspaces score 40-60. After applying the recommended fixes, 85-95 is typical.

Share with your team

Know someone fighting Claude Code context issues? This tool is free. Share it.

pip install claude-workspace-optimizer

MIT license. Open source. View on GitHub | View on PyPI

Disclaimer: This tool is provided as-is with no warranty. Oaken AI and its contributors accept zero responsibility for any changes made to your workspace based on this tool's output. The report contains recommendations, not instructions. Always review changes before applying them. Back up your workspace before making modifications. If you use Claude Code to implement the recommendations, you are responsible for reviewing and approving all changes it makes.

BUILT BY OAKEN AI

Need more than a workspace scan?

Oaken AI builds AI automation systems for businesses. From workspace optimization to full production pipelines, we help teams get more from their AI tools.