Borrowing it
Nothing to install: this file belongs to Doulor/Clawd-Companion. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Doulor/Clawd-Companion/main/AGENTS.mdgit clone --depth 1 https://github.com/Doulor/Clawd-CompanionWrote 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/doulor/clawd-companion/agents-md)<a href="https://agentmods.dev/instructions/doulor/clawd-companion/agents-md"><img src="https://agentmods.dev/badge/instructions/doulor/clawd-companion/agents-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.01006 | $0.01006 |
| Opus 5 | $0.00503 | $0.00503 |
| Sonnet 5 | $0.00201 | $0.00201 |
| Haiku 4.5 | $0.00101 | $0.00101 |
Grade A, and why
Clawd-Companion AGENTS.md scanned grade A 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 8d 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
4. 通过 `child_process.spawn` + `detached: true` + `unref()` 启动,不阻塞 forwarder 退出 Copies of this mod
1 near-identical copy found in the catalogue:
- Clawd-Companion CLAUDE.md — 86% identical, 48 lines differ
How it starts
The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clawd Companion 项目指南
发布流程
当用户说"提交release"或类似表述时,自动执行以下流程:
- 版本号递增:运行
npm run version:patch(或version:minor/version:major)同步更新package.json和package-lock.json- 如果用户主动指定了版本号(如"发布1.4.0"),可使用
npm run version:patch -- 1.4.0或手动执行node scripts/bump-version.mjs 1.4.0 - 永远不要覆盖已有的 GitHub Release
- 如果用户主动指定了版本号(如"发布1.4.0"),可使用
- 本地构建(可选,CI 会自动构建):运行
npm run dist生成安装包 - 文件重命名:将生成的 exe 和 blockmap 文件名从空格格式改为连字符格式(如
Clawd Companion Setup 1.3.3.exe→Clawd-Companion-Setup-1.3.3.exe),以匹配latest.yml中的文件名 - 提交推送:git add → commit → tag → push(tag 格式
v{版本号}) - 创建 Release:推送 tag 后,CI 工作流
.github/workflows/release.yml会自动构建并发布到 GitHub Release。如需手动发布,使用gh release create
版本号规则
- 当前版本存储在
package.json的version字段 - 每次发布自动 patch 递增,除非用户明确指定
latest.yml中的文件名必须与上传到 Release 的文件名完全一致scripts/bump-version.mjs负责同步package.json和package-lock.json两个文件的版本
Release 文件命名规范
- 上传到 GitHub Release 的文件必须使用连字符格式:
Clawd-Companion-Setup-{版本号}.exe - electron-builder 生成的文件使用空格格式:
Clawd Companion Setup {版本号}.exe - 必须在构建后重命名:exe 和 blockmap 文件都需要从空格格式改为连字符格式
- latest.yml 中的文件名必须与重命名后的文件名完全一致
- CI 中的重命名步骤在
.github/workflows/release.yml的 "Rename artifacts to match latest.yml" 中自动完成
构建命令
npm run build— 编译 TypeScript + Vite 构建npm run dist— 构建 + electron-builder 打包npm run dist:validate— 校验 latest.yml 文件名一致性npm run typecheck— 仅做类型检查(不发包)npm test— 运行 hook-forwarder 单元测试(vitest)npm run version:patch/version:minor/version:major— 同步更新 package.json 和 package-lock.json 的版本号
持续集成 (CI/CD)
.github/workflows/ci.yml:push / PR 触发,运行 typecheck + 测试(windows-latest).github/workflows/release.yml:tag 触发(v*.*.*),自动构建、产物重命名、上传到 GitHub Release
Codex 启动时自动启动本应用
默认关闭,需要用户在配置面板 → 应用行为 中开启「Codex 启动时自动启动本应用」开关。
开关实现细节:
- 主程序把开关状态写入标记文件
~/.clawd-companion/auto-start-with-cli.flag - forwarder 在
SessionStart时先 ping127.0.0.1:47634/health,如果主程序已在运行则直接复用 - 如果主程序未运行,根据 forwarder 所在位置判断是 dev 还是 prod 布局:
- Dev:
<project>/dist/hook-forwarder/index.js→npm startin 项目根 - Prod:
<install>/resources/hook-forwarder/index.js→<install>/Clawd Companion.exe
- Dev:
- 通过
child_process.spawn+detached: true+unref()启动,不阻塞 forwarder 退出 - 环境变量覆盖(高级用户):
CLAWD_COMPANION_AUTOSTART=1强制开启,=0强制关闭
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.
- 8d ago First seen · 56 lines · 1,006 tokens per session scan A 5ab6d4d2776f
Clawd-Companion AGENTS.md is an instructions file published in the GitHub repository Doulor/Clawd-Companion (40 stars, last pushed 2mo ago), licensed MIT. It adds 1,006 tokens to every session, about $0.0050 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
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).
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.
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.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.