Claude Code adds AGENTS.md support
Claude Code 终于支持 'AGENTS.md' 了 从 2.1.277 版本起,Claude Code 原生支持 AGENTS.md。规则很简单:当目录下没有 CLAUDE.md 时,Cl...
For developers using Claude Code, this update simplifies project setup by allowing AGENTS.md as an alternative to CLAUDE.md, streamlining workflow for managing project instructions.
Claude Code 2.1.277 now supports AGENTS.md as a project instruction file. When a folder lacks CLAUDE.md, Claude will automatically check for and use AGENTS.md. This behavior can be toggled in /config. The mod adds project-level instructions without supporting notebook or PDF attachments, symbol link parsing, or the /memory interface.
Claude Code 终于支持 'AGENTS.md' 了 从 2.1.277 版本起,Claude Code 原生支持 AGENTS.md。规则很简单:当目录下没有 CLAUDE.md 时,Cl...
Claude Code 终于支持 'AGENTS.md' 了 从 2.1.277 版本起,Claude Code 原生支持 AGENTS.md。规则很简单:当目录下没有 CLAUDE.md 时,Claude 会自动查找并读取 AGENTS.md 作为替代的项目指令文件。该行为可在 /config 中开关。 从 cc 的开源仓库的实现来看,实际上共有四种模式:仅 CLAUDE.md(不启用)、回退到 AGENTS.md(默认)、两者同时加载并去重、仅使用组织托管文件。 通过 Mods README 能看到 AGENTS.md 与原生 CLAUDE.md 的差距:@ 提及、IDE 选区、notebook/图片/PDF 读取时不会附加 AGENTS.md;不支持符号链接解析;/memory 界面看不到它。 github.com/anthropics/cla… # 最后看看 @trq212 提到的 “基于 Mods 机制构建” 是什么意思? 官方说明:A mod is a Claude Code plugin whose behaviour lives in a hooks module mod 就是一个 Claude Code 插件,其全部行为位于一个 hooks 模块中:一个 register(on, options) 入口,把引擎事件挂载为 ($, e, next) 形式的函数。Claude Code 内置了四个 mod。 一个 mod 长什么样: · .claude-plugin/plugin.json:插件清单 · hooks/hooks.json:声明入口模块 · hooks/ 下的 TypeScript:具体实现,类型来自 types/ 目录的声明 · tests/:测试,用 claude plugin test mods/<name> 运行 目前内置的四个 mod 及其职责: 1. sec-default:在托管设备或 Team/Enterprise 组织环境下,保护组织的 hooks、managed settings 和工具策略不被用户自行安装的插件篡改,"自身不添加任何策略",位于最外层。 2. diff:提供 /diff 命令,在对话旁的面板中逐文件、逐 hunk 地展示未提交的会话改动,随 Claude 编辑文件实时刷新。 3. telemetry:在 engine.create 阶段向 $ 对象注入 $.telemetry(log、mark),让其他插件能记录分析事件;分析关闭时不发送任何内容。 4. agents-md:让 AGENTS.md 作为项目指令文件被加载,即本次的功能。 Thariq @trq212 We're adding support for AGENTS.md to Claude Code. Starting today in version 2.1.277, if there is no CLAUDE.md in a folder, Claude will check for and use AGENTS.md. You can toggle this behavior in /config. 🔗 View Quoted Tweet 💬 0 🔄 0 ❤️ 1 👀 292 ⚡