Clawd-Companion: Instructions file for Claude Code

AGENTS.md

Clawd-Companion AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from Doulor/Clawd-Companion. It costs 1,006 tokens per session, scanned A, original, MIT.

A set of project instructions for Clawd Companion, including its release process, versioning rules, build commands, and release-file naming conventions.

In plain words
What is it for?
Use it when bumping versions, building installers, renaming release files, tagging commits, pushing changes, and creating GitHub Releases.
Why use it?
It gives an agent the repository-specific rules needed to prepare and publish releases consistently.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: SessionStart hook event, but also the file is AGENTS.md. Also seen: mentions Codex.

This is Doulor/Clawd-Companion's own configuration. It tells Claude Code, Codex and OpenCode how to work on Clawd-Companion itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Clawd-Companion configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/Doulor/Clawd-Companion/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Doulor/Clawd-Companion

Made for: Claude Code, Codex, OpenCode.

Wrote 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.

agentmods badge for Clawd-Companion AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/doulor/clawd-companion/agents-md.svg)](https://agentmods.dev/instructions/doulor/clawd-companion/agents-md)
Your own site
<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>
Per session 1,006 This file is loaded in full into every session.
When invoked 1,006 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01006 $0.01006
Opus 5 $0.00503 $0.00503
Sonnet 5 $0.00201 $0.00201
Haiku 4.5 $0.00101 $0.00101

Measured 8d ago against content hash 5ab6d4d2776f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

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 退出
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 56 lines

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"或类似表述时,自动执行以下流程:

  1. 版本号递增:运行 npm run version:patch(或 version:minor / version:major)同步更新 package.jsonpackage-lock.json
    • 如果用户主动指定了版本号(如"发布1.4.0"),可使用 npm run version:patch -- 1.4.0 或手动执行 node scripts/bump-version.mjs 1.4.0
    • 永远不要覆盖已有的 GitHub Release
  2. 本地构建(可选,CI 会自动构建):运行 npm run dist 生成安装包
  3. 文件重命名:将生成的 exe 和 blockmap 文件名从空格格式改为连字符格式(如 Clawd Companion Setup 1.3.3.exeClawd-Companion-Setup-1.3.3.exe),以匹配 latest.yml 中的文件名
  4. 提交推送:git add → commit → tag → push(tag 格式 v{版本号}
  5. 创建 Release:推送 tag 后,CI 工作流 .github/workflows/release.yml 会自动构建并发布到 GitHub Release。如需手动发布,使用 gh release create

版本号规则

  • 当前版本存储在 package.jsonversion 字段
  • 每次发布自动 patch 递增,除非用户明确指定
  • latest.yml 中的文件名必须与上传到 Release 的文件名完全一致
  • scripts/bump-version.mjs 负责同步 package.jsonpackage-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 启动时自动启动本应用」开关。

开关实现细节:

  1. 主程序把开关状态写入标记文件 ~/.clawd-companion/auto-start-with-cli.flag
  2. forwarder 在 SessionStart 时先 ping 127.0.0.1:47634/health,如果主程序已在运行则直接复用
  3. 如果主程序未运行,根据 forwarder 所在位置判断是 dev 还是 prod 布局:
    • Dev: <project>/dist/hook-forwarder/index.jsnpm start in 项目根
    • Prod: <install>/resources/hook-forwarder/index.js<install>/Clawd Companion.exe
  4. 通过 child_process.spawn + detached: true + unref() 启动,不阻塞 forwarder 退出
  5. 环境变量覆盖(高级用户):CLAWD_COMPANION_AUTOSTART=1 强制开启,=0 强制关闭

Read the full file on GitHub · 56 lines

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. 8d ago First seen · 56 lines · 1,006 tokens per session scan A 5ab6d4d2776f

Subscribe to this mod's changes

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.

Related

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.

openai/codex · 5,153 tokens

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).

microsoft/vscode · 6,785 tokens

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.

vercel/next.js · 7,296 tokens

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.

langchain-ai/langchain · 4,469 tokens

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).

microsoft/vscode · 5,001 tokens

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.

github/spec-kit · 7,104 tokens