
Modular Prompts: Managing Complex Claude Code Skills with @include and @delegate
If you've been building AI agents with Claude Code, you've probably hit this wall: your SKILL.md starts as a clean 50-line file, and three months later it's a 400-line monolith that nobody wants to touch. There's a better way. The Problem with Monolithic Prompts As your Claude Code projects grow, a single SKILL.md tends to accumulate everything: Role definitions Domain knowledge (account codes, product catalogs, compliance rules) Output format specs Conditional logic for edge cases Changelog notes The result is a file that's hard to read, hard to test, and impossible to share across skills. When your "accounting assistant" and your "invoice generator" both need the same tax code definitions, you end up copy-pasting — and then maintaining two diverging copies. Sound familiar? The Solution: @include and @delegate dotmd-parser introduces two directives that bring modular design to prompt engineering. @include — inline composition @include path/to/file.md At runtime, the contents of the re
Continue reading on Dev.to Python
Opens in a new tab



