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.00641 |
| Opus 5 | $0.00009 | $0.00320 |
| Sonnet 5 | $0.00003 | $0.00128 |
| Haiku 4.5 | $0.00002 | $0.00064 |
Grade B, and why
os-hooks scanned grade B with 1 finding 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 12d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
AI Team OS 的 hook **全部注册在全局 `~/.claude/settings.json`**,由仓库根的 What it actually says
/os-hooks — Hook 注册面查看
你需要帮助用户查看 AI Team OS 的 Claude Code Hooks 注册状态。
只有一个注册面
AI Team OS 的 hook 全部注册在全局 ~/.claude/settings.json,由仓库根的
install.py 写入,事件面以 plugin/hooks/hooks.json 为准(数量以该文件实测为准)。
脚本运行期副本在 ~/.claude/hooks/ai-team-os/。
不要向项目级 .claude/settings.local.json 写 AI Team OS 的 hook——与全局链并存会让每个事件双发。
用法
/os-hooks— 查看当前注册状态/os-hooks repair— 重装/修复注册面
操作流程
无参数:查看状态
- 读取
~/.claude/settings.json的hooks段,列出事件与 matcher。 - 跑一次三方一致性机检(注册面是否与仓库定义对得上):
python3 scripts/check_hook_surface.py - 确认运行期脚本目录存在且非空:
~/.claude/hooks/ai-team-os/。 - 如果用户项目里存在
.claude/settings.local.json且其hooks段含send_event.py,那是会造成事件双发的残留:先把内容展示给用户, 征得同意后再删掉该hooks段。
repair 模式
- 说明将要改动
~/.claude/settings.json(先备份)。 - 执行:
该命令按脚本名白名单清理我方旧条目后按python3 install.py --updateHOOK_SURFACE重建, 外来 hook(用户自己的守卫脚本等)会被原样保留。 - 复跑
python3 scripts/check_hook_surface.py确认全绿。
输出格式
状态查看
## Hooks 注册状态
注册面: ~/.claude/settings.json(全局,唯一)
已注册 <N> 个事件 / <M> 条(按实读列出事件名)
运行期脚本: ~/.claude/hooks/ai-team-os/(<K> 个)
API 目标: http://localhost:<api_port.txt>/api/hooks/event
三方一致性机检: ✅ install.py ↔ hooks.json ↔ README
注意
- 所有输出使用中文
- 改动
~/.claude/settings.json前必须备份,并保留外来 hook 条目 - 确保 API 服务已启动:
/os-up
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.
- 12d 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 (357 stars, last pushed today), licensed MIT. It adds 17 tokens to every session and 641 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
agent-brain-graph
Search using GraphRAG for relationship and dependency queries.
tools
Manage MCP tools with natural language commands to list, enable, and disable tools and tool groups.
q-research
Read the research-mode skill's SKILL.md for the full ruleset before proceeding. Follow all constraints, the source lookup cascade, the token budget, and the "what counts as cited" rules exactly.
create-pr
Push the current branch and open a pull request into main with a structured description derived from the branch's commits and the open issues it resolves.
r-util-proj-cross
Cross-project analysis for workspace project sets. Reads MEMORY.md, PLAN.md, AUDIT.md, and CLAUDE.md from all projects to identify shared patterns, duplicate effort, convention drift, and alignment opportunities.
forge-docs
Generate or review documentation for the specified file or module.