nextclaw: Instructions file for Codex

AGENTS.md

nextclaw AGENTS.md is an instructions file for Codex, OpenCode from Peiiii/nextclaw. It costs 3,164 tokens per session, scanned A, original, MIT.

Project instructions for NextClaw, an AI operating layer intended to provide one entry point for software, services, and cloud computing. They cover product direction, communication, reasoning, persistence, and Git safety.

In plain words
What is it for?
Use them when planning or implementing NextClaw features, deciding where rules belong, handling user corrections or persistent preferences, and determining whether Git or service operations require approval.
Why use it?
They tell coding agents how to make decisions that fit the product's goals and how to avoid unsafe or unauthorized repository and service actions.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Codex.

This is Peiiii/nextclaw's own configuration. It tells Codex and OpenCode how to work on nextclaw 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 nextclaw configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Peiiii/nextclaw. 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/Peiiii/nextclaw/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Peiiii/nextclaw

Made for: 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 nextclaw AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/peiiii/nextclaw/agents-md/github.svg)](https://agentmods.dev/instructions/peiiii/nextclaw/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/peiiii/nextclaw/agents-md"><img src="https://agentmods.dev/badge/instructions/peiiii/nextclaw/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 nextclaw AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/peiiii/nextclaw/agents-md"><img src="https://agentmods.dev/badge/instructions/peiiii/nextclaw/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,164 This file is loaded in full into every session.
When invoked 3,164 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 original No closer match found 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.03164 $0.03164
Opus 5.5 $0.01266 $0.01266
Sonnet 5.5 $0.00633 $0.00633
Haiku 4.5 $0.00316 $0.00316

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

Security

Grade A, and why

nextclaw 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 15d 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.

AGENTS.md · 90 lines

How it starts

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

NextClaw AI 常驻内核

CLAUDE.md 是指向本文件的软链接。永远只修改 AGENTS.md,禁止维护平行副本。

本文件只放常驻规则;.agents/skills 放发现入口,单 owner 细节归 references,非发现独立合同与共享事实分别归 .agents/wiki/{skills,knowledge},确定性规则归脚本。

产品愿景

  • 开始产品、架构、交互、命名、文档或实现决策前,先对齐 NextClaw 产品愿景。
  • NextClaw 以做好用户的长期搭档为根本使命,主动参与、持续自我改进;关注用户整体上下文,个人操作层是支撑形态。
  • NCP 是历史基础设施名;存量兼容可保留,新增类型、文件、包、字段、owner 或产品概念禁用 NCP / Ncp* 前缀。

沟通与推进

  • 所有用户可见回复以 [我严格遵守规则] 开头并使用中文。
  • 先理解意图:指出问题通常期待修正,授权内主动优化;纯问答或明确只讨论除外。
  • 以完整交付为目标,复用证据,避免重复读取、无效轮询和以进度代替结果。
  • 默认单代理;效率、省 Token 或并行诉求不授权委派。仅当用户在当前任务明确要求子代理且预计总成本净节省时,才按省 Token 委派合同试验;用户反对后立即停止且本任务禁用。
  • 收到输入先结合任务识别插话、补充纠偏或明确换题/暂停;前两类保留目标与授权,回应后继续行动,不默认重置任务。仅在完成、用户叫停或真实阻塞时停止并说明原因;根因未知继续调查。无任务时纯问答正常结束。
  • 架构、链路、事件流、状态归属和根因结论必须有端到端证据;只有局部证据时明确标注阶段性判断。
  • 用户常用语音输入;“绘画”等疑似错词在 chat/session 上下文中优先理解为“会话”,歧义会改变结果时再澄清。
  • 任务纠偏、失败恢复、验证新路径或要求“记住”后,按 development-retrospective 主动沉淀:授权内更新原 owner 并验证,不落盘说明原因,不替代交付。
  • 使用维护者账号在 GitHub Issue、PR 或 Discussion 评论时,正文须以 🤖[墨爪] 标明 AI。协作协议按已验证的 Agent 身份与操作 ID 过滤自身输出,不能仅按账号或公共前缀屏蔽其它 Agent,须支持同账号协作并防止自回复循环。
  • 产品实现兼顾用户价值、技术结构和交付路径。

深思模式

  • 复杂架构、规则机制、高风险取舍或连续纠偏自动进入深思模式;回复前缀变为 [我严格遵守规则][深思模式],完成复杂判断后退出。

协作与 Git 安全

  • Git 外部与破坏性操作须授权;Bibo 已独立,开发与交付归 Peiiii/bibo。
  • 为完成任务可以自主重启 NextClaw 宿主、服务、桌面应用或现有实例,无需额外征求同意;重启前说明影响并检查运行状态,避免无关重启。
  • 工作区可能有用户或其它任务的改动;不得覆盖、revert、格式化或混入无关改动。触达已修改文件前先读懂现状并做双向范围审计。
  • 主工作区常驻 master,允许任务前期起草;首次写入前记录已有改动与本任务归属。切入隔离 worktree 时按 Worktree 合同迁移本任务全部草稿(含 skill、规则与文档),核对完整后仅撤掉源区对应改动,后续统一写目标 worktree;提交前及收尾核查源区无本任务遗漏。发布/交付从冻结的远程 master 运行,完成后调用 pnpm release:reconcile:mainline,在不覆盖活跃 WIP 的前提下合并已提交分叉、普通 push 并快进本地镜像;禁止 rebase/stash/reset 活跃工作区,未立即闭合时由 retry worker 接管,不留给用户。
  • “提交”或 /commit 只授权当前分支 stage/commit,不含合并或 push;“合入主干”才表示 commit 后集成本地 master 并推送 origin/master。要求“只合入本地”或“不要推送”时跳过 push;只停在隔离分支不算完成。changeset、迭代与 NPM 记录由 development-delivery 提交前判断。
  • 成功执行提交、推送、建分支或 PR 后,最终回复输出 Codex app 对应 directive。
  • 私有 VPS/主机诊断或部署先只读匹配的 .local/remote-environments.private.md;SSH 异常时读SSH 恢复。凭据仅作授权认证,禁回显、提交、复制或落日志;仅更新已验证事实。
  • 搜索优先 rg / rg --files;手工编辑默认使用 apply_patch。

Read the full file on GitHub · 90 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. 15d ago Changed · +2 tokens per session b20b2f6fe220
  2. 29d ago Changed · +1 tokens per session bd36dd91f714
  3. 1mo ago Changed · +11 tokens per session a6c892e235fe
  4. 1mo ago Changed · -2 tokens per session 18d2d3064e45
  5. 1mo ago Changed · +9 tokens per session 00ebeb7e5018
  6. 1mo ago Changed · +8 tokens per session dc35de19bc96
  7. 1mo ago Changed · +1 lines · +99 tokens per session b6f023a69bf0
  8. 1mo ago Changed · -1 lines · -69 tokens per session b081929ca7ab
  9. 1mo ago Changed · -1 lines · +16 tokens per session 2ed0db3a2e3d
  10. 1mo ago First seen · 91 lines · 3,089 tokens per session scan A 9d60d9455f30

Subscribe to this mod's changes

nextclaw AGENTS.md is an instructions file published in the GitHub repository Peiiii/nextclaw (263 stars, last pushed yesterday), licensed MIT. It adds 3,164 tokens to every session, about $0.0127 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

nextclaw AGENTS.md compared with instructions from other repositories

nextclaw AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nextclaw AGENTS.mdPeiiii/nextclawInstructions file263yesterdayMITA3,164Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode