Instruction files
Managed-block injection for AGENTS.md, CLAUDE.md and SOUL.md, with your own content preserved byte for byte.
Updated · 2026-11-02
Instruction files are the easiest thing to destroy: plenty of tools rewrite the whole file and your hand-written notes are gone. AgentHub only ever writes inside a managed block.
The managed block
Everything written is wrapped in a pair of markers:
<!-- agenthub:begin -->
The content you want to distribute
<!-- agenthub:end -->
Anything outside the markers is preserved byte for byte. A missing file is created; an existing file without markers gets the block appended, never replaced wholesale.
Supported files
| File | Typically read by |
|---|---|
AGENTS.md | Codex, OpenCode and others |
CLAUDE.md | Claude Code |
SOUL.md | Hermes |
Bridging
When several tools read the same file, bridge instead of duplicating:
@AGENTS.md
Put that line in CLAUDE.md and the real content still lives in exactly one place.
Scope
- Global instruction files apply to every project.
- A project’s
.agenthub/project.jsonrecords which entries are enabled there; links and blocks are created only inside that project.
Block content goes through plans and backups too. The plan shows a diff per file, and unchecking a row means it is not written.