Write Intent Principle
Announce intent before writing files — one sentence stating what, where, and why, with an idempotence check that skips the Write entirely when state is already correct.
- Type
- Subagent
- Repository
- nyldn/claude-octopus
- GitHub stars
- 4.1k
- License
- MIT
- Repo last updated
- Sep 26, 2026
- Source file
- agents/principles/write-intent.md
What Write Intent Principle is
Write Intent Principle is a subagent published in the nyldn/claude-octopus repository on GitHub, which has about 4.1k stars. The repository describes itself as: “Run multiple AI models against the same research, design, or coding task. Surface disagreements before you ship.”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Write Intent Principle and get back a compact result.
How to install Write Intent Principle
Claude Code
- Download write-intent.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from agents/principles/write-intent.md, shared under the repository's MIT license. Read the full file on GitHub.
Before creating, overwriting, or rewriting any file as part of a command, skill, or agent workflow, you MUST:
1. Check for idempotence first
If the desired state already matches the current state, do not call Write at all. Confirm the state to the user and exit. The most common bug this prevents is writing config for a mode / setting / flag the user is already in — that's noise, not value.
Examples of state to check before writing:
- Target mode matches current mode → skip
- Target frontmatter field matches current field → skip
- Generated file is byte-identical to what you'd write → skip
2. Announce intent in one sentence
When a Write is needed, say what you're about to do before calling the tool. Format:
> Writing (create | update | overwrite) — <field/change> — because .
Example:
> Updating .claude/claude-octopus.local.md — setting knowledge_mode: false (was true) — because the user requested /octo:dev.
3. Never write "empty" config
Do not create a config file populated with defaults just to "mark" a state. Absent config is a legitimate state — it means "use defaults". Creating a file to restate defaults adds noise, makes diffs confusing, and implies the user opted into something they didn't.
4. Respect scope
Before writing to .claude/, ~/.claude-octopus/, ~/.claude/, or any user-owned directory from a command/skill, consider whether the file should live in:
- The plugin (committed, shipped to all users)
- The user's home (~/.claude/) — persists across projects
- The project workspace (.claude/) — per-project
- ~/.claude/scratchpad/ / — ephemeral working files
A user-facing command that writes to an unexpected scope (e.g. a "mode switch" that writes to project .claude/) needs to say which scope in its intent sentence.
Anti-Patterns (reject in review)
- ❌ /octo:dev writes .claude/claude-octopus.local.md when the file didn't exist and the user was already in default Dev Work Mode.
- ❌ A "setup" wizard silently creates configuration for every possible option even when not selected.
- ❌ An idempotent-looking operation overwrites a file with identical content, bumping its mtime and confusing build systems.
- ❌ A skill announces "I'll update your config" and then writes without showing the diff or field being changed.
Correct Patterns
- ✅ Check current state → already matches target → confirm to user → exit without Write.
- ✅ "Switching Knowledge Work → Dev Work — updating .claude/claude-octopus.local.md (knowledge_mode: true → false)." followed by the Write.
- ✅ "No .claude/claude-octopus.local.md exists — you're in default Dev Work Mode. Nothing to change." followed by no Write.
Scope
This principle applies to all Write operations initiated by skills, commands, and agents in this plugin. Tests in tests/unit/test-write-intent.sh enforce that user-facing mode-switch commands carry the idempotence check in their implementation instructions.
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Write Intent Principle?
Write Intent Principle is a subagent for Claude Code and Claude Cowork from the nyldn/claude-octopus repository on GitHub. Announce intent before writing files — one sentence stating what, where, and why, with an idempotence check that skips the Write entirely when state is already correct.
How do I install Write Intent Principle in Claude Code?
Download write-intent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use Write Intent Principle in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is Write Intent Principle safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Octopus Architecture System architecture and design skill leveraging the backend-architect persona. Use for API design, microservices patterns, and distributed systems planning. Subagent · nyldn/claude-octopus
- Octopus Code Review Expert code review skill leveraging the code-reviewer persona. Use when you need comprehensive code quality assessment, security vulnerability detection, or architecture review. Subagent · nyldn/claude-octopus
- Octo Multi-tentacled orchestrator using Double Diamond methodology. v11.9.2. 31 expert personas, 54 commands, 63 skills. Commands '/octo:*'. Run /octo:setup for guided setup. Compatible with Claude Code and Factory AI Droid. Plugin · nyldn/claude-octopus
- Performance Principles Critique principles for high-performance code Subagent · nyldn/claude-octopus
- Coverage Analyzer Generate gcov coverage data for a code repository. Subagent · gadievron/raptor
- Ux Researcher Expert UX researcher specializing in user research synthesis, journey mapping, persona creation, and usability evaluation. Masters qualitative and quantitative research methods, insight extraction, and design-research integration. Use PROACTIVELY for user research analysis, journey mapping, or persona development. Subagent · nyldn/claude-octopus
- Crash Analysis Agent Analyze security bugs from any C/C++ project with full root-cause tracing Subagent · gadievron/raptor
- Ui Ux Designer Design UI/UX systems with style guides, color palettes, typography, and component specs. Bridges user research and frontend implementation using BM25 design intelligence. Use PROACTIVELY when designing interfaces or creating design systems. Subagent · nyldn/claude-octopus