agentleFS
CloudflareKnown publishercloudflare/vibesdk/CLAUDE.md

vibesdk

CLAUDE.md5.4k starsChanged 4 months agoMITView on GitHub

VibeSDK is an agentic full-stack application builder on Cloudflare. Tech Stack: - Frontend: React 19, TypeScript, Vite, TailwindCSS, React Router v7 - Backend: Cloudflare Workers, Durable Objects, Hono, D1, R2, and KV - Agent: Cloudflare Think with AI Gateway model routing - Workspace: SpaceDO Durable Objects - Version history: Cloudflare Artifacts - Preview runtime: Worker Loader bindings and Dynamic Workers - Generated app data: Durable Object Facets with isolated SQLite - WebSocket: PartySocket for real-time communication Project Structure: - /src…

Trending

Quiet since September.about the whole repository

Dec 2025: 4 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 8 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the cloudflare/vibesdk repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about cloudflare/vibesdk

The biggest 5 of 16 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 16

Talked about on GitHub, Hacker News and Bluesky (16 times).

On GitHub · 8

3 more on GitHub

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

23 rules. About 0 are common, 15 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do NOT use emojis in code reviews, changelogs, or any generated content.

    line 7
  2. Distinctive:

    Use clear technical language

    line 9
  3. Very specific:

    Add type to worker/api/websocketTypes.ts

    line 67
  4. Very specific:

    Create the tool under worker/agents/think/

    line 72
  5. Very specific:

    Add required SpaceDO RPC typing to space-workspace-ops.ts

    line 73
  6. Distinctive:

    Update the relevant prompt or skill

    line 75
  7. Very specific:

    Create service in worker/database/services/

    line 81
  8. Very specific:

    Create controller in worker/api/controllers/

    line 82
  9. Very specific:

    Add route in worker/api/routes/

    line 83
  10. Very specific:

    NEVER use any type

    line 118
  11. Distinctive:

    Search codebase for existing types before creating new ones

    line 120
  12. Distinctive:

    Search for similar functionality before implementing

    line 123
  13. Distinctive:

    Never copy-paste code - refactor into shared functions

    line 125
  14. Distinctive:

    No overly verbose AI-like comments

    line 137
  15. Very specific:

    Use any type (find or create proper types)

    line 147
  16. Distinctive:

    Use Vite env variables in Worker code

    line 149
  17. Distinctive:

    Create new implementations without searching for existing ones

    line 151
  18. Distinctive:

    Use emojis in code or comments

    line 152
  19. Distinctive:

    Write verbose AI-like comments

    line 153
  20. Distinctive:

    Search codebase thoroughly before creating new code

    line 156
  21. Distinctive:

    Follow existing patterns consistently

    line 157
  22. Distinctive:

    Keep comments concise and purposeful

    line 158
  23. Distinctive:

    Test thoroughly before submitting

    line 160

≈ “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

This file provides guidance to Claude Code when working with code in this repository.

Communication Style

  • Be professional, concise, and direct
  • Do NOT use emojis in code reviews, changelogs, or any generated content. You may use professional visual indicators or favor markdown formatting over emojis.
  • Focus on substance over style
  • Use clear technical language

Project Overview

VibeSDK is an agentic full-stack application builder on Cloudflare.

Tech Stack:

  • Frontend: React 19, TypeScript, Vite, TailwindCSS, React Router v7
  • Backend: Cloudflare Workers, Durable Objects, Hono, D1, R2, and KV
  • Agent: Cloudflare Think with AI Gateway model routing
  • Workspace: SpaceDO Durable Objects
  • Version history: Cloudflare Artifacts
  • Preview runtime: Worker Loader bindings and Dynamic Workers
  • Generated app data: Durable Object Facets with isolated SQLite
  • WebSocket: PartySocket for real-time communication

Project Structure:

  • /src - React frontend, API types, and API client
  • /worker/agents/think - ThinkAgent, prompts, skills, workspace adapter, and tools
  • /worker/agents/core/behaviors/think.ts - Think host orchestration
  • /worker/api - Routes, controllers, handlers, and WebSocket types
  • /worker/database - D1 schema and services
  • /space - SpaceDO, Artifacts synchronization, preview bundling, and App Facets
  • /sdk - TypeScript client SDK
  • /migrations - D1 migrations
  • /scripts - Setup and deployment utilities

Key Architectural Patterns

ThinkAgent:

  • One Agent backed by a Durable Object per app session
  • Owns conversation, context selection, skills, streaming, tools, and step limits
  • Uses explicit SpaceDO-backed tools; workspace bash is disabled

Workspace and Versioning:

  • SpaceDO owns the isolated live workspace and files
  • Cloudflare Artifacts owns durable commits, branches, history, and restore points
  • commit saves without deploying; deploy_space commits and rebuilds the preview
  • Rollback applies a selected tree, creates a new commit, and redeploys

Preview Runtime:

  • @cloudflare/worker-bundler builds committed project files
  • Worker Loader loads bundled modules as a Dynamic Worker
  • Generated App classes run as Durable Object Facets with isolated SQLite

WebSocket Communication:

  • PartySocket carries realtime agent output, tools, files, and deployment state
  • Session state is restored on reconnect

Common Development Tasks

Change LLM Model for Operation: Edit /worker/agents/inferutils/config.ts → AGENT_CONFIG object

Modify Think Agent Behavior: Edit worker/agents/think/ThinkAgent.ts, the host behavior in worker/agents/core/behaviors/think.ts, and the relevant prompt or skill.

Add New WebSocket Message:

  1. Add type to worker/api/websocketTypes.ts
  2. Handle in worker/agents/core/websocket.ts
  3. Handle in src/routes/chat/utils/handle-websocket-message.ts

Add New Think Tool:

  1. Create the tool under worker/agents/think/
  2. Add required SpaceDO RPC typing to space-workspace-ops.ts
  3. Register it in ThinkAgent.getTools()
  4. Update the relevant prompt or skill
  5. Add focused tests

Add API Endpoint:

  1. Define types in src/api-types.ts
  2. Add to src/lib/api-client.ts
  3. Create service in worker/database/services/
  4. Create controller in worker/api/controllers/
  5. Add route in worker/api/routes/
  6. Register in worker/api/routes/index.ts

Important Context

User Secrets Store (Durable Object):

  • Location: /worker/services/secrets/
  • Purpose: Encrypted storage for user API keys with key rotation
  • Architecture: One DO per user, XChaCha20-Poly1305 encryption, SQLite backend
  • Key derivation: MEK → UMK → DEK (hierarchical PBKDF2)
  • Features: Key rotation, soft deletion, access tracking, expiration support
  • RPC Methods: Return null/boolean on error, never throw exceptions
  • Testing: 90 comprehensive tests in /test/worker/services/secrets/

Workspace and Git:

  • SpaceDO provides workspace and file operations
  • Cloudflare Artifacts stores durable git history
  • Artifacts synchronization lives in space/src/space/artifacts-sync.ts
  • Rollback preserves history by creating a new commit

Abort Controller Pattern:

  • getOrCreateAbortController() reuses controller for nested operations
  • Cleared after top-level operations complete
  • Shared by parent and nested tool calls
  • User abort cancels entire operation tree

Message Deduplication:

  • Tool execution causes duplicate AI messages
  • Backend skips redundant LLM calls (empty tool results)
  • Frontend utilities deduplicate live and restored messages
  • System prompt teaches LLM not to repeat

Core Rules (Non-Negotiable)

1. Strict Type Safety

  • NEVER use any type
  • Frontend imports types from @/api-types (single source of truth)
  • Search codebase for existing types before creating new ones

2. DRY Principle

  • Search for similar functionality before implementing
  • Extract reusable utilities, hooks, and components
  • Never copy-paste code - refactor into shared functions

3. Follow Existing Patterns

  • Frontend APIs: All in /src/lib/api-client.ts
  • Backend Routes: Controllers in worker/api/controllers/, routes in worker/api/routes/
  • Database Services: In worker/database/services/
  • Types: Shared in shared/types/, API in src/api-types.ts

4. Code Quality

  • Production-ready code only - no TODOs or placeholders
  • No hacky workarounds
  • Comments explain purpose, not narration
  • No overly verbose AI-like comments

5. File Naming

  • React Components: PascalCase.tsx
  • Utilities/Hooks: kebab-case.ts
  • Backend Services: PascalCase.ts

Common Pitfalls

Don't:

  • Use any type (find or create proper types)
  • Copy-paste code (extract to utilities)
  • Use Vite env variables in Worker code
  • Forget to update types when changing APIs
  • Create new implementations without searching for existing ones
  • Use emojis in code or comments
  • Write verbose AI-like comments

Do:

  • Search codebase thoroughly before creating new code
  • Follow existing patterns consistently
  • Keep comments concise and purposeful
  • Write production-ready code
  • Test thoroughly before submitting

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.