Borrowing it
Nothing to install: this file belongs to heypandax/cc-pocket. 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/heypandax/cc-pocket/main/CLAUDE.mdgit clone --depth 1 https://github.com/heypandax/cc-pocketWrote 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/heypandax/cc-pocket/claude-md)<a href="https://agentmods.dev/instructions/heypandax/cc-pocket/claude-md"><img src="https://agentmods.dev/badge/instructions/heypandax/cc-pocket/claude-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.01985 | $0.01985 |
| Opus 5 | $0.00992 | $0.00992 |
| Sonnet 5 | $0.00397 | $0.00397 |
| Haiku 4.5 | $0.00198 | $0.00198 |
Grade A, and why
cc-pocket 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 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.
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.
This is a copy
86% identical to cc-pocket AGENTS.md — 19 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md — cc-pocket
手机 App 通过零知识 E2E relay 驱动本机 Claude Code 的伴侣工具。组成:mobile/(Compose Multiplatform App)、daemon/(本机 Kotlin/JVM 守护进程)、relay/(云端 Ktor 中转,源站地址在 .env 的 RELAY_HOST,Cloudflare 前置 pocket.ark-nexus.cc)、protocol/(共享 wire 协议)。
⚠️ 本机 daemon 操作铁律(最重要,先读这一段)
症状:手机连不上 / 卡死 / 状态乱跳 / 会话疯狂 fork。根因几乎总是「同时跑了两个 daemon」——它们抢同一个 relay 账号 + 端口 8799,互相 kill -9,谁都稳不住。
改完 daemon 代码要更新本机 daemon —— 只用这一条命令
cd ~/Desktop/Project/app/cc-pocket
bash scripts/update-local-daemon.sh
它幂等地:构建 installDist → 装到可执行位置 ~/Library/Application Support/cc-pocket/ → 杀干净所有现存 daemon + 清 8799 → service-install 注册单实例 → 校验「进程数=1 且 relay-socket≥1」,不达标就报错退出。
更新前的会话确认门(用户规则):两个 update 脚本都会先查 daemon 是否还驱动着其他正在进行的会话(daemon 的直接子进程,自身谱系除外;探测器 scripts/daemon-live-sessions.sh)。有活会话时脚本会带清单 exit 1——此时必须把清单报给用户、经确认后再 FORCE=1 重跑,不许自作主张点火。
在 cc-pocket 驱动的 claude 会话里(手机/桌面 App 开的会话)不要直接跑上面这条——bootout 会连坐杀掉会话本身(exit 137)。改用:
bash scripts/update-local-daemon-detached.sh
它先做谱系自检(是否 daemon 后代):普通终端 → 等价于直接更新;daemon 驱动 → 预热构建后延迟 20s 脱离点火(python 双 fork+setsid),让会话来得及发完汇报。随后会话断开属预期,daemon 被 launchd 拉起后手机自动重连,重新进入会话即可。
绝对不要做(每一条都会制造第二个 daemon → 立刻不可用)
- ❌
./gradlew :daemon:run—— 会起一个前台 daemon,和 launchd 的那个抢账号。 - ❌ 直接执行
daemon/build/install/.../bin/cc-pocket-daemon—— 同上;而且这个路径在~/Desktop下,launchd 无权执行(TCC,报Operation not permitted),一旦被service-install指到这里就崩溃循环。 - ❌ 手动
nohup cc-pocket-daemon run &起临时实例做测试后忘了杀。 - ❌ 让 cask 的
dev.ccpocket.daemon和 dev 构建同时存在/自启。
必须知道的两个反直觉事实(本机环境)
- cask app-image 版 daemon 在本机连不上 relay(TUN 代理 fake-IP 不放行它,
lsof看它 0 个 socket)。必须用 java 的installDist构建(走~/Library/Application Support/)。update-local-daemon.sh已默认这么做。 - daemon 在 macOS 上不会自注册 launchd 服务(自注册只在 Windows)。plist 只被显式的
cc-pocket-daemon service-install改写。所以 plist 指错路径 = 有人从错误位置跑了service-install。
排查 / 自证命令(只读)
# 有几个 daemon 在跑?(正常应恰好 1 个)
# ⚠️ 不要用 pgrep -f 判断:macOS pgrep 匹配不到超长 java classpath 里的关键字(实测漏报为 0),必须走 ps
ps aux | grep 'cc-pocket-daemon/lib' | grep -v grep | wc -l
# 谁真的连上了 relay(应有 1 条 :443 ESTABLISHED)
for p in $(ps aux | grep 'cc-pocket-daemon/lib' | grep -v grep | awk '{print $2}'); do lsof -nP -p $p 2>/dev/null | grep ':443.*ESTABLISHED' && echo " ^pid $p"; done
lsof -nP -iTCP:8799 -sTCP:LISTEN # pair loopback 端口占用者
launchctl list | grep -i ccpocket # launchd agent(应只有 dev.ccpocket.daemon 一个)
# daemon 日志
tail -f ~/Library/Logs/cc-pocket/daemon.err.log
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.
- 4d ago Changed · +2 lines · +112 tokens per session 5bcc71fd8de8
- 8d ago First seen · 76 lines · 1,873 tokens per session scan A 6b621b9a868f
cc-pocket CLAUDE.md is an instructions file published in the GitHub repository heypandax/cc-pocket (112 stars, last pushed yesterday), licensed MIT. It adds 1,985 tokens to every session, about $0.0099 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to cc-pocket AGENTS.md, differing in 19 lines, and is treated as a copy.
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.