moai-cowork: Instructions file for Claude Code

AGENTS.md

moai-cowork AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from modu-ai/moai-cowork. It costs 4,859 tokens per session, scanned A, a copy of moai-adk AGENTS.md, Apache-2.0.

Repository instructions that define a standing contract for coding agents working on the modu-ai/moai-cowork project. They cover evidence, verification, Git branches, shared checkouts, and worktrees, which are separate working directories for Git branches.

In plain words
What is it for?
Verifying changes with project tools, reporting only observed results, managing branches and worktrees, and avoiding unsupported claims about completion or defects.
Why use it?
They require agents to support claims with actual checks and to follow safe collaboration rules when several changes share one checkout.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: SessionStart hook event, but also the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is modu-ai/moai-cowork's own configuration. It tells Claude Code, Codex and OpenCode how to work on moai-cowork itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything moai-cowork configures →

Reuse

Borrowing it

Nothing to install: this file belongs to modu-ai/moai-cowork. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/modu-ai/moai-cowork/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/modu-ai/moai-cowork

Made for: Claude Code, Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for moai-cowork AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/modu-ai/moai-cowork/agents-md/github.svg)](https://agentmods.dev/instructions/modu-ai/moai-cowork/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/modu-ai/moai-cowork/agents-md"><img src="https://agentmods.dev/badge/instructions/modu-ai/moai-cowork/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for moai-cowork AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/modu-ai/moai-cowork/agents-md"><img src="https://agentmods.dev/badge/instructions/modu-ai/moai-cowork/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,859 This file is loaded in full into every session.
When invoked 4,859 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.04859 $0.04859
Opus 5.5 $0.01944 $0.01944
Sonnet 5.5 $0.00972 $0.00972
Haiku 4.5 $0.00486 $0.00486

Measured 17d ago against content hash 921d0d99d9f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

moai-cowork AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 17d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to moai-adk AGENTS.md — 193 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

AGENTS.md · 332 lines

How it starts

The opening of the file, as written. The whole thing — 332 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — standing contract for agents in this repository

Every clause here binds a turn regardless of which agent harness drives it. The file is self-sufficient: it does not depend on another instruction file. If a nested AGENTS.md exists, Codex loads it as an additional, more-specific contract; the merged byte budget must cover the whole discovery chain.

Budget warning. Codex charges its instruction byte budget against project instruction files only; a personal ~/.codex/AGENTS.md does not shrink it. Overflow is truncated from the tail, silently — no warning, no stderr, exit 0. Clauses below are ordered most-critical-first for that reason.

Direct Codex startup. When using codex -C <worktree> directly, read a present worktree-root AGENTS.local.md in full before other project work and follow it as local project guidance. If it exists but cannot be read, stop and report the failure. The MoAI Codex launcher injects this file before the session instead; see §8.

This file is the canonical cross-harness contract. Shared detail lives in .moai/policies/** and .moai/workflows/**. When Claude is installed, .claude/rules/moai/** and CLAUDE.md expand Claude-only mechanisms (question channel, subagent spawning, skills, session handoff); they do not override a cross-harness clause here. Compression removed rationale and incident records, never an obligation.

Capability bindings. Names below are the neutral tool classes; a row exists only where a harness driving this contract lacks the capability.

Capability Claude implementation If this harness lacks it
question-channel AskUserQuestion Return a blocker report naming the missing input instead of asking in prose
task-list TaskCreate / TaskUpdate / TaskList / TaskGet Track the work and report progress in prose
design-sync DesignSync Skip the design-sync surface; say so in the report
agent-spawning Agent(...) sub-agents Do the bounded work inline
output-style Claude output styles Follow this contract directly
slash-commands /moai slash commands Use the underlying moai CLI verbs
workflow-scripts Workflow scripts (ultracode) Run the steps sequentially
worktree-entry Claude: moai cc -w <name> for Claude-native trees or moai cc -w <absolute-path> for MoAI trees; Codex app: select Worktree; Codex CLI: moai worktree new <name> then codex -C <absolute-path> An active Codex session uses git -C <absolute-path>; moai codex -w starts a new session in an existing tree only
audit-verdict-file The auditor agent writes its own verdict or report file On Codex, start the read-only roles (plan-auditor, sync-auditor, mission-governor, super-advisor) through the launcher, the moai MCP tool codex_role_audit, and never through spawn_agent, which would hand them your own writing sandbox. Pass role, your own worktree root as worktree_root, the task as task, and the verdict or report path under .moai/reports/ as out; the tool returns a job id at once, and codex_role_audit_status / codex_role_audit_result report on it. The role runs as one top-level read-only codex exec process, and the launcher writes the verdict or report file with exactly the returned text, unedited

Skill("<name>") instructions carry no row, and are read literally. skill-loader is a capability every harness driving this contract has, so it earns no row above; what is Claude-only is the per-agent grant, not the reach. Where a harness loads a skill by reading it rather than by calling a tool, the deployed skill is in .agents/skills/<name>/SKILL.md for Codex and .claude/skills/<name>/SKILL.md for Claude. The both profile installs both paths. Skill("moai-workflow-tdd") names the corresponding deployed SKILL.md. Agent bodies keep the tool-call wording for that reason — it is an address, not a Claude-only instruction. Codex-side loading is deferred — read the mirrored SKILL.md directly; no loader resolves Skill("...") calls.

Read the full file on GitHub · 332 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 17d ago Changed · +33 lines · +902 tokens per session 921d0d99d9f3
  2. 28d ago Changed · +56 lines · +735 tokens per session ce3c4fd767f4
  3. 1mo ago First seen · 243 lines · 3,222 tokens per session scan A eda0882052e3

Subscribe to this mod's changes

moai-cowork AGENTS.md is an instructions file published in the GitHub repository modu-ai/moai-cowork (311 stars, last pushed 15d ago), licensed Apache-2.0. It adds 4,859 tokens to every session, about $0.0194 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to moai-adk AGENTS.md, differing in 193 lines, and is treated as a copy.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,581 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens