clawsync
CLAUDE.md70 starsChanged 10 months agoMITView on GitHub
- Reads credentials
- Installs packages
In this repositoryOne other file it gives its agents.
- docs/AGENTS.mdAGENTS.md
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
21 rules. About 0 are common, 10 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Do NOT add Vercel, Netlify, or other external hosting configs
- Very specific: line 80
Never reach into a component's internal files.
- Very specific: line 81
After adding/removing a component, always run npx convex dev to regenerate types.
- Very specific: line 84
Always validate function arguments with Convex validators (v.object({}))
- Very specific: line 85
Always use indexes in queries.
- Very specific: line 86
Never use .collect() on tables that grow.
- Very specific: line 94
Do NOT modify convex/agent/security.ts without explicit user approval and explanation.
- Distinctive: line 95
Do NOT store API keys, tokens, or secrets in source code, schema config fields, or git.
- Distinctive: line 96
Do NOT return decrypted secret values from any Convex function.
- Distinctive: line 97
Do NOT bypass the security checker for any tool invocation.
- Very specific: line 98
All new skills must default to approved: false and status: "pending".
- Distinctive: line 101
No HTTP redirects followed in webhook caller (SSRF prevention).
- Very specific: line 105
Use CSS custom properties from src/styles/tokens.css.
- Very specific: line 113
Don't use .collect() without .take(n) on any table
- Distinctive: line 114
Don't hardcode model IDs in agent definition (they're in agentConfig table)
- Distinctive: line 115
Don't put tools directly in the Agent constructor (they're loaded dynamically)
- Very specific: line 116
Don't store secrets in the config field of skillRegistry
- Distinctive: line 117
Don't skip input validation on Convex functions
- Distinctive: line 118
Don't create queries without indexes
- Very specific: line 119
Don't modify security.ts without asking first
- Distinctive: line 120
Don't add Vercel, Netlify, or external hosting configs (use Convex Self Static Hosting only)
≈ “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.
Files
CLAUDE.md
Project
ClawSync is an open source AI agent platform built with React 18 + TypeScript + Vite (frontend) and Convex (backend). The agent uses @convex-dev/agent for thread management, tool calling, and real-time streaming. Multi-model support via Vercel AI SDK.
Commands
npm install # Install dependencies
npx convex dev # Start Convex backend (runs alongside frontend)
npm run dev # Start Vite dev server
npm run build # Production build
npx convex deploy # Deploy Convex functions to production
npm test # Run tests
npm run lint # ESLint
npm run typecheck # TypeScript type checkKey files
convex/schema.ts- Database schema. All tables, all indexes.convex/agent/clawsync.ts- Agent definition. Tools loaded dynamically, not hardcoded.convex/agent/security.ts- Security checker. Runs on EVERY tool invocation. Do not bypass.convex/agent/toolLoader.ts- Assembles tools from skillRegistry + MCP servers at runtime.convex/agent/modelRouter.ts- Resolves provider + model from agentConfig.convex/auth.config.ts- WorkOS AuthKit JWT config (placeholder, not yet active).convex/xTwitter.ts- X/Twitter API v2 integration (read, reply, post tweets).convex/crons.ts- Background jobs (summary tables, health checks, log cleanup).content/soul.md- Default agent identity. Fork owners customize this.src/styles/tokens.css- Design system CSS custom properties (Geist fonts).features.html- Standalone features page for browser viewing.
Hosting rules (non-negotiable)
- This project uses Convex Self Static Hosting ONLY
- Do NOT add Vercel, Netlify, or other external hosting configs
- Component:
@convex-dev/self-static-hosting(installed from GitHub) - See: https://github.com/get-convex/self-static-hosting
Deployment options (in order of preference):
- Convex Storage - Files in Convex, served via HTTP actions (simplest)
- Convex + Cloudflare CDN - Files in Convex, cached at edge (custom domains)
- Cloudflare Pages - Files at Cloudflare edge (best performance)
Key files:
convex/staticHosting.ts- Upload API for self-static-hostingconvex/convex.config.ts- Component registrationconvex/http.ts- Static routes viaregisterStaticRoutes()
Deploy commands:
npm run deploy # Build + deploy frontend to Convex
npm run deploy:static # Upload static files onlyAuthentication
- Current: Password-based auth for SyncBoard (
SYNCBOARD_PASSWORD_HASHenv var) - Future: WorkOS AuthKit for enterprise SSO (not yet configured)
- Auth config placeholder:
convex/auth.config.ts - Frontend prep:
src/main.tsxhas comments for AuthKitProvider setup - See: https://docs.convex.dev/auth/authkit/
X (Twitter) Integration
- Config stored in
xConfigtable, managed via SyncBoard > X - Tweets cached in
xTweetstable for landing page display - Required env vars:
X_BEARER_TOKEN,X_API_KEY,X_API_SECRET,X_ACCESS_TOKEN,X_ACCESS_TOKEN_SECRET - Rate limiting: configurable per hour in SyncBoard
- See: https://developer.x.com/en/docs/x-api
Model Providers
Supported providers (set API key in Convex env vars):
- Anthropic:
ANTHROPIC_API_KEY- Claude models - OpenAI:
OPENAI_API_KEY- GPT models - xAI:
XAI_API_KEY- Grok models - OpenRouter:
OPENROUTER_API_KEY- 300+ models
Convex components
convex/convex.config.tsis the single registration point for all components.- Core: @convex-dev/agent, @convex-dev/rate-limiter, @convex-dev/self-static-hosting.
- Access via
componentsfrom"./_generated/api"(e.g.,components.rateLimiter). - Components are sandboxed. They can't access your tables or env vars unless passed in.
- To add a new component:
npm install, addapp.use()to convex.config.ts, runnpx convex dev. - Never reach into a component's internal files. Use the public API on the
componentsobject. - After adding/removing a component, always run
npx convex devto regenerate types.
Convex patterns to follow
- Always validate function arguments with Convex validators (
v.object({})) - Always use indexes in queries. Define them in schema.ts.
- Never use
.collect()on tables that grow. Use.take(n)or paginate. - Dashboard reads from summary tables (skillInvocationSummary), not from hot log tables.
- Store large outputs (>10KB) in Convex file storage, put storage ID in the log.
- Internal functions:
internalMutation,internalAction,internalQuery. - Cron jobs go in
convex/crons.tsand run isolated from real-time traffic. - HTTP endpoints defined in
convex/http.ts.
Security rules (non-negotiable)
- Do NOT modify
convex/agent/security.tswithout explicit user approval and explanation. - Do NOT store API keys, tokens, or secrets in source code, schema config fields, or git.
- Do NOT return decrypted secret values from any Convex function.
- Do NOT bypass the security checker for any tool invocation.
- All new skills must default to
approved: falseandstatus: "pending". - Webhook handlers MUST verify platform-specific signatures before processing.
- Domain allowlist MUST be checked on every webhook skill invocation, not just at creation.
- No HTTP redirects followed in webhook caller (SSRF prevention).
- Secrets stored in
skillSecretsorchannelSecretstables, encrypted.
Design system
Use CSS custom properties from src/styles/tokens.css. Never hardcode color values.
--interactive: #ea5b26for buttons, active states, links--text-primary: #232323for body text--bg-primary: #f3f3f3for page backgrounds--font-sans: 'Geist'for UI text (loaded via CDN in index.html)--font-mono: 'Geist Mono'for code blocks
What NOT to do
- Don't use
.collect()without.take(n)on any table - Don't hardcode model IDs in agent definition (they're in agentConfig table)
- Don't put tools directly in the Agent constructor (they're loaded dynamically)
- Don't store secrets in the
configfield of skillRegistry - Don't skip input validation on Convex functions
- Don't create queries without indexes
- Don't modify security.ts without asking first
- Don't add Vercel, Netlify, or external hosting configs (use Convex Self Static Hosting only)
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.

