Borrowing it
Nothing to install: this file belongs to coolight7/agentxx. 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/coolight7/agentxx/main/AGENTS.mdgit clone --depth 1 https://github.com/coolight7/agentxxWrote 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/coolight7/agentxx/agents-md)<a href="https://agentmods.dev/instructions/coolight7/agentxx/agents-md"><img src="https://agentmods.dev/badge/instructions/coolight7/agentxx/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/coolight7/agentxx/agents-md"><img src="https://agentmods.dev/badge/instructions/coolight7/agentxx/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.29600 | $0.29600 |
| Opus 5.5 | $0.11840 | $0.11840 |
| Sonnet 5.5 | $0.05920 | $0.05920 |
| Haiku 4.5 | $0.02960 | $0.02960 |
Grade B, and why
agentxx AGENTS.md scanned grade B with 2 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 today.
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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
sudo echo 1 > /proc/sys/vm/drop_caches Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- [curl](agent/third_party/curl/) How it starts
The opening of the file, as written. The whole thing — 1,041 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agentxx
- C++ 23 实现的 AI Agent;编译器启用标准 c++26/c17
兼容性
- 跨系统支持:
- 可编译为独立可执行程序/动态库/静态库,摆脱额外的动态库依赖,仅依赖基本的系统库
- Linux x86_64 + WSL扩展功能
- Windows 10+ x86_64
- Android 5.0+
整体设计 & 建议
- 详细主程序架构设计见design,插件设计文档见plugins.md,客户端界面层(描述层/适配/kit/GUI 接入)见ui-layer.md,事件中枢与后台任务见events.md,当大幅修改代码时,请参考并更新
- Agent 的设计支持:
- 并发多会话,单线程/多协程交错执行会话,不需要线程锁
- client (tui/cli) 主要负责UI渲染展示、用户交互;agent (BaseAgent/CodeAgent) 负责运行会话、调用 llm api、运行 toolcall 等
- client 应当仅做UI渲染,各种数据来源、消息插入应当尽量由 agent 实现并提供
- 支持 client+agent 在同一个进程内启动,此时两者使用线程间数据交互
- 支持 client 通过网络连接 agent server,此时两者在不同进程,通过网络传输交互(已支持 websocket)
- 应当尽量统一抽象接口,分层屏蔽细节,降低复杂度,让架构设计更清晰
会话 Agent_IO、CancelToken、上下文统计、模型选择应当独立记录,按thread_id取值
- 编写代码注释:
- 编写注释时,统一使用 markdown 风格,多行注释使用
///开头, 示例(其中的 args 和 return 不必每一个都详细说明,尽量对需要注意、不容易从名称了解含义的进行说明):
- 编写注释时,统一使用 markdown 风格,多行注释使用
/// 英文字母转小写
/// - 支持传入 **unicode**,自动判断在 [A, Z] 转换为 [a, z],非字母返回原值
/// - 相关: 转大写见 [charToUpper]
///
/// - `args`:
/// - [c] 单字符 unicode 码点,应当 >= 0
///
/// - `return` 字母转为小写,非字母返回原值
int charToLower(int c) { ... }
- 合适时,尽量使用
std::string_view替代const std::string& - 应当使用 XX_LOG 输出日志,而不是 std::cout/cerr,避免影响 TUI 显示
- 最终的代码实现目标要能稳定运行在生产环境,广泛服务于各种设备和用户,需要仔细思考实现方案、编写足量的常规使用方式测试+各种边界情况测试
- 非必要不应修改
agent/third_party/内的代码,尽量修改本项目的代码实现功能。如果修改了的话应当删除 build 内对应的目录,让 cmake 重新编译,否则可能不生效 - 使用 grep、glob 等工具前参考以下代码结构缩小范围,非必要不应去搜索
agent/**整个代码库,里面包含了 build、third_party 等文件夹太大 - 需要捕获异常时,建议优先考虑 agentxx::util::catchError 系列,尤其是协程异常,不应 try {} catch(...) 捕获全部异常,应当使用
agentxx::util::catchErrorAsync放行 取消和中断 - 如果需要编译或运行测试,一般跑 debug 即可
- 修改代码后无需自动执行
clang-format等格式化处理 resource/history/内是一些功能实现、修复历史记录,在修正文档、批量修改命名等操作时不要修改这个文件夹内的文件- 实现功能、插件接口、对外接口时,非必要的限制条件不用实现,可以先跟用户确认是否添加限制/检查,或是在实现后列出可选的一些限制和检查,询问用户是否增加实现
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.
- today Changed · +49 lines · +1,592 tokens per session 59bbd7a83d90
- 2d ago Changed · +94 lines · +2,746 tokens per session 6b537081f6c5
- 4d ago Changed · +11 lines · +375 tokens per session b77971d7d825
- 5d ago Changed · +15 lines · +436 tokens per session 4f10585ef3ea
- 6d ago Changed · +82 lines · +2,053 tokens per session 04812cdb3f63
- 8d ago Changed · +13 lines · +424 tokens per session 59499d01fad6
- 11d ago Changed · +14 lines · +425 tokens per session 024fd202e7a6
- 12d ago Changed · +11 lines · +437 tokens per session 2035e1e71c3f
- 13d ago Changed · +6 lines · +216 tokens per session a1b578069c7b
- 14d ago First seen · 746 lines · 20,896 tokens per session scan B 93db0850a978
agentxx AGENTS.md is an instructions file published in the GitHub repository coolight7/agentxx (7 stars, last pushed yesterday), licensed MIT. It adds 29,600 tokens to every session, about $0.1184 per session on Opus 5.5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
agentxx AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| agentxx AGENTS.mdcoolight7/agentxx | Instructions file | 7 | yesterday | MIT | B | 29,600 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,649 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode ai-customization.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 1,907 | GitHub Copilot |