ChatCode CLAUDE.md

A project instruction file for ChatCode that tells a coding agent how to package the app and upload product images.

In plain words
What is it for?
Use it when changing ChatCode, especially when building signed macOS app packages or publishing product-introduction images.
Why use it?
It keeps repeated release steps consistent and helps avoid breaking permissions or disrupting other running work.

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/dengteng/chatcode/claude-md
Clone the repo
git clone --depth 1 https://github.com/dengteng/ChatCode
Per session 1,112 This file is loaded in full into every session.
When invoked 1,112 The same file — it is already loaded in full.
Security scan A 0 findings. 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.01112 $0.01112
Opus 5 $0.00556 $0.00556
Sonnet 5 $0.00222 $0.00222
Haiku 4.5 $0.00111 $0.00111

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

Security

Grade A, and why

ChatCode CLAUDE.md 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 yesterday.

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.

CLAUDE.md · 49 lines

How it starts

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

chat-code

打包规矩(重要)

  • 每次完成改代码的任务后都自动打包,不用等用户开口。
  • 改完代码只打包,不要自动 quit app / pkill / 覆盖 /Applications。 原因:会搞坏用户其他会话里正在执行的任务。
  • 必须签名打包,禁止打 adhoc 包。打包命令固定这一条:
    export APPLE_SIGNING_IDENTITY="$(security find-identity -v -p codesigning | awk -F'"' '/Apple Development/{print $2; exit}')"
    [ -n "$APPLE_SIGNING_IDENTITY" ] || { echo "无可用签名证书,停手"; exit 1; }
    PATH="$HOME/.cargo/bin:$PATH" npx tauri build
    
    cargo~/.cargo/bin,不在默认 PATH;身份从 keychain 现取,真名不落仓库)
  • 为什么非签不可:adhoc 包在 TCC 里靠 cdhash 认身份,每次重打包 cdhash 变, 屏幕录制/麦克风授权全部失效并重新弹窗(「隐私与安全性」里那行是残留旧记录)。 用开发者证书后 csreq 认 com.chatcode.app + 证书,重打包授权不掉。
  • 打完 codesign -dvvv <app> 自检:必须是 Identifier=com.chatcode.app + Authority=Apple Development: …,出现 Signature=adhoc 就是没签上,重来。
  • 打完只告诉用户新包路径,用户自己装: src-tauri/target/release/bundle/macos/ChatCode.app
  • 签名身份不写进 tauri.conf.json / package.json(会把开发者真名 + 证书 ID 提交进仓库)。

产品介绍图出完就上传(重要)

  • product-intro-pic skill 出完一期图后自动上传,不用等用户开口:
    node scripts/publish-pics.mjs           # 传全部期(未改动的自动跳过)
    node scripts/publish-pics.mjs 13-功能特性横版   # 只传这一期
    node scripts/publish-pics.mjs drop chatcode/12-   # 标删一批(前缀匹配)
    
  • 传到 tt-knowledge 的 [email protected] 空间,vault 路径 chatcode/<期目录>/<文件>前缀只留一层 chatcode/:客户端文件列表是单行截断的,前缀长了每行都是相同的那截, 看不出是哪一期哪张图(一开始写成 packages/chatcode/product-intro/,列表里全糊成一样)。
  • 客户端没有通用文件夹折叠 —— knowledge.tsx 里只硬编码了 images/ 前缀折叠成 「文章采集的图片」,其余一律平铺。要真正的分组得改 tt-knowledge 那个项目。
  • 和 fortune-signal-app 的 publish-apk.mjs 同一套:scripts/vault.mjs 是从那边原样搬来的, 凭据共用 ~/.chatcode-publish.json(已登录,别重登 —— refresh token 是轮换式的, 重登会把另一端顶下线)。
  • 增量靠 out/.published.jsonmtime:size,跟着产物走、在 .gitignore 里。 图改了重跑即可,不会全量重传。

架构速记

  • 前端 Tauri webview(src/)连 ws://127.0.0.1:PORT(开发 8975 / 打包 8976)。
  • 后端 sidecar(sidecar/server.mjs):每会话一个 SDK query,走 @anthropic-ai/claude-agent-sdk。 打包版被 esbuild 打进 src-tauri/resources/sidecar.mjs注释会被剥掉,别 grep 注释验证 bundle)。
  • 用量条数据源:sidecar 的 usageProbe(无 prompt 常驻 query)读 SDK /api/oauth/usage, 取 five_hour / seven_dayutilization。空闲会话的 GET 会回退到旧响应头快照(偏低),只认探针
  • 原生能力(文件选择器等)走 src-tauri/src/main.rs#[tauri::command]。 阻塞型对话框(blocking_pick_folder)必须放 async + spawn_blocking,否则主线程自死锁卡死。

Read the full file on GitHub · 49 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. yesterday First seen · 49 lines · 1,112 tokens per session scan A 4b286c95cb34

Subscribe to this mod's changes

ChatCode CLAUDE.md is an instructions file published in the GitHub repository dengteng/ChatCode (5 stars, last pushed 2d ago), licensed MIT. It adds 1,112 tokens to every session, about $0.0056 per session on Opus 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-31.

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,182 tokens

buildNext

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

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

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

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,040 tokens

langchain 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,345 tokens