Keyboard shortcuts

Press ← or β†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Agent Instructions

donttouch can inject rules directly into AI agent configuration files, telling agents not to modify protected files.

Supported Agents

AgentFileBehavior
Claude CodeCLAUDE.mdAppends if file exists
OpenClaw / CustomAGENTS.mdAppends if file exists
Cursor.cursor/rules/donttouch.mdcCreates file
Codexcodex.mdAppends if file exists
GitHub Copilot.github/copilot-instructions.mdAppends if file exists

Usage

donttouch inject

Preview without writing:

donttouch inject --dry-run

What Gets Injected

Each file gets a block wrapped in markers:

<!-- donttouch:managed -->
## Protected Files (donttouch)

The following files are protected by donttouch and must not be modified:
- *.toml
- migrations/**

Do not edit, move, rename, or delete these files.
<!-- /donttouch:managed -->

Idempotency

Running inject multiple times is safe. The <!-- donttouch:managed --> markers are checked β€” if the block already exists, it’s updated in place rather than duplicated.

Cleanup

donttouch remove strips the injected blocks from all agent files.