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/riba2534/happyclaw/claude-mdgit clone --depth 1 https://github.com/riba2534/happyclawWrote 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/riba2534/happyclaw/claude-md)<a href="https://agentmods.dev/instructions/riba2534/happyclaw/claude-md"><img src="https://agentmods.dev/badge/instructions/riba2534/happyclaw/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.1 | $0.04752 | $0.04752 |
| Opus 5 | $0.02376 | $0.02376 |
| Sonnet 5 | $0.00950 | $0.00950 |
| Haiku 4.5 | $0.00475 | $0.00475 |
Grade A, and why
happyclaw 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 6d 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 — 377 lines — stays where its author put it; the contents beside it link to each section on GitHub.
HappyClaw — 工程协作指南
本文档描述当前代码的工程约束和导航入口,供人类与 AI 协作者共同使用。
1. 文档与代码真相源
- 产品介绍、安装和常用操作:
README.md - 路由族与主要 Web API:
docs/API.md - 权限边界:
docs/ACL-MATRIX.md - 生产部署与回滚:
DEPLOYMENT.md - 运行时 Prompt:
container/agent-runner/prompts/ - 数据库 Schema:
src/db.ts中的CURRENT_SCHEMA_VERSION与建表/迁移代码 - Web 路由:
web/src/App.tsx - 系统设置及默认值:
src/runtime-config.ts - 渠道能力与会话路由:
src/im-channel-capabilities.ts、src/channel-mount-service.ts - StreamEvent:
shared/stream-event.ts
docs/agent-first-architecture-plan.md 和
docs/claude-code-plugin-automation-design.md 是历史设计记录,不作为当前接口或数据结构的真相源。
2. 产品模型
HappyClaw 是基于 Claude Agent SDK 的自托管、多用户 Agent 工作台,支持 Web 与飞书、 Telegram、QQ、钉钉、微信、企业微信、Discord、WhatsApp。
当前产品层级:
Agent Profile(身份、四段 Prompt、能力策略)
└── Workspace(文件目录、执行模式、环境变量、渠道群聊绑定)
├── Main Session
├── Runtime Session(独立 Claude 上下文,可绑定私聊)
├── Native Context Session(飞书话题等原生线程)
└── Scheduled Run(group 或 isolated)
重要命名边界:
agent_profiles是产品级 Agent。registered_groups是当前兼容层中的工作区和渠道路由记录。agents表及/api/groups/:jid/agents是历史命名,实际表示工作区内的运行会话, 不是产品级 Agent Profile。- 同一个 Workspace 内的会话共享工作区文件目录,但拥有独立 Claude Session; 工作区文件隔离与对话上下文隔离是两件事。
3. 主要模块
3.1 主服务
| 文件/目录 | 职责 |
|---|---|
src/index.ts |
启动、消息消费、渠道路由、IPC、调度与 Agent 运行编排 |
src/web.ts |
Hono 应用、路由挂载、Cookie 认证、WebSocket 与静态资源 |
src/db.ts |
SQLite Schema、迁移和持久化访问器 |
src/group-queue.ts |
Session 串行、Runner 生命周期、重试与容量控制 |
src/container-runner.ts |
Host/Container Runner、挂载、环境与能力快照 |
src/task-scheduler.ts |
Cron、interval、once 调度和重启恢复 |
src/channel-mount-service.ts |
工作区/会话绑定和原生线程路由 |
src/channel-reliability-store.ts |
Inbox、Turn、Outbox、Streaming Card 的持久状态机 |
src/im-manager.ts |
多用户、多账号渠道连接池 |
src/agent-capability-preview.ts |
Agent 最终上下文和能力预览 |
src/claude-context-resolver.ts |
Claude 上下文、Skills 与来源解析 |
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.
- 6d ago First seen · 377 lines · 4,752 tokens per session scan A 5e72e3daf4fd
happyclaw CLAUDE.md is an instructions file published in the GitHub repository riba2534/happyclaw (818 stars, last pushed 4d ago), licensed MIT. It adds 4,752 tokens to every session, about $0.0238 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
open-code-review AGENTS.md
AGENTS.md instructions for alibaba/open-code-review, covering agent guidelines for open-code-review, project overview, git commit notes, license headers and code style.
eve AGENTS.md
AGENTS.md instructions for vercel/eve, covering agents.md, about eve, repository layout, git workflow and commands.
learn-harness-engineering CLAUDE.md
Instructions for walkinglabs/learn-harness-engineering, covering claude.md, project overview, commands, documentation site and run lecture code examples.
open-code-review CLAUDE.md
Claude Code instructions for alibaba/open-code-review: See AGENTS.md for all project guidelines.
trueforge AGENTS.md
AGENTS.md instructions for truefoundry/trueforge, a project described as: The open-source agent harness - the runtime layer that turns an LLM into a working agent.
dshcode copilot-instructions.md
Copilot instructions for whitelonng/dshcode, a project described as: Community desktop companion for DeepSeek Harness — one-click Electron app for macOS and Windows.