Skip to main content

Oaken AI Workspace Optimizer

Analyze and optimize your Claude Code workspace. Reduce context bloat, improve memory visibility, and get a detailed health report.

Built by Oaken AI based on patterns from Claude Code's internal architecture.

What It Does

Scans your Claude Code workspace and generates a visual HTML report showing:

  • Health Score (0-100) based on context efficiency
  • Memory Analysis - index size, visibility percentage, inline bloat detection
  • Rules Audit - always-on context lines, reference tiering candidates
  • Prioritized Recommendations - what to fix first, estimated time, expected impact

Why This Matters

Claude Code loads your MEMORY.md and rules on every turn change. Bloated context doesn't just waste tokens - it degrades the model's ability to follow the instructions that actually matter.

Common problems this tool catches:

  • Silent truncation: MEMORY.md over 200 lines means Claude silently ignores everything after line 200
  • Context bloat: Reference material (SQL guides, API docs) loaded on every session even when irrelevant
  • Missing topic files: All memory inline instead of using the three-layer pattern (index -> topics -> raw data)

Requirements

  • Python 3.10+
  • Zero dependencies (pure Python stdlib)
  • Does NOT need to be installed inside your Claude Code workspace
  • Read-only analysis. Never modifies your files.

Install

pip install claude-workspace-optimizer

Usage

Run from anywhere. Point it at any Claude Code project directory.

# Scan current directory (if it has a .claude/ folder)
claude-workspace-optimizer

# Scan a specific project (recommended)
claude-workspace-optimizer /path/to/your/project

# Generate report and open in browser
claude-workspace-optimizer /path/to/your/project --open

# Also export raw metrics as JSON
claude-workspace-optimizer --json

# Save reports to a custom directory
claude-workspace-optimizer --output ./my-reports/

The tool looks for .claude/ in the target directory (and ~/.claude/ for global rules). It scans MEMORY.md, rules, hooks, skills, and settings. The report is saved to workspace-report/ inside the target directory by default.

Pro tip: After reviewing the report, feed it to your Claude Code instance:

"Read workspace-report/assessment.html and implement the P0 and P1 recommendations"

Claude can self-modify your MEMORY.md, rules, and file structure based on the findings. Always review the changes before accepting.

Example Output

  Scanning: /home/user/my-project
  Output:   /home/user/my-project/workspace-report/

  Health Score: 42/100
  Total Context: 4,129 lines loaded per session
  Memory Visibility: 54% (373 lines, cap 200)
  Rules: 40 files, 3,756 lines always-on
  Issues: 4
  Recommendations: 3

Before Optimization (Score: 36/100)

Before optimization - bloated workspace

After Optimization (Score: 85/100)

After optimization - clean workspace

Full Assessment Report

Full assessment report

The Patterns

This tool checks your workspace against patterns from Claude Code's own internal architecture:

  1. Three-Layer Memory - Lightweight index (always loaded) pointing to topic files (on-demand)
  2. Reference Tiering - Core behavior rules always-on, reference material loaded when needed
  3. Memory Budget - 200-line index cap, 25KB max size, entries under 150 characters
  4. Skeptical Verification - Memory as hints, not facts. Stale reference detection.

Read the full analysis: How We Applied Claude Code Patterns to Cut Context by 66%

About Oaken AI

Oaken AI builds AI automation systems for businesses. From workspace optimization to full production AI pipelines.

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.

Pro tip: You can feed the generated report to your Claude Code instance and ask it to implement the recommendations. Claude can read the HTML and self-modify your MEMORY.md, rules, and file structure. You are responsible for reviewing and approving all changes.

Author

Built by Benjamin Brown at Oaken AI.

License

MIT

Metadata

Release files for claude-workspace-optimizer 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for claude-workspace-optimizer 0.1.0
File Size Uploaded
claude_workspace_optimizer-0.1.0.tar.gz 603.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for claude-workspace-optimizer 0.1.0
File Interpreter ABI Platform
claude_workspace_optimizer-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 618.2 kB

Release files / claude_workspace_optimizer-0.1.0.tar.gz

Download URL claude_workspace_optimizer-0.1.0.tar.gz
Size 603.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d9b4785e6c4e73388984bc034e0888f0b62e91503fec3f931dcd8a489c0f24d9
BLAKE2b-256 checksum
How to use checksums
d0641cbe2c14302243206e8543f375eb466cffdef9401d81fe700e9045df9a80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / claude_workspace_optimizer-0.1.0-py3-none-any.whl

Download URL claude_workspace_optimizer-0.1.0-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
820325da66c669e01b140e1a0dcae89299ddc6c5785bfa4836fb133ca10ff797
BLAKE2b-256 checksum
How to use checksums
0085089e4fcd1a574800a06c7fff12cfdec09d2b686b6552ffa394c3ce9805bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page