ChatCode: Instructions file for Claude Code

CLAUDE.md

ChatCode CLAUDE.md is an instructions file for Claude Code from dengteng/ChatCode. It costs 1,374 tokens per session, scanned A, original, MIT.

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 for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; positional $N argument; mentions Claude Code.

This is dengteng/ChatCode's own configuration. It tells Claude Code how to work on ChatCode 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 ChatCode configures →

Reuse

Borrowing it

Nothing to install: this file belongs to dengteng/ChatCode. 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/dengteng/ChatCode/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/dengteng/ChatCode

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/dengteng/chatcode/claude-md/github.svg)](https://agentmods.dev/instructions/dengteng/chatcode/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/dengteng/chatcode/claude-md"><img src="https://agentmods.dev/badge/instructions/dengteng/chatcode/claude-md/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.

agentmods 80×15 button for ChatCode CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/dengteng/chatcode/claude-md"><img src="https://agentmods.dev/badge/instructions/dengteng/chatcode/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,374 This file is loaded in full into every session.
When invoked 1,374 The same file — it is already loaded in full.
Security scan A 0 findings. 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.01374 $0.01374
Opus 5.5 $0.00550 $0.00550
Sonnet 5.5 $0.00275 $0.00275
Haiku 4.5 $0.00137 $0.00137

Measured 1mo ago against content hash 790f1f55b109, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

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 · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 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-   # 标删一批(前缀匹配)
    
  • 「上传」= 复制进本机 Obsidian 库 ~/Obsidian Vault/Obsidian Vault/chatcode/<期目录>/<文件> (scripts/obsidian-vault.mjs,OBSIDIAN_VAULT_DIR 可覆盖),Fast Note Sync 插件同步到 NAS 和手机。 Mac 上 Obsidian 得开着才会同步。2026-09-14 之前是经 public-services 的 /api/vault 传到 tt center, 知识库搬到 Obsidian 后废弃,vault.mjs 和登录凭据都不要了。 前缀只留一层 chatcode/,和 tt-center-app 的 publish-apk.mjs(packages/tt-center-app/)同一套。
  • 增量靠 out/.published.json 记 mtime:size,跟着产物走、在 .gitignore 里。 图改了重跑即可,不会全量重传。

项目记忆跨电脑同步

  • 记忆 tab 的「跨电脑同步…」:把记忆并进 <根目录>/<项目名>/,再往项目 .claude/settings.local.json 写 Claude Code 原生的 autoMemoryDirectory(src/memory.ts 的 syncMemoryTo)。 ChatCode 和终端里的 claude 都读这个设置,记忆直接落进同步盘,传到别的电脑靠同步盘(Obsidian 库 / iCloud / Dropbox)。
  • 根目录每台电脑各存 localStorage;项目名默认取 git origin 仓库名,两台电脑填同一个名字就共用一份。
  • settings.local.json 里是本机路径,必须在 .gitignore 里,syncMemoryTo 会补。
  • 改了位置后 memoryDirFor 那条默认路径就不对了:面板走 resolveMemoryDir,气泡认引用走 useCustomMemoryDir。
  • 记忆文件本身就是带 frontmatter 的 md,正文里的 [[xxx]] 正好是 Obsidian 双链,不用转换。
  • 2026-10 以前用软链 + launchd 每小时搬(jkj-obsidian/link-memory.sh),launchd 进不了 ~/Downloads 静默失败,已废弃; scripts/publish-memory.mjs 的镜像(库里 memory/<项目名>/)也一并删了。

Read the full file on GitHub · 57 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. 1mo ago Changed · +4 lines · +163 tokens per session 790f1f55b109
  2. 1mo ago Changed · +3 tokens per session af0cda3d7535
  3. 1mo ago Changed · +7 lines · +168 tokens per session cff0845c7990
  4. 2mo ago Changed · -3 lines · -72 tokens per session 89eed5f2548b
  5. 2mo ago 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 today), licensed MIT. It adds 1,374 tokens to every session, about $0.0055 per session on Opus 5.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

ChatCode CLAUDE.md compared with instructions from other repositories

ChatCode CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ChatCode CLAUDE.mddengteng/ChatCodeInstructions file5todayMITA1,374Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,086GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file280k2d agoMITA4,325Codex, OpenCode