instruction-file-splitting

Split long instruction markdown into a parent router and topic-owned sub-files.

Updated May 3, 2026
One-click install
npx skills add https://github.com/tykhoncode/dicekit --skill instruction-file-splitting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: instruction-file-splitting
Source: https://github.com/tykhoncode/dicekit/tree/main/.claude/skills/instruction-file-splitting
Command: npx skills add https://github.com/tykhoncode/dicekit --skill instruction-file-splitting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents instruction-heavy markdown files from exceeding model context thresholds where later rules get silently compressed or dropped, causing agents to miss important constraints.

Core Features & Use Cases

  • Rule-preserving splitting: Breaks long instruction content into a short parent plus topic-owned sub-files so every rule is honored.
  • Hard-rule placement: Ensures MUST/NEVER/ALWAYS “iron rules” stay in the parent at the very top, never duplicated in sub-files.
  • On-demand detail routing: Creates a concrete “read when” pointer table so the agent loads the right depth only when a specific situation occurs.
  • Trigger-based refactoring: Splits when files are 280+ lines, edits would push past 300, nesting gets too deep, or duplicated hard rules appear.
  • Safety checklist: Verifies the parent stays under 150 lines and sub-files remain under 300 while avoiding vague pointers and duplicated rules.

Quick Start

Use the instruction-file-splitting skill to split your instruction markdown into a short router SKILL.md and topic-specific references when the file is near or above 300 lines.

Frequently Asked Questions about instruction-file-splitting

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

FAQPage Schema
How do I prevent context compression from dropping agent rules in long markdown files?

To prevent context compression from dropping agent rules, split long markdown files into a short parent router and topic-owned sub-files. This ensures iron rules remain in the parent and later rules are not silently lost by model context limits.

When should I split my agent instruction markdown into sub-files?

You should split agent instruction markdown when files reach 280–300 lines, when edits would cross that boundary, or when deep nesting and duplicated hard rules threaten coherence. Splitting keeps parent files under 150 lines and sub-files under 300.

What is the best way to manage MUST and NEVER rules when splitting documentation?

The best way to manage MUST and NEVER rules during documentation splitting is placing these iron rules at the very top of the parent router file. You must prevent duplication across sub-files to maintain rule enforcement and coherence.

How do I route agents to the correct sub-file after splitting instruction markdown?

Route agents to the correct sub-file by creating a concrete read when pointer table in the parent router. This on-demand detail routing ensures the agent loads the right depth only when a specific situation occurs.

Does instruction file splitting work with existing SKILL.md agent workflows?

Yes, instruction file splitting works with existing SKILL.md agent workflows by refactoring the long instruction document into a short parent router and topic-specific references. It applies when the SKILL.md is near or above 300 lines.

What are the limitations of splitting long markdown instruction files?

Limitations of splitting markdown instruction files include the strict requirement to keep the parent under 150 lines and sub-files under 300. You must also avoid vague pointers and duplicated rules across files to prevent coherence issues.