comet CLAUDE.md

comet CLAUDE.md is an instructions file for coding agents from rpamis/comet. It costs 3,767 tokens per session, scanned A, original, MIT.

Chinese-language contributor instructions for the Comet project, covering testing, formatting, project structure, and commit messages. A commit is a saved unit of changes in version control.

In plain words
What is it for?
Use them when changing Comet source code, documentation, configuration, or tests, and when choosing commands for formatting, linting, building, testing, or committing.
Why use it?
They match verification effort to the risk of a change and define the project’s conventions for checks and commits.

Instructions file

Install

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.

agentmods
npx agentmods add instructions/rpamis/comet/claude-md
Clone the repo
git clone --depth 1 https://github.com/rpamis/comet

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 comet CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/rpamis/comet/claude-md.svg)](https://agentmods.dev/instructions/rpamis/comet/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/rpamis/comet/claude-md"><img src="https://agentmods.dev/badge/instructions/rpamis/comet/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,767 This file is loaded in full into every session.
When invoked 3,767 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
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 $0.03767 $0.03767
Opus 5 $0.01884 $0.01884
Sonnet 5 $0.00753 $0.00753
Haiku 4.5 $0.00377 $0.00377

Measured 4d ago against content hash 7e8c79bf84d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

comet CLAUDE.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 4d 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.

- 跨平台由 Node 保证:hash 用 `node:crypto`,YAML 用 `yaml` 包,子进程用 `child_process`(构建/校验命令走 `spawnSync(cmd, { shell: true })`)。不再有 `sed -i` / `sha256sum` vs `shasum` / `pipefail` 等 shell 可移植性问题。
CLAUDE.md · 232 lines

How it starts

The opening of the file, as written. The whole thing — 232 lines — stays where its author put it; the contents beside it link to each section on GitHub.

回复语言

必须采用中文回答用户

测试

验证范围必须与改动风险相匹配,不要在每次编辑后默认运行全量测试。

  • 每轮先运行覆盖当前改动的最小相关测试。
  • 纯文档或 Skill 内容修改:运行相关契约测试和受影响文件的 Prettier 检查。
  • 单一 app/domains/platform/ 模块修改:运行对应测试;涉及编译、Runtime 或生成物时再运行 build。
  • 跨模块、Runtime、安装/路由、发布准备或其他高风险修改:最终交付前运行一次全量测试。
  • 全量测试失败或超时时,先定位原因;只有修正了明确原因后才重跑,不盲目重复。
  • CI 已覆盖全量检查时,可以在本地只运行相关验证,但交付时必须明确说明未在本地运行的检查。
npx vitest run <相关测试文件>                     # 默认:最小相关测试
npx vitest run                                   # 高风险修改或最终交付前的全量测试

提交前检查

仓库已配置 Git pre-commit 钩子(husky + lint-staged),每次 git commit 会自动对 app/domains/platform/scripts/test/.github/config/ 下的暂存源文件运行 prettier --write(与 CI format:check 范围一致;冻结的 test/fixtures/ 除外),编辑器无关,所有贡献者生效。

根据改动范围选择提交前检查;不要求每个提交机械地运行全部命令(CI 会执行完整检查):

pnpm format:check   # 大范围格式检查;小范围可只检查受影响文件
pnpm lint           # 修改源码、测试、脚本或配置时
pnpm build          # 涉及编译、Runtime、生成物或发布资产时
pnpm test           # 高风险修改或最终交付前需要本地全量验证时

注:本地 Windows 若 core.autocrlf=true,未改动的旧文件可能因 CRLF 被 prettier --check 误报;钩子只处理暂存文件,不受影响,旧文件下次编辑时会自动转为 LF。

Commit 规范

提交信息必须使用类型前缀,格式为 <type>: <summary>,scope 可选:<type>(<scope>): <summary>

常用类型包括:featfixdocschorerefactortestbuildciperf

示例:

  • feat: add eval report language switch
  • fix(eval): prevent chart labels from overlapping
  • docs: update contributor commit rules

项目结构规范

当前源码目录按责任分层:

  • app/:CLI 入口、命令编排和用户交互层。只能组合 domain/platform 能力,不承载领域规则。
  • domains/:业务领域模块。每个子目录是一个可独立维护的领域模块,例如 domains/bundle/domains/comet-classic/domains/comet-native/domains/comet-entry/domains/dashboard/domains/skill/domains/workflow-contract/
  • platform/:文件系统、进程、安装平台、版本、路径等平台适配能力。domain 不应直接散落平台差异逻辑。
  • scripts/:构建、发布、benchmark、lint 等仓库自动化脚本。可调用源码模块,但不要成为运行时业务入口。
  • assets/:发布资产和内置 Skill 内容。修改 runtime 源码后必须通过构建同步生成资产,不要把业务逻辑只写在生成物里。
  • eval/scaffold/shell/ 中仅允许 config/repository-layout.json 明确列出的隔离评审 sidecar 入口;它们属于 Eval 容器边界,不是产品 Runtime 入口。

测试目录必须跟随被测对象归属:

  • test/app/ 覆盖 app/ 命令和 CLI 行为。
  • test/domains/<domain>/ 覆盖对应 domains/<domain>/ 模块;新增 domain 时同步新增同名测试目录。
  • test/platform/ 覆盖 platform/ 适配层。
  • test/scripts/ 覆盖 scripts/ 自动化脚本。
  • test/repository/ 覆盖 README、CI、仓库布局等跨层约束。
  • test/fixtures/test/helpers/ 只放测试数据与测试工具。
  • 禁止新增或恢复 test/ts/ 这种横向桶;旧文件应迁移到上面对应目录。

Read the full file on GitHub · 232 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. 4d ago First seen · 232 lines · 3,767 tokens per session scan A 7e8c79bf84d4

Subscribe to this mod's changes

comet CLAUDE.md is an instructions file published in the GitHub repository rpamis/comet (2,914 stars, last pushed today), licensed MIT. It adds 3,767 tokens to every session, about $0.0188 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