forge-cli

A command-line management tool for Forge Hub, a service that connects agent instances to chat channels and routes messages between them.

In plain words
What is it for?
Checking service status, reviewing peers and approval history, sending messages, setting instance details, managing channel subscriptions, and resolving stale approvals.
Why use it?
It gives operators a way to inspect Hub health, connected instances, channels, approvals, and recent messages, as well as perform controlled management actions.

Skill for Claude CodeCodex

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 skills/linekforge/forge-hub/forge-cli
Any agent
npx skills add LinekForge/forge-hub --skill forge-cli
Clone the repo
git clone --depth 1 https://github.com/LinekForge/forge-hub

Made for: Claude Code, Codex.

Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 827 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00827
Opus 5 $0.00000 $0.00413
Sonnet 5 $0.00000 $0.00165
Haiku 4.5 $0.00000 $0.00083

Measured 2d ago against content hash 4c8bf9ea84d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

forge-cli 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 2d ago.

The scan reads SKILL.md. This mod also ships 10 executable files (doctor.test.ts, doctor.ts, engine.test.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

forge-cli/SKILL.md · 49 lines

What it actually says

forge CLI

forge-hub 命令行管理工具。通过 Bash 调用。

观测(read-only,随时能跑)

  • fh hub status — Hub 状态(运行时间、在线实例数、已加载通道)
  • fh hub health — 详细健康检查(每通道 consecutive failures / last error / degraded?)
  • fh hub peers — 在线实例列表和工作描述
  • fh hub channels — 已加载的通道插件
  • fh hub pending — 当前挂起的审批队列
  • fh hub allowlist [channel] — 查看所有通道的授权列表,或指定通道
  • fh hub replay <channel> [count=50] [since_ts] — 查某通道最近 N 条聊天历史
  • fh hub approval-audit [--last N] [--today] [--request-id ID] — 查审批审计

动作

  • fh hub send <channel> <to> <text> — 手动发消息(如 fh hub send wechat <sender_id>@im.wechat "你好");to 也可以用昵称,Hub 自动从 allowlist 查 ID
  • fh hub summary <text> — 设置当前实例的工作描述(在 fh hub peers 里显示)
  • fh hub name <id> <name> — 给实例起名(@路由用,多实例场景)
  • fh hub listen — 查看当前实例订阅的通道
  • fh hub listen [@TAG] <channels...> — 设置通道订阅。短名:wx=微信 / tg=Telegram / im=iMessage / fs=飞书 / all=全部。@TAG 可选,指定给哪个实例。用户说"关掉微信"就跑这个命令去掉 wx
  • fh hub resolve <request_id> — 手动清除一条 stale pending 审批(本地 resolved 但 Hub 没收到 cancel 时用)

授权

  • fh hub allow <channel> <id> <nickname> — 授权联系人(需 Touch ID / prompt 验证)。如 fh hub allow wechat <sender_id>@im.wechat 用户
  • fh hub revoke <channel> <id|nickname> — 撤销授权(需 Touch ID / prompt 验证)
  • fh hub owner <channel> [id|nickname|--clear] — 查看、设置或清除远程审批 owner;审批回复只认 owner

紧急锁定(panic button)

  • fh hub lock — 紧急锁定,立即冻结所有远程通道(出站 / 入站都拦)
  • fh hub unlock — 解锁
  • fh hub set-lock-phrase <暗号> — 设置锁定暗号(任意通道收到完全匹配的文字 → 自动触发 lock)

[!IMPORTANT] 绝不跑 fh hub lock-phrase(无参数版)——它会打印出用户的秘密暗号到 terminal。这是用户的秘密功能,暗号不经过 agent 上下文。

通道预设

  • fh hub preset list — 查看已保存的通道预设
  • fh hub preset add <name> <ch:N>... — 新增预设(如 fh hub preset add 日常 wx:100 tg:50wx:100 表示订阅 wx 并回放 100 条历史)
  • fh hub preset remove <name> — 删除预设

发消息用昵称

fh hub send wechat 用户 "你好" — Hub 自动从 allowlist 查找昵称对应的 ID,不用记原生 ID。

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. 2d ago First seen · 49 lines · 0 tokens per session scan A 4c8bf9ea84d1

Subscribe to this mod's changes

forge-cli is a skill published in the GitHub repository LinekForge/forge-hub (21 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 827 tokens. 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.