split-memory

Split oversized CLAUDE instruction files into modular files with precedence rules.

224|87|Updated Dec 15, 2018
One-click install
npx skills add https://github.com/Resgrid/Core --skill split-memory-resgrid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: split-memory
Source: https://github.com/Resgrid/Core/tree/main/.opencode/skills/split-memory
Command: npx skills add https://github.com/Resgrid/Core --skill split-memory-resgrid

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of monolithic CLAUDE instruction files becoming too long, hard to navigate, and prone to conflicting guidance.

Core Features & Use Cases

  • Modular instruction organization: Split one large instruction file into multiple files grouped by concern, module, or team.
  • Clear loading strategy: Use Claude’s .claude/ directory discovery so the right instructions are available without manual juggling.
  • Conflict prevention via precedence rules: Apply a defined priority order so overlapping rules don’t create unpredictable behavior.
  • Guidance for when to split: Recommend splitting only when it improves maintainability (e.g., over ~300 lines or multiple teams need different guidance).

Quick Start

When your CLAUDE.md grows beyond about 300 lines or you need different guidance for multiple teams, split it into a concise root index plus topic files under .claude/instructions/ and ensure root rules have the highest precedence.

Frequently Asked Questions about split-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I split a large CLAUDE instruction file into modular files?

To split large CLAUDE instructions, divide the monolithic content into a concise root index plus topic files under `.claude/instructions/`, grouped by concern, module, or team for easier maintenance and discovery.

When should I modularize my Claude knowledge base instead of keeping one file?

You should modularize your Claude knowledge base when an instruction file exceeds approximately 300 lines, or when multiple teams or concerns need different rules to prevent conflicting guidance across the project.

How do precedence rules prevent conflicting instructions across multiple Claude files?

Precedence rules prevent conflicting instructions by applying a defined priority order, ensuring root rules maintain the highest precedence so overlapping guidance across modular files does not create unpredictable behavior.

Can I use the .claude/ directory discovery to load modular instructions automatically?

Yes, you can use Claude's `.claude/` directory discovery to load modular instructions automatically, ensuring the correct topic files are available without manual juggling or conflicting guidance.

What is the best way to organize project instructions for multiple teams?

The best way to organize project instructions for multiple teams is splitting monolithic files into modular topic files under `.claude/instructions/` with a concise root index and explicit precedence rules to prevent conflicts.

Why does my monolithic CLAUDE.md file cause unpredictable Claude behavior?

A monolithic CLAUDE.md file causes unpredictable behavior when it becomes too long and prone to conflicting guidance, which is resolved by splitting it into modular files with explicit precedence rules.