AgentHub AGENTS.md

AgentHub AGENTS.md is an instructions file for Codex, OpenCode from TokenDanceLab/AgentHub. It costs 7,019 tokens per session, scanned A, original, Apache-2.0.

A project instruction file that gives coding agents one set of rules for working in the AgentHub repository. It explains which documents are authoritative, what the main folders contain, and how new agents should get started.

In plain words
What is it for?
Use it to guide agents through repository setup, rule lookup, directory navigation, development workflows, and validation requirements.
Why use it?
It keeps different coding agents aligned and reduces mistakes caused by missing project context or conflicting instructions.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/tokendancelab/agenthub/agents-md
Clone the repo
git clone --depth 1 https://github.com/TokenDanceLab/AgentHub

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 AgentHub AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tokendancelab/agenthub/agents-md.svg)](https://agentmods.dev/instructions/tokendancelab/agenthub/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/tokendancelab/agenthub/agents-md"><img src="https://agentmods.dev/badge/instructions/tokendancelab/agenthub/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 7,019 This file is loaded in full into every session.
When invoked 7,019 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.07019 $0.07019
Opus 5 $0.03510 $0.03510
Sonnet 5 $0.01404 $0.01404
Haiku 4.5 $0.00702 $0.00702

Measured today against content hash 0bf0f41e183b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

AgentHub 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 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.

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 · 286 lines

How it starts

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

AGENTS.md - AgentHub 项目总规则

最后更新:2026-08-29

本文件是 AgentHub 的项目总规则唯一入口。Claude Code、Codex 和其他 Agent 都读本文件;本仓库不再维护 CLAUDE.md 或第二套根级规则。

0. 事实源优先级

  1. 管理员的直接指令
  2. AGENTS.md - 项目规则、红线、工作流、skill 白名单、验证纪律
  3. GitHub issues/PR - 当前专项进度、Issue/PR、阻塞、验收证据
  4. docs/architecture.md + docs/architecture/ - 架构、数据流、协议边界
  5. 其他专题文档、docs/decisions.md、reference、history

不要在治理报告或其他文档里复制本文件的规则。规则变更改这里;其他文档只链接或保留一句摘要。

0.5 根级目录地图

【活】= 维护中的源码/文档;【产物】= 构建/临时产物(gitignored,勿提交)。

目录 分类 职责
api/ API 契约 SSOT(openapi.yaml/events.md/conventions.md)
app/ 前端 monorepo(web/desktop/mobile-rn/shared/workbench)
artifacts/ dist/ tmp/ 产物 本地构建/临时输出(gitignored)
docs/ 知识库(architecture/governance/reference/archives)
edge-server/ Go Edge 服务(local runtime、adapters、lifecycle)
hub-server/ Go Hub 服务(REST/WS/OIDC/dispatch/agentteam)
node_modules/ 产物 依赖(gitignored)
pkg/ Go 共享包(errcode 等)
scripts/ 验证/开发/发布脚本(verify/dev/e2e/git-hooks/lib/release/smoke/)
tests/ 跨服务测试

1. 首次入仓与渐进式加载

新 Agent 90 秒入口

  1. 先运行 git status --short --branchgit log -5 --onelinegit worktree list,确认真实分支、脏文件和并行 worktree;不要从旧 handoff 推断现场。
  2. 完整读本文件,再读 GitHub issues/PR 的当前目标与 active track。仓库根目录不维护第二份进度文件。
  3. 只在任务需要时读 docs/architecture.md 和一个 owner 文档;不要先遍历整个 docs/
  4. 查明对应 Issue/PR、允许修改路径、禁改路径和验收命令后再动代码。没有活跃任务且范围复杂时,先建立短 spec 再动手。
  5. 每完成一个切片立即运行最窄验证;宣称 merge-ready、真实 E2E、发布或生产就绪前,再运行对应完整 gate。

停止加载规则:已经能回答“当前目标、事实 owner、允许改哪里、用什么验证”时就停止读文档;论证材料最多追加 1-3 篇精确 docs/reference/**,历史只通过 docs/history.md 定位。

人类同学的最短入口是 README.mddocs/architecture.mddocs/developer-quickstart.md

任务路由:接口改动读 api/openapi.yamlapi/events.mdapi/conventions.md;UI/数据流读 docs/architecture/04-frontend-data-flow.md;身份、授权、飞书、Gateway、安全、公开包装、i18n、设计 token 的跨产品边界读下方 §4 生态边界(TokenDance 系统级 docs 在私有 workspace,公开仓不复制其内容)。

2. 项目分工和边界

方向 负责范围 主要目录
前端 Web 工作台、IM 交互、Diff/Preview/Approval、前端状态 app/web/, app/shared/
后端 Hub Server、TokenDance ID 接入、Edge-Hub 通信、同步、中继、审计 hub-server/, edge-server/, api/
Desktop Tauri、Local Edge、本地 runtime、workspace、tray app/desktop/, edge-server/
Mobile Expo/RN、OIDC deep-link、SecureStore、Notifications app/mobile-rn/

Read the full file on GitHub · 286 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. today Changed · +1 lines · +296 tokens per session 0bf0f41e183b
  2. 4d ago First seen · 285 lines · 6,723 tokens per session scan A 97d3c522ad16

Subscribe to this mod's changes

AgentHub AGENTS.md is an instructions file published in the GitHub repository TokenDanceLab/AgentHub (10 stars, last pushed today), licensed Apache-2.0. It adds 7,019 tokens to every session, about $0.0351 per session on Opus 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-31.