markdown-site
CLAUDE.md628 starsChanged 7 months agoMITView on GitHub
Project instructions for Claude Code. Markdown sync framework. Write markdown in content/, run sync commands, content appears instantly via Convex real-time database. Built for developers and AI agents. Netlify build command: npm ci --include=dev && npx convex deploy --cmd 'npm run build' Important: src/config/siteConfig.ts and the Dashboard Config section (src/pages/Dashboard.tsx ConfigSection) must stay in sync. When adding or modifying a configuration option: 1. Add the option to siteConfig.ts with proper TypeScript types 2. Add corresponding state, generated code, and UI…
- Reads credentials
- Installs packages
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- public/AGENTS.mdAGENTS.md
- .cursor/rules/convex2.mdcCursor rule
- .cursor/rules/convex-doctor.mdcCursor rule
- .cursor/rules/convex-write-conflicts.mdcCursor rule
- .cursor/rules/dev2.mdcCursor rule
- .cursor/rules/gitruels.mdcCursor rule
- .cursor/rules/help.mdcCursor rule
- .cursor/rules/rulesforconvex.mdcCursor rule
- .cursor/rules/sec-check.mdcCursor rule
- .cursor/rules/task.mdcCursor rule
- .cursor/rules/workflow.mdcCursor rule
- .cursor/rules/write.mdcCursor rule
- public/llms.txtllms.txt
- convex-create-componentSkill
- convex-migration-helperSkill
- convex-performance-auditSkill
- convex-quickstartSkill
- convex-setup-authSkill
- convexSkill
- impeccableSkill
- convex-quickstartSkill
- convex-setup-authSkill
- devSkill
- function-creatorSkill
- gitrulesSkill
- helpSkill
- migration-helperSkill
- react-effect-decisionSkill
- real-time-backendSkill
- schema-builderSkill
- sec-checkSkill
- workflowSkill
- writeSkill
- convex-doctorSkill
- convex-return-validatorsSkill
- convex-self-hostingSkill
- create-prdSkill
- robel-authSkill
- update-project-docsSkill
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
- Very specific: line 43
Default auth mode: convex-auth
- Very specific: line 44
Default hosting mode: convex-self-hosted
- Very specific: line 51
Create content/blog/my-post.md with frontmatter (see .claude/skills/frontmatter.md)
- Very specific: line 57
Create content/pages/my-page.md with frontmatter
- Very specific: line 65
Always add validators for args and returns (see .claude/skills/convex.md)
- Distinctive: line 79
Always use Context7 MCP for library/API documentation, code generation, setup or configuration steps
- Distinctive: line 81
Use Context7 for up-to-date API references and best practices
- Very specific: line 87
Use indexes, never .filter() on queries
- Distinctive: line 90
Use event records for counters, not increments
- Distinctive: line 91
No emoji in code or docs
- Distinctive: line 92
No em dashes between words
- Very specific: line 98
Use .filter() in Convex queries (use .withIndex())
- Distinctive: line 100
Read before patching unless necessary
- Distinctive: line 101
Leave console.log in production
- Distinctive: line 104
Add features not requested
- Distinctive: line 105
Use browser default modals/alerts
- Distinctive: line 111
When adding or modifying a configuration option:
- Very specific: line 112
Add the option to siteConfig.ts with proper TypeScript types
- Very specific: line 113
Add corresponding state, generated code, and UI in Dashboard.tsx ConfigSection
- Very specific: line 114
Keep option names consistent (e.g., socialFooter.showInHeader in siteConfig maps to socialFooterShowInHeader in Dashboard state)
- Very specific: line 174
When working on Convex code, always read convex/_generated/ai/guidelines.md first for important guidelines on how to correctly use Convex …
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 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 instructions for Claude Code.
Project context
<!-- Auto-updated by sync:discovery --><!-- Site: markdown sync | Posts: 24 | Pages: 4 | Updated: 2026-04-27T06:32:41.464Z -->Markdown sync framework. Write markdown in content/, run sync commands, content appears instantly via Convex real-time database. Built for developers and AI agents.
Quick start
npm install # Install dependencies
npx convex dev # Start Convex (creates .env.local)
npm run dev # Dev server at localhost:5173
npm run sync # Sync markdown to ConvexCommands
| Command | Purpose |
npm run sync | Sync markdown to dev Convex |
npm run sync:prod | Sync markdown to prod Convex |
npm run sync:discovery | Update AGENTS.md, CLAUDE.md, llms.txt (includes wiki pages) |
npm run sync:discovery:prod | Update discovery files for production |
npm run sync:wiki | Sync wiki from content/blog and content/pages |
npm run sync:wiki:prod | Sync wiki to production |
npm run sync:wiki -- --kb=<id> | Sync wiki into a specific knowledge base |
npm run sync:all | Sync content + wiki + discovery files |
npm run sync:all:prod | Sync all to production |
npm run dev | Start Vite dev server |
npm run build | Production build |
npx convex dev | Start Convex dev watcher |
npx convex deploy | Deploy Convex to production |
npm run deploy | Deploy static app with Convex self-hosting |
npm run import <url> | Import external URL as post |
Default and legacy modes
- Default auth mode:
convex-auth - Default hosting mode:
convex-self-hosted - Legacy compatibility mode:
workosauth +netlifyhosting
Workflows
Adding a blog post
- Create
content/blog/my-post.mdwith frontmatter (see.claude/skills/frontmatter.md) - Run
npm run sync - Content appears at localhost:5173/my-post
Adding a page
- Create
content/pages/my-page.mdwith frontmatter - Run
npm run sync - Page appears at localhost:5173/my-page
Modifying Convex functions
- Edit files in
convex/ npx convex devwatches and deploys automatically- Always add validators for args and returns (see
.claude/skills/convex.md)
Deploying to production
npm run sync:all:prod # Sync content + wiki + discovery to prod
npx convex deploy # Deploy Convex functions
npm run deploy # Deploy static assets via Convex self-hostingNetlify build command: npm ci --include=dev && npx convex deploy --cmd 'npm run build'
AI assistance
- Always use Context7 MCP for library/API documentation, code generation, setup or configuration steps
- Proactively look up documentation without explicit requests when working with libraries
- Use Context7 for up-to-date API references and best practices
Code conventions
- TypeScript strict mode
- Convex validators on all functions (args + returns)
- Use indexes, never
.filter()on queries - Make mutations idempotent with early returns
- Patch directly without reading first when possible
- Use event records for counters, not increments
- No emoji in code or docs
- No em dashes between words
- Sentence case for headings
- CSS variables for theming (no hardcoded colors)
Do not
- Use
.filter()in Convex queries (use.withIndex()) - Increment counters directly (use event records)
- Read before patching unless necessary
- Leave console.log in production
- Break existing functionality
- Over-engineer solutions
- Add features not requested
- Use browser default modals/alerts
Configuration alignment
Important: src/config/siteConfig.ts and the Dashboard Config section (src/pages/Dashboard.tsx ConfigSection) must stay in sync.
When adding or modifying a configuration option:
- Add the option to
siteConfig.tswith proper TypeScript types - Add corresponding state, generated code, and UI in Dashboard.tsx ConfigSection
- Keep option names consistent (e.g.,
socialFooter.showInHeaderin siteConfig maps tosocialFooterShowInHeaderin Dashboard state)
The Dashboard Config generates downloadable siteConfig.ts code. Users can configure via either file editing or the dashboard UI. Both paths should produce equivalent results.
Key files
| File | Purpose |
convex/schema.ts | Database schema with indexes |
convex/posts.ts | Post queries and mutations |
convex/pages.ts | Page queries and mutations |
convex/stats.ts | Analytics (conflict-free patterns) |
convex/rateLimits.ts | Rate limit definitions (4 tiers) and HTTP action bridge |
convex/http.ts | HTTP endpoints with rate limiting |
src/config/siteConfig.ts | Site configuration |
src/pages/Dashboard.tsx | Dashboard including ConfigSection |
scripts/sync-posts.ts | Markdown to Convex sync |
scripts/sync-discovery-files.ts | Updates AGENTS.md, CLAUDE.md, llms.txt with wiki pages. Copies AGENTS.md to public/. |
Project structure
content/
blog/ # Markdown blog posts
pages/ # Static pages
convex/ # Convex functions and schema
netlify/
edge-functions/ # RSS, sitemap, API proxies
public/
images/ # Static images
raw/ # Generated raw markdown files
scripts/ # Sync and utility scripts
src/
components/ # React components
config/ # Site configuration
context/ # React context (theme, sidebar)
hooks/ # Custom hooks
pages/ # Route components
styles/ # Global CSSSkills reference
Detailed documentation in .claude/skills/:
frontmatter.md- Frontmatter syntax for posts and pagesconvex.md- Convex patterns specific to this appsync.md- How sync commands work
Resources
- Convex Best Practices
- Convex TypeScript
- Convex Write Conflicts
- Project README
- AGENTS.md
<!-- convex-ai-start -->This project uses Convex as its backend.
When working on Convex code, always read convex/_generated/ai/guidelines.md first for important guidelines on how to correctly use Convex APIs and patterns. The file contains rules that override what you may have learned about Convex from training data.
Convex agent skills for common tasks can be installed by running npx convex ai-files install.
<!-- convex-ai-end -->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.

