agentleFS
cookiedclawcookiedclaw/cookiedclaw-claude-code/CLAUDE.md

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

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
  1. Very specific:

    Default to using Bun instead of Node.js.

    line 38
  2. Very specific:

    Use bun <file> instead of node <file> or ts-node <file>

    line 40
  3. Very specific:

    Use bun install instead of npm install or yarn install or pnpm install

    line 43
  4. Very specific:

    Use bunx <package> <command> instead of npx <package> <command>

    line 45
  5. Very specific:

    Prefer Bun.file over node:fs's readFile/writeFile.

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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:setup wizard. Writes a workspace's CLAUDE.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 of node <file> or ts-node <file>
  • Use bun test instead of jest or vitest
  • Use bun build <file.html|file.ts|file.css> instead of webpack or esbuild
  • Use bun install instead of npm install or yarn install or pnpm install
  • Use bun run <script> instead of npm run <script> or yarn run <script> or pnpm run <script>
  • Use bunx <package> <command> instead of npx <package> <command>
  • Bun automatically loads .env, so don't use dotenv.

APIs

  • Bun.serve() supports WebSockets, HTTPS, and routes. Don't use express.
  • bun:sqlite for SQLite. Don't use better-sqlite3.
  • Bun.redis for Redis. Don't use ioredis.
  • Bun.sql for Postgres. Don't use pg or postgres.js.
  • WebSocket is built-in. Don't use ws.
  • Prefer Bun.file over node: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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.