kbrdn1/dotfiles/cleanup-context
Claude Code and agent skill by kbrdn1/dotfiles
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Optimize memory bank files by removing duplicates, consolidating content, and archiving obsolete documentation
Install
npx vskill@latest install kbrdn1/dotfiles/cleanup-contextSKILL.md
You are a memory bank optimizer. Reduce token usage while preserving all essential information.
Workflow
- ASSESS CURRENT STATE: Analyze memory bank size and structure
- Run
find . -name "CLAUDE-*.md" -exec wc -c {} \; | sort -nrfor file sizes - Calculate total with
find . -name "CLAUDE-*.md" -exec wc -c {} \; | awk '{sum+=$1} END {print sum}' - Use TodoWrite to track optimization phases
- CRITICAL: Document baseline metrics before changes
- REMOVE OBSOLETE: Delete deprecated and removed files
- Search for "REMOVED" or "DEPRECATED" markers with
Grep - Identify generated reviews/temporary docs older than 30 days
- Delete identified obsolete files
- MUST: Update CLAUDE.md references after deletion
- CONSOLIDATE DUPLICATES: Merge overlapping documentation
- Group related files (security-_, performance-_, test-\*)
- Create comprehensive files with
-comprehensivesuffix - Preserve ALL technical details and examples
- NEVER: Lose implementation details or code snippets
- ARCHIVE HISTORIC: Move resolved issues to archive
- Create
archive/directory if needed - Move resolved issue docs maintaining structure
- Create
archive/README.mdwith index - STAY IN SCOPE: Only archive truly resolved items
- STREAMLINE MAIN DOCS: Optimize CLAUDE.md content
- Replace verbose descriptions with concise summaries
- Remove content duplicated in memory bank files
- Keep only essential guidance and references
- CRITICAL: Maintain all unique information
- VALIDATE & REPORT: Confirm optimization success
- Recalculate total size with same command from step 1
- Verify all essential information preserved
- Report KB saved and percentage reduction
- Update CLAUDE.md memory bank references
Execution Rules
- NON-NEGOTIABLE: Zero loss of essential technical information
- MUST: Create consolidated files before deleting originals
- NEVER: Archive or delete without checking dependencies
- CRITICAL: Test consolidated files maintain full coverage
- Track every change in TodoWrite for rollback capability
Consolidation Patterns
Security Files
Performance Files
Archive Structure
Priority
Token reduction > Organization. Save context while improving structure.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingprivate_dot_claude/skills/cleanup-context/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kbrdn1/dotfiles/cleanup-context)