cookiedclaw-claude-code
CLAUDE.md4 starsChanged 7 months agoMITView on GitHub
This is the plugin source repo, not a runtime workspace. If you're a user looking for "who am I as the agent", that lives in your workspace's CLAUDE.md — written by /cookiedclaw:setup into the directory you ran it from. This file is for hacking on cookiedclaw itself. Each user workspace is self-contained. cookiedclaw never reads from $HOME — all state lives under $PWD: src/paths.ts is the single source of truth — change paths there, not in random call sites. Default…
- Reads credentials
In this repositoryOne other file it gives its agents.
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 38
Default to using Bun instead of Node.js.
- Very specific: line 40
Use bun <file> instead of node <file> or ts-node <file>
- Very specific: line 43
Use bun install instead of npm install or yarn install or pnpm install
- Very specific: line 45
Use bunx <package> <command> instead of npx <package> <command>
- Very specific: line 55
Prefer Bun.file over node:fs's readFile/writeFile.
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md — cookiedclaw repo (developer notes)
This is the plugin source repo, not a runtime workspace. If you're a user looking for "who am I as the agent", that lives in your workspace's CLAUDE.md — written by /cookiedclaw:setup into the directory you ran it from.
This file is for hacking on cookiedclaw itself.
Architecture summary
src/channel.ts— wiring entry point. Imports the rest as side effects.src/{paths,env,bot,format,chat-state,access,attachments,progress,mcp,tools,inbound,permission-relay,progress-server,skill-discovery}.ts— one concern per file.hooks/tool-progress.ts— Pre/PostToolUse hook script.skills/setup/SKILL.md— the/cookiedclaw:setupwizard. Writes a workspace'sCLAUDE.md,BOOTSTRAP.md,./.cookiedclaw/keys.env..claude-plugin/{plugin,marketplace}.json— plugin + custom marketplace manifests..mcp.json— MCP server registration with${CLAUDE_PLUGIN_ROOT}so it works post-install.
Per-workspace state model
Each user workspace is self-contained. cookiedclaw never reads from $HOME — all state lives under $PWD:
<workspace>/
├── CLAUDE.md ← system prompt for the agent (CC auto-loads)
├── BOOTSTRAP.md ← first-contact discovery (self-deletes)
├── IDENTITY.md ← agent identity (written by agent on first contact)
├── USER.md ← user identity
├── SOUL.md ← agent values
└── .cookiedclaw/
├── keys.env ← bot token + integration keys (chmod 600)
├── access.json ← paired Telegram users
├── inbox/ ← downloaded attachments
└── cache/{progress.log,progress.port}src/paths.ts is the single source of truth — change paths there, not in random call sites.
Development conventions
Default to using Bun instead of Node.js.
- Use
bun <file>instead ofnode <file>orts-node <file> - Use
bun testinstead ofjestorvitest - Use
bun build <file.html|file.ts|file.css>instead ofwebpackoresbuild - Use
bun installinstead ofnpm installoryarn installorpnpm install - Use
bun run <script>instead ofnpm run <script>oryarn run <script>orpnpm run <script> - Use
bunx <package> <command>instead ofnpx <package> <command> - Bun automatically loads .env, so don't use dotenv.
APIs
Bun.serve()supports WebSockets, HTTPS, and routes. Don't useexpress.bun:sqlitefor SQLite. Don't usebetter-sqlite3.Bun.redisfor Redis. Don't useioredis.Bun.sqlfor Postgres. Don't usepgorpostgres.js.WebSocketis built-in. Don't usews.- Prefer
Bun.fileovernode:fs's readFile/writeFile. Bun.$\ls`` instead of execa.
Testing
import { test, expect } from "bun:test";
test("hello world", () => {
expect(1).toBe(1);
});For more, read the Bun API docs in node_modules/bun-types/docs/**.mdx.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

