plugins/claude-ecosystem/skills/performance-optimization/SKILL.md
Best practices for Claude Code performance optimization, context management, storage cleanup, and troubleshooting slowdowns
npx skillsauth add melodic-software/claude-code-plugins performance-optimizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Comprehensive guidance for optimizing Claude Code performance. This skill covers storage management, context window optimization, and troubleshooting common performance issues.
Keywords: slow, performance, lag, storage, cleanup, cache, context, compact, clear, sessions, agents, bloat, optimization, speed
Use this skill when:
| Symptom | Quick Fix | Command |
|---------|-----------|---------|
| General slowness | Clean storage | /cleanup-sessions 7 |
| Input lag | Reset context | /clear |
| API errors | Check status | /check-api-status |
| Unknown cause | Full diagnostic | /diagnose-performance |
| Command | Purpose |
|---------|---------|
| /user-config storage | Analyze storage usage |
| /user-config cleanup-sessions [days] | Remove old session files |
| /user-config cleanup-agents [days] | Remove old agent files |
| /user-config prune-cache [days] | Comprehensive cleanup |
| /diagnose-performance | Full diagnostic |
| /list sessions | View recent sessions |
| /user-config session-stats | Session statistics |
| /check-api-status | API status check |
| /check-context | Context window analysis |
Claude Code stores conversation history in ~/.claude/:
~/.claude/
├── projects/ # Session history (can grow large!)
│ └── {project-hash}/
│ ├── {session-id}.jsonl # Conversation transcripts
│ └── agent-{id}.jsonl # Subagent transcripts
├── todos/ # Todo state
├── statsig/ # Analytics cache
└── history.jsonl # Command history
Key insight: The projects/ folder grows indefinitely with usage. Heavy users can accumulate 1GB+ of session data.
See: references/storage-management.md for detailed guidance.
Claude Code uses a 200K token context window. Performance degrades as it fills:
| Usage | Status | Action | |-------|--------|--------| | < 50% | Healthy | No action | | 50-75% | Monitor | Consider compacting | | 75-85% | Warning | Run /compact or /clear | | > 85% | Critical | Immediate action |
Key commands:
/clear - Complete context reset/compact - Intelligent summarization/cost - View token usageSee: references/context-management.md for detailed guidance.
Several GitHub issues document known performance problems:
Note: Issue numbers below are point-in-time references and may have been closed, merged, or superseded. For current issues, spawn the
claude-code-issue-researcheragent or querydocs-management: "performance issues"for updated tracking.
| Issue | Description | Workaround | |-------|-------------|------------| | #10881 | Performance degrades in long sessions | Restart periodically | | #14552 | Input lag at high context | Use /clear at 75% | | #14476 | Regression even at 30k tokens | Update to latest version | | #1497 | Keyboard responsiveness issues | Restart Claude Code |
See: references/known-issues.md for detailed tracking.
/check-claude-storage weekly/cleanup-sessions 7Claude Code is slow
│
├─> Check storage: /check-claude-storage
│ └─> If >500MB: /cleanup-sessions 7
│
├─> Check context: /check-context
│ └─> If WARNING+: /clear or /compact
│
├─> Check API: /check-api-status
│ └─> If degraded: Wait or reduce load
│
└─> Full diagnostic: /diagnose-performance
└─> Follow recommendations
| Skill | Relationship |
|-------|-------------|
| docs-management | For official Claude Code documentation |
| memory-management | For CLAUDE.md optimization |
Load these for detailed guidance:
references/context-management.md - Context window optimizationreferences/storage-management.md - Storage cleanup strategiesreferences/known-issues.md - GitHub issues and workaroundsDate: 2025-12-26 Model: claude-opus-4-5-20251101
development
Search Milan Jovanovic's .NET blog for Clean Architecture, DDD, CQRS, EF Core, and ASP.NET Core patterns. Use for finding applicable patterns, code examples, and architecture guidance. Invoke when working with .NET projects that could benefit from proven architectural patterns.
tools
Install and configure Data API Builder (DAB) for production SQL Server MCP access with RBAC
tools
Manage MssqlMcp servers - status, rebuild, and upstream updates
tools
Developer environment setup guides for Windows, macOS, Linux, and WSL. Use when setting up development machines, installing tools, configuring environments, or following platform-specific setup guides. Covers package management, shell/terminal, code editors, AI tooling, containerization, databases, and more.