forge-hub: Instructions file for Claude Code

CLAUDE.md

forge-hub CLAUDE.md is an instructions file for Claude Code from LinekForge/forge-hub. It costs 1,413 tokens per session, scanned A, original, MIT.

Repository instructions for Forge Hub, a TypeScript and Bun project that routes messages between channels such as WeChat, Telegram, Feishu, iMessage, and a local dashboard. A monorepo is one repository containing several related modules.

In plain words
What is it for?
Use them when developing or checking Forge Hub’s server, client, command-line tools, dashboard, test harness, or experimental scheduling engine. They include the relevant type-checking and test commands.
Why use it?
They tell a coding agent which runtime, folders, commands, and tests the project uses, reducing mistakes when working across its modules.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is LinekForge/forge-hub's own configuration. It tells Claude Code how to work on forge-hub itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything forge-hub configures →

Reuse

Borrowing it

Nothing to install: this file belongs to LinekForge/forge-hub. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/LinekForge/forge-hub/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/LinekForge/forge-hub

Made for: Claude Code.

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 forge-hub CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/linekforge/forge-hub/claude-md/github.svg)](https://agentmods.dev/instructions/linekforge/forge-hub/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/linekforge/forge-hub/claude-md"><img src="https://agentmods.dev/badge/instructions/linekforge/forge-hub/claude-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.

agentmods 80×15 button for forge-hub CLAUDE.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,413 This file is loaded in full into every session.
When invoked 1,413 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01413 $0.01413
Opus 5.5 $0.00565 $0.00565
Sonnet 5.5 $0.00283 $0.00283
Haiku 4.5 $0.00141 $0.00141

Measured 1mo ago against content hash 510622aa1e60, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo 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.

CLAUDE.md · 101 lines

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

Read the full file on GitHub · 101 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. 1mo ago First seen · 101 lines · 1,413 tokens per session scan A 510622aa1e60

Subscribe to this mod's changes

forge-hub CLAUDE.md is an instructions file published in the GitHub repository LinekForge/forge-hub (23 stars, last pushed 4mo ago), licensed MIT. It adds 1,413 tokens to every session, about $0.0057 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-08-30.

Related

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

microsoft/vscode · 9,715 tokens

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.

vercel/next.js · 7,461 tokens

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

microsoft/vscode · 5,262 tokens

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.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

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.

deepseek-ai/deepseek-harness · 4,261 tokens