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.
npx agentmods add instructions/linekforge/forge-hub/claude-mdgit clone --depth 1 https://github.com/LinekForge/forge-hubWrote 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/linekforge/forge-hub/claude-md)<a href="https://agentmods.dev/instructions/linekforge/forge-hub/claude-md"><img src="https://agentmods.dev/badge/instructions/linekforge/forge-hub/claude-md.svg" alt="Measured on agentmods" 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 | $0.01413 | $0.01413 |
| Opus 5 | $0.00707 | $0.00707 |
| Sonnet 5 | $0.00283 | $0.00283 |
| Haiku 4.5 | $0.00141 | $0.00141 |
Grade A, and why
forge-hub CLAUDE.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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
为 Claude Code (claude.ai/code) 提供本仓库的工作指引。
项目概览
Forge Hub 是 Claude Code 的多通道消息总线。把微信、Telegram、飞书、iMessage、本地 Dashboard 五个通道的消息路由到 Claude Code 实例,并处理远程审批转发。
- 运行时:Bun(不是 Node.js)
- 语言:TypeScript,全局 strict mode
- 无构建步骤:server/client/cli/engine 由 Bun 直接跑 TS;只有
hub-dashboard需要 Vite 构建
Monorepo 结构
| 模块 | 成熟度 | 说明 |
|---|---|---|
hub-server/ |
稳定主线 | 消息路由、审批、安全防线、通道管理。HTTP 路由拆分在 hub-server/routes/(health/send/approval/instances/homeland/dashboard/search),endpoints.ts 只做鉴权 + 分发 |
hub-client/ |
稳定主线 | Claude Code MCP channel(4 个工具:hub_reply / hub_send_file / hub_send_voice / hub_replay_history) |
forge-cli/ |
稳定主线 | 日常管理 CLI(fh hub ... / fh engine ...) |
cli.ts |
稳定主线 | 安装入口(forge-hub install / uninstall / doctor) |
hub-test-harness/ |
稳定主线 | 隔离端到端测试(8 场景,端口 9901) |
hub-dashboard/ |
已部署 UI | React + Tailwind + Zustand(仍在迭代) |
hub-app/ |
Preview | macOS 原生客户端(Swift) |
forge-engine/ |
实验性 | 定时任务引擎(默认不启用) |
构建与测试命令
各模块验证(从仓库根目录执行):
# hub-server:类型检查 + 单元测试
(cd hub-server && bun install && bunx tsc --noEmit && bun test)
# hub-client:类型检查 + 单元测试
(cd hub-client && bun install && bunx tsc --noEmit && bun test)
# forge-cli:单元测试
(cd forge-cli && bun test)
# forge-engine:类型检查 + 单元测试
(cd forge-engine && bun install && bunx tsc --noEmit && bun test)
# hub-dashboard:lint + 构建 + 测试
(cd hub-dashboard && bun install && bun run lint && bun run build && bun test)
# 集成测试
bun hub-test-harness/harness.ts # 8 场景 harness(在 :9901 启动隔离 Hub)
fh hub self-test # 完整端到端(需要运行中的 Hub)
关键约定
- 安全失败必须 fail-closed:lock / allowlist / audit / evidence 写失败必须 throw 或 fallback,不能静默放过
- 未授权消息不进主 context:走 evidence vault + security event 聚合,通知最多 1 条/小时极简提醒
- 外来字段必须净化:display name / 文件名 / caption 进 LLM 可见文本前走
sanitize.ts(Unicode 清洗 + entity-encode + truncate) - 不允许静默失败:catch 块至少
logError(...) - 不硬编码路径:用
which动态查找 + env var 覆盖 - 代码中不出现私人 ID / 密钥(测试也不行)。PR 自检:
grep -rE '@im\.wechat|ou_[a-f0-9]{16,}|sk-ant-[a-zA-Z0-9_-]{20,}|sk-[a-zA-Z0-9_-]{20,}|[0-9]{9,10}:[A-Za-z0-9_-]{35}' . - 测试隔离:所有测试通过
test-setup.ts把FORGE_HUB_DIR重定向到/tmp - 热重载:仅开发模式(
FORGE_HUB_DEV=1),生产环境需要重启 Hub
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.
- 3d ago First seen · 101 lines · 1,413 tokens per session scan A 510622aa1e60
forge-hub CLAUDE.md is an instructions file published in the GitHub repository LinekForge/forge-hub (21 stars, last pushed 3mo ago), licensed MIT. It adds 1,413 tokens to every session, about $0.0071 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-30.
Other instructions, from other repositories
botmux CLAUDE.md
Instructions for deepcoldy/botmux, covering botmux, 构建 & 运行, bun 开发链路, worktree 的 nodemodules:共享还是独立(改前必读) and 编译态(单文件二进制)注意.
metabot AGENTS.md
Instructions for xvirobotics/metabot, covering metabot personal edition workspace, core cli, working principles, durable state and public boundary.
OpenInstinct AGENTS.md
Instructions for Merit-Systems/OpenInstinct, covering eve agent app, read the docs before writing code, prefer an existing integration, use eve for vercel operations and validate the change.
nextclaw AGENTS.md
AGENTS.md instructions for Peiiii/nextclaw, covering nextclaw ai 常驻内核, 产品愿景, 沟通与推进, 深思与目标模式 and 协作与 git 安全.
metabot CLAUDE.md
Instructions for xvirobotics/metabot: The canonical project instructions are in AGENTS.md. Follow that file for this repository. This compatibility file exists for Claude Code; MetaBot install/update does not deploy or replace workspace instruction files.
nexu AGENTS.md
Instructions for nexu-io/nexu, covering agents.md, repo overview, project overview, commands and branch model.