xguilxr/claudio-enterprises/context-debloat

Claude Code and agent skill by xguilxr/claudio-enterprises

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Audit and shrink what Claude Code loads at session start in any repository, then keep it lean. Use when CLAUDE.md is too big, when sessions start heavy, when the token budget is exceeded, or when someone asks for a context audit, a debloat, or "solo lo abierto". Do not use it to write a new CLAUDE.md from scratch — use claude-md-architect for that.

Install

npx vskill@latest install xguilxr/claudio-enterprises/context-debloat

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as xguilxr/claudio-enterprises/context-debloat.

Context debloat

Framework: MCA · Helps satisfy: CTX-02..CTX-07 Human confirmation required for: deleting content that has no archive copy

Operating contract

This is an internal, fix-first audit. Do it in ONE pass.

  1. Find everything first. Do not report findings one by one.
  2. Fix every finding that is mechanical, reversible with git, and free of owner decisions.
  3. Defer only owner decisions. Put them in the final report with a recommended option.
  4. Report ONCE, at the end, in the table format of references/procedure.md §7.
  5. Do not write prose between steps. One status line per step is the maximum.

Procedure

Full detail per step: references/procedure.md. Read references/gotchas.md BEFORE step 4. Each entry broke a real debloat.

1. MEASURE
  • Inventory the always-on weight: root and nested CLAUDE.md files, .claude/settings.json, .mcp.json, skills, agents, commands.
  • Map the de-facto weight: docs that CLAUDE.md rules force-load nearly every session.
  • Estimate chars and tokens per item (tokens ≈ chars / 4).
  • Detect existing context-budget tooling before you add any.
2. MAP ENFORCEMENT — before you edit anything
  • Find pre-commit hooks, CI jobs, and tests that pin doc paths, front-matter schemas, content literals, ratchet counters, or budgets.
  • Grep the tests for read_text and rglob calls over docs.
  • Write down everything you find. This list is a hard constraint. The debloat must not break it.
3. CLASSIFY every CLAUDE.md section
VerdictCriterionAction
KEEPHard rule with no mechanical enforcementKeep, compressed
MOVEProcedure duplicated by tooling or docsMove to a trigger-loaded doc or a skill
DELETEHistorical narrative, provenance dates, before/after examples, debt notes tracked elsewhereRemove
PATH-SCOPERule applies only to some pathsNested CLAUDE.md or a skill — real mechanisms only

Never propose .claude/rules/ with paths: front matter. It is not a real mechanism.

4. TRIM trigger-loaded docs to "only open items"
  • Archive closed content: move + metadata flip + pointer + inbound-link fixes, all in ONE commit.
  • Fix trigger rows whose condition is false.
  • Route large unrouted files. Fix broken links. Merge duplicate indexes into one.
5. RULES → SETTINGS
  • Convert each "never do X" sentence into a permissions.deny entry or a PreToolUse hook in .claude/settings.json.
  • Shrink the prose to one line that points at the setting.
  • Sentences get ignored; settings block.
6. VERIFY & REPORT
  • Re-run every gate from step 2 after each commit.
  • Emit the single report: chars before/after per always-on file, lines before/after per trimmed doc, deferred items with their owner.

Quality gates

  • [ ] Step 2 ran before any edit. The constraint list exists in the report.
  • [ ] Every gate from step 2 re-ran green after each commit.
  • [ ] No section number and no rule ID moved (gotchas 1 and 6).
  • [ ] Every fix landed in this pass. Deferred items carry an owner and a recommendation.
  • [ ] The report fits on one screen.

Maintenance loop

claude-md-architect defines the target shape; this skill keeps it lean over time. Run this skill when the CLAUDE.md grows past its declared budget, and at least quarterly.

References

  • references/procedure.md — full method, measurement heuristics, report template
  • references/gotchas.md — field-tested failure modes; read before editing

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

Popularity

7-day trend score
0

Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/xguilxr/claudio-enterprises/context-debloat/badge)](https://verified-skill.com/skills/xguilxr/claudio-enterprises/context-debloat)

Something wrong with this skill or its page? Tell us.