my-claude-setup
CLAUDE.md0 starsChanged 10 months agoMITView on GitHub
This file provides coding standards and architecture patterns for Claude Code. SETUP INSTRUCTIONS: 1. Search for all <!-- CUSTOMIZE --> markers 2. Fill in your project-specific details 3. Remove examples that don't apply to your project 4. Adjust rules to match your team's conventions This template is generalized from a production SaaS setup. Adapt as needed. --> These rules address recurring mistakes that cause real issues. Each one prevents debugging time, security vulnerabilities, or broken builds: Use the Task tool…
In this repository19 other files it gives its agents.
- audit-planSkill
- builder-workflowSkill
- code-reviewSkill
- context7-mcpSkill
- create-planSkill
- customizeSkill
- devSkill
- hand-crafted-svgSkill
- implementSkill
- improve-promptSkill
- playwright-e2eSkill
- playwright-mcpSkill
- postgres-expertSkill
- react-form-builderSkill
- review-planSkill
- sequential-thinking-mcpSkill
- server-action-builderSkill
- service-builderSkill
- tavily-mcpSkill
The file
We split this CLAUDE.md into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Search for all <!-- CUSTOMIZE --> markers
- Distinctive: line 9
Remove examples that don't apply to your project
- Distinctive: line 56
Use type guards, not type assertions
- Very specific: line 58
Use destructuring: const { name } = user not const name = user.name
- Very specific: line 59
Use millisecond constants (e.g., const TIMEOUT = 30_000) instead of magic numbers
- Very specific: line 64
Use the Task tool to delegate tasks to specialized sub-agents.
≈ “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 Template for Next.js / Supabase / TypeScript Projects
This file provides coding standards and architecture patterns for Claude Code.
SETUP INSTRUCTIONS:
1. Search for all <!-- CUSTOMIZE --> markers- Fill in your project-specific details
- Remove examples that don't apply to your project
- Adjust rules to match your team's conventions
This template is generalized from a production SaaS setup. Adapt as needed. -->
<!-- CUSTOMIZE: Replace with a brief description of your project
Example: "Acme SaaS platform — Next.js App Router, Supabase, TypeScript."
-->Critical Rules
These rules address recurring mistakes that cause real issues. Each one prevents debugging time, security vulnerabilities, or broken builds:
- Using
anydefeats TypeScript's safety net — bugs and security issues reach production undetected. Use proper types orunknown. console.log/console.errorin production breaks structured logging, making production debugging impossible. Use a proper logger (e.g., Pino, Winston, or your framework's logging utility).- Missing
import 'server-only'allows server code to bundle into the client, leaking API keys and database credentials to the browser. - Server actions must validate inputs with Zod schemas and verify authentication before processing. Unauthenticated or unvalidated data must never reach the database.
- Tables without RLS expose all rows to any authenticated user — one missing policy means customer data leaks across accounts.
- Forgetting to
await paramsin async server components causes runtime errors in Next.js that are hard to trace. useEffectoften masks logic that belongs in a server component, event handler, or derived state. Each use should be justified with a comment.- Multiple separate
useStatecalls that change together cause re-renders and state sync bugs. Prefer a single state object. - Custom form handling bypasses the shared validation pipeline. Use
react-hook-form+ Zod to keep validation consistent. - Building custom UI when your component library already has the component creates visual inconsistency and double maintenance. Check your component library first.
<!-- CUSTOMIZE: Add any project-specific or framework-specific critical rules here.
Examples:
- "When merging upstream, propagate infrastructure changes to all product apps."
- "Use your framework's Server Action wrapper for auth + validation on every mutation."
- "Never use the admin Supabase client without documenting why RLS bypass is needed."
-->Monorepo
<!-- CUSTOMIZE: List your apps/packages here, or remove this section for single-app projects. -->Commands
<!-- CUSTOMIZE: Add your project's dev, build, test, and lint commands here. -->Architecture
<!-- CUSTOMIZE: Describe your app's architecture (multi-tenant, data fetching, auth, type safety). -->Code Style
- Interfaces over types for object shapes; export all types
- Use type guards, not type assertions
- Service pattern: private class + exported factory function
- Use destructuring:
const { name } = usernotconst name = user.name - Use millisecond constants (e.g.,
const TIMEOUT = 30_000) instead of magic numbers - See
.claude/rules/coding-style.mdfor full style guide
Delegate to Agents
Use the Task tool to delegate tasks to specialized sub-agents. Agents are defined in .claude/agents/ — check agent descriptions to find the right one for your task.
Verification
<!-- CUSTOMIZE: Add your project's typecheck, lint, and test commands here. -->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.

