agentleFS
darkroomengineeringdarkroomengineering/cc-settings/skills/consolidate/SKILL.md

consolidate

Skill47 starsChanged 2 months agoMITView on GitHub

Audit and prune rules, skills, and learnings to cut context bloat. Triggers "consolidate", "clean up rules", "what's redundant", or degraded agent performance from oversized instructions.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 13 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read all rules and flag:

    line 40
  2. Distinctive:

    Read all skill descriptions and flag:

    line 47
  3. Distinctive:

    Remove rules that duplicate AGENTS.md guardrails

    line 56
  4. Distinctive:

    Remove rules for problems that no longer occur

    line 57
  5. Very specific:

    Remove unused skills. In Claude Code, run native /skill-doctor first: it reports which loaded skills went unused and what each costs in …

    line 62
  6. Distinctive:

    Ensure distinct, non-overlapping trigger phrases

    line 64
  7. Distinctive:

    Remove entries about long-fixed bugs

    line 68
  8. Distinctive:

    Remove entries about deprecated patterns

    line 69
  9. Distinctive:

    If it exceeds ~100 lines of content, extract inline sections into rules or skills.

    line 80
  10. Distinctive:

    Start a fresh Claude Code session

    line 84
  11. Distinctive:

    Test that key skills still trigger

    line 85
  12. Distinctive:

    Verify no regressions in agent behavior

    line 86
  13. Distinctive:

    Ask the user about rules you're unsure about

    line 87
  14. Distinctive:

    Ask before deleting — the user may have reasons you don't see

    line 114

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Consolidate Rules, Skills, and Learnings

Standalone Codex mode

Audit ${CODEX_HOME:-$HOME/.codex}/AGENTS.md, native ${CODEX_HOME:-$HOME/.codex}/agents/, native ${CODEX_HOME:-$HOME/.codex}/rules/, and the managed skills in the real cc-settings checkout named by ${CODEX_HOME:-$HOME/.codex}/.cc-settings-version repo_path. Validate that path is a git checkout of darkroomengineering/cc-settings before treating it as source. The installed plugin/cache and darkroom/source runtime copy may be read to diagnose drift, but must never be edited as though either were the git source.

Claude auto-memory and CLAUDE.md cleanup are unavailable in standalone Codex. Skip those counts and phases rather than redirecting them into ~/.claude. Verify native agent/rule references and managed source skill triggers, then ask before deleting anything.

The remaining path examples describe Claude Code.

Phase 1: Audit

Count everything

echo "Rules:" && ls ~/.claude/rules/*.md 2>/dev/null | wc -l
echo "Skills:" && ls -d ~/.claude/skills/*/SKILL.md 2>/dev/null | wc -l
echo "Auto-memory entries:" && find ~/.claude/projects/*/memory -name "*.md" -not -name "MEMORY.md" 2>/dev/null | wc -l
echo "CLAUDE.md lines:" && wc -l ~/.claude/CLAUDE.md 2>/dev/null
echo "AGENTS.md lines:" && wc -l ~/.claude/AGENTS.md 2>/dev/null

Check for contradictions

Read all rules and flag:

  • Opposites ("always X" in one, "never X" in another)
  • Significant overlap (two rules covering the same concern)
  • References to outdated tools, patterns, or dependencies
  • Vague rules that aren't actionable

Check skill triggers

Read all skill descriptions and flag:

  • Overlapping trigger phrases between skills
  • Skills that never get invoked (ask the user)
  • Outdated instructions

Phase 2: Merge and Deduplicate

Rules

  • Merge rules covering the same concern
  • Remove rules that duplicate AGENTS.md guardrails
  • Remove rules for problems that no longer occur
  • Tighten vague rules into specific instructions

Skills

  • Merge skills with overlapping triggers
  • Remove unused skills. In Claude Code, run native /skill-doctor first: it reports which loaded skills went unused and what each costs in context, so prune from its numbers rather than by guess
  • Update outdated instructions
  • Ensure distinct, non-overlapping trigger phrases

Auto-memory

  • Review entries under ~/.claude/projects/<hash>/memory/
  • Remove entries about long-fixed bugs
  • Remove entries about deprecated patterns
  • Consolidate similar entries into one

Phase 3: Simplify CLAUDE.md

CLAUDE.md should be a routing table:

  • Points to AGENTS.md for standards
  • Points to rules for specific concerns
  • Points to skills for specific workflows
  • Minimal inline content

If it exceeds ~100 lines of content, extract inline sections into rules or skills.

Phase 4: Verify

  1. Start a fresh Claude Code session
  2. Test that key skills still trigger
  3. Verify no regressions in agent behavior
  4. Ask the user about rules you're unsure about

Output Format

## Consolidation Report

### Changes Made
- Merged: [list]
- Removed: [list]
- Updated: [list]

### Current State
- Rules: N (was M)
- Skills: N (was M)
- Learnings: N (was M)
- CLAUDE.md: N lines (was M)

### Flagged for User Review
- [Item]: [Why it needs human judgment]

### Recommendations
- [Further cleanup suggestions]

Remember

  • Ask before deleting — the user may have reasons you don't see
  • Fix contradictions first — they cause the most confusion
  • Overlapping triggers cause skill mis-invocation
  • 10 sharp rules beat 30 vague ones

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.