Borrowing it
Nothing to install: this file belongs to ccbud/CCBuddy. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ccbud/CCBuddy/main/AGENTS.mdgit clone --depth 1 https://github.com/ccbud/CCBuddyWrote 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.
[](https://agentmods.dev/instructions/ccbud/ccbuddy/agents-md)<a href="https://agentmods.dev/instructions/ccbud/ccbuddy/agents-md"><img src="https://agentmods.dev/badge/instructions/ccbud/ccbuddy/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.
<a href="https://agentmods.dev/instructions/ccbud/ccbuddy/agents-md"><img src="https://agentmods.dev/badge/instructions/ccbud/ccbuddy/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01632 | $0.01632 |
| Opus 5.5 | $0.00653 | $0.00653 |
| Sonnet 5 | $0.00326 | $0.00326 |
| Haiku 4.5 | $0.00163 | $0.00163 |
Grade A, and why
CCBuddy 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
核心原则
- 新增或修改行为前,先更新对应 spec;目录不存在时按需创建。先明确产品规则、状态所有者、接口和验收场景,再实现代码。
- 以当前检出的源码、
package.json和架构策略为准。说明中只保留当前仓库提供的功能、命令和文件;删除功能时同步清理指令和技能中的引用。 - 定位问题时,未明确要求修改代码就先调查原因。结合源码、日志和运行时证据,区分已确认原因与待验证假设。
- 保留与任务无关的本地改动,不自行恢复已移除的模块或内部依赖。
命令与仓库结构
开工前运行 node scripts/check-workspace-freshness.mjs 检查基线。Node 版本以 mise.toml 为准。
以下命令从仓库根目录执行:
| 用途 | 命令 |
|---|---|
| 类型检查 | pnpm typecheck |
| Lint | pnpm lint / pnpm lint:fix |
| 格式检查 | pnpm fmt:check |
| 桌面开发 | pnpm dev:desktop |
| Web 开发 | pnpm dev:web |
| 提交前检查 | pnpm verify:pre-push(Lint 与架构检查) |
| 架构检查 | pnpm architecture:check --changed |
| 模块阅读包 | pnpm architecture:context <module-id> |
| 未使用依赖与导出 | pnpm knip |
| 导出引用查询 | pnpm dep:refs --list-exports <file> |
测试入口以目标包当前的 package.json 和实际测试文件为准,不假定存在统一的单测或 E2E 命令。
packages/desktop:Electron main、host、renderer。packages/web、packages/server:Web 客户端与服务端。packages/ui:共享 React 组件、hooks 与 Zustand store。packages/services:业务服务;packages/rpc:RPC 框架。packages/shared:共享协议与类型;packages/client:Agent 客户端 SDK。apps/ccbuddy-cli:Agent CLI 与运行时。CONTEXT.md:插件商店领域词汇;修改相关 UI 前阅读。DESIGN.md:UI 设计规范;修改 UI 前阅读。
实现与验证
- 代码改动使用
.agents/skills/architecture-governance/SKILL.md,先运行架构检查,再读取目标模块的受控上下文。 - 避免重复状态和多条写入路径。明确唯一所有者、接口、依赖方向、事件顺序与幂等边界,不能用超时掩盖同步问题。
- 有行为改动时先补充对应测试;交互改动需要 E2E 场景。检查测试与实现是否一致,并实际执行可用的验证。未执行或环境受限时如实说明。
- 修复 bug 时用中文注释说明原因和修复依据。发现设计缺陷时先与用户对齐,不不断增加兜底分支。
- 涉及状态、时序、远端或异步同步的方案,用图展示所有者及事件顺序。
- 必须执行
pnpm typecheck和pnpm lint,报告真实结果,不将已有失败写成通过。 - 使用异步文件和网络 IO;跨包导入使用公开入口,遵守现有路径别名。
- 禁止 UI 直接调用 Repo、Service 引用 Runtime 具体实现、跨域导入实现细节及循环依赖。
UI 与平台边界
- 遵守
DESIGN.md,复用已有组件,兼顾桌面与手机 Web 的布局、交互、主题和国际化。 - 组件通过
packages/ui/src/hooks/访问服务;平台操作通过IPlatformService(packages/shared/src/platform.ts),不直接调用window.ccbuddy。 - 通过依赖注入处理 Desktop、Web、本地和远程环境的差异,并兼顾 Windows、macOS 和 Linux。
- Zustand 状态位于
packages/ui/src/store/。广播同步的主题、语言等字段需要防止回环;UI 局部状态不应被误当作服务端事实。 - hooks 中含 JSX 的文件使用
.tsx。
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.
- yesterday First seen · 83 lines · 1,632 tokens per session scan A 2487ca1bbfd9
CCBuddy AGENTS.md is an instructions file published in the GitHub repository ccbud/CCBuddy (8 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,632 tokens to every session, about $0.0065 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-09-25.
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).
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.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
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).
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.
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.