Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/CronusL-1141/AI-companynpx agentmods add commands/cronusl-1141/ai-company/os-hooksWrote 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/commands/cronusl-1141/ai-company/os-hooks)<a href="https://agentmods.dev/commands/cronusl-1141/ai-company/os-hooks"><img src="https://agentmods.dev/badge/commands/cronusl-1141/ai-company/os-hooks/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.
<a href="https://agentmods.dev/commands/cronusl-1141/ai-company/os-hooks"><img src="https://agentmods.dev/badge/commands/cronusl-1141/ai-company/os-hooks.svg" alt="Reviewed on agentmods" width="80" 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.00017 | $0.00659 |
| Opus 5.5 | $0.00007 | $0.00264 |
| Sonnet 5.5 | $0.00003 | $0.00132 |
| Haiku 4.5 | $0.00002 | $0.00066 |
Grade A, and why
os-hooks 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.
What it actually says
/os-hooks — Hook 注册面查看
你需要帮助用户查看 AI Team OS 的 Claude Code Hooks 注册状态。
只有一个注册面
AI Team OS 的 hook 全部注册在本会话 Claude Code 配置目录的 settings.json(未设
CLAUDE_CONFIG_DIR 时为默认配置目录),由仓库根的 install.py 写入,事件面以
plugin/hooks/hooks.json 为准(数量以该文件实测为准)。脚本运行期副本在该配置目录的
hooks/ai-team-os/。两处的实际位置先跑 aiteam paths 看:claude.settings 与
claude.main_chain_dir。
不要向项目级 .claude/settings.local.json 写 AI Team OS 的 hook——与全局链并存会让每个事件双发。
用法
/os-hooks— 查看当前注册状态/os-hooks repair— 重装/修复注册面
操作流程
下面的 scripts/… 与 install.py 都在 AI Team OS 仓库根目录执行。install.py --update
装的是执行它的那份 checkout:先确认它在 master,不要从 .worktrees/ 里跑——旧分支会把
装机面静默装回旧版(安装器照样报 OK),worktree 会把安装钉在要删的目录上。
无参数:查看状态
- 读取
claude.settings那份 settings.json 的hooks段,列出事件与 matcher。 - 跑一次三方一致性机检(注册面是否与仓库定义对得上):
python3 scripts/check_hook_surface.py - 确认运行期脚本目录(
claude.main_chain_dir)存在且非空,claude.chain_owner说明是谁装的。 - 如果用户项目里存在
.claude/settings.local.json且其hooks段含send_event.py,那是会造成事件双发的残留:先把内容展示给用户, 征得同意后再删掉该hooks段。
repair 模式
- 说明将要改动
claude.settings那份 settings.json(先备份)。 - 执行:
该命令按脚本名白名单清理我方旧条目后按python3 install.py --updateHOOK_SURFACE重建, 外来 hook(用户自己的守卫脚本等)会被原样保留。 - 复跑
python3 scripts/check_hook_surface.py确认全绿。
注意
- 改动 settings.json 前必须备份,并保留外来 hook 条目
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.
- 1mo ago Changed · +2 lines scan B → A 2ae672158ed3
- 2mo ago Changed · +4 lines 5583ef7f79eb
- 2mo ago Changed · -16 lines 2a93e73f447d
- 3mo ago First seen · 67 lines · 17 tokens per session scan B 0284fc5d0eb6
os-hooks is a command published in the GitHub repository CronusL-1141/AI-company (383 stars, last pushed 13d ago), licensed MIT. It adds 17 tokens to every session and 659 once invoked, about $0.0001 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.
os-hooks compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| os-hooksCronusL-1141/AI-company | Command | 383 | 13d ago | MIT | A | 17 | Claude Code |
| q-researchassafkip/kipi-system | Command | 137 | today | MIT | A | 0 | Claude Code |
| toolsfirst-fluke/fullstack-starter | Command | 227 | 15d ago | MIT | A | 18 | GitHub Copilot |
| agent-brain-graphSpillwaveSolutions/agent-brain | Command | 122 | 2mo ago | MIT | A | 16 | Claude Code |
| relaysaajunaid/caddis-plugin | Command | 0 | 4d ago | MIT | A | 12 | GitHub Copilot |
| new-featuresaajunaid/caddis-plugin | Command | 0 | 4d ago | MIT | A | 14 | GitHub Copilot |
| deploydatabricks-solutions/consort | Command | 38 | 2d ago | none | A | 0 | Claude Code |