Don't let Claude Code press "Publish": 5 lines of rules for "operations that go outside" to write in CLAUDE.md
Since Claude Code may perform operations close to publishing if instructed, this article introduces how to limit "operations that go outside," such as publishing, posting, or sending, by writing 5 lines of rules in CLAUDE.md.
Claude Code may perform operations close to publishing as they are if asked. It has been reported that when the author asked to "set published to true in article.md" without setting rules, the file was rewritten on the spot.
Even when giving bulk instructions such as "write it, and if it's done, publish it," it is often desirable to stop at the writing stage. This is because publishing or sending can sometimes be impossible to undo by oneself after pressing.
This article explains how to write 5 lines of rules in CLAUDE.md to ensure that Claude Code does not perform "operations that go outside," such as publishing, posting, or sending, even if asked.
This item is a summary. The full, checkable version is at the original source:
Read the original at Zenn (Claude Code) ↗