lmring
CLAUDE.md205 starsChanged 9 months agoApache-2.0View on GitHub
This document serves as a shared guideline for all team members when using Claude Code in this opensource LMRing repository. Commands: - Web: pnpm --filter @lmring/web test '[file-path-pattern]' - Packages: pnpm --filter @lmring/<package> test '[file-path-pattern]' Important: - Wrap file paths in single quotes - Never run pnpm test (runs all tests, takes significant time) - Stop and ask for help if test fails twice - Prefer vi.spyOn over vi.mock - Tests must pass type check: pnpm check:types Pre-commit: Runs lint-staged…
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this CLAUDE.md into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 41
Use rebase for git pull
- Very specific: line 44
Use .github/pull_request_template.md for PR description
- Very specific: line 49
Use pnpm as the primary package manager
- Very specific: line 60
Never run pnpm test (runs all tests, takes significant time)
- Distinctive: line 61
Stop and ask for help if test fails twice
- Very specific: line 77
Keys: Add to apps/web/src/locales/{locale}.json
≈ “Common” is an estimate: at least 1 in 5 of the 28,633 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
This document serves as a shared guideline for all team members when using Claude Code in this opensource LMRing repository.
Tech Stack
- Framework: Next.js 16, React 19, TypeScript 6.0+
- Build System: Turborepo with pnpm workspaces
- UI: shadcn/ui, Tailwind CSS 4
- State: Zustand
- Database: PostgreSQL, DrizzleORM
- Auth: Better-Auth
- Testing: Vitest, Playwright
- Linting: Biome
- i18n: i18next, react-i18next (en, fr, zh)
- AI: Vercel AI SDK
Directory Structure
lmring/
├── apps/web/ # Next.js application
└── packages/ # Shared packages
├── ai-hub/ # AI provider integration
├── auth/ # Authentication
├── config/ # Shared config (biome, tailwind, typescript, vitest)
├── database/ # DrizzleORM schemas
├── env/ # Environment variable management
├── i18n/ # Internationalization
├── model-depot/ # AI model definitions
├── storage/ # File storage (S3, Supabase)
├── theme/ # Theme engine, tokens, presets, CSS variable generation
├── ui/ # UI components
└── video-runtime/ # Video generation runtimeDevelopment
Git Workflow
- Use rebase for git pull
- Git commit message should prefix with gitmoji
- Git branch name format:
<type>/<feature-name> - Use
.github/pull_request_template.mdfor PR description - PR titles starting with
✨ feat/or🐛 fixtrigger release workflow
Package Management
- Use
pnpmas the primary package manager - Workspace packages reference each other as
workspace:*
Testing
Commands:
- Web:
pnpm --filter @lmring/web test '[file-path-pattern]' - Packages:
pnpm --filter @lmring/<package> test '[file-path-pattern]'
Important:
- Wrap file paths in single quotes
- Never run
pnpm test(runs all tests, takes significant time) - Stop and ask for help if test fails twice
- Prefer
vi.spyOnovervi.mock - Tests must pass type check:
pnpm check:types
Typecheck
pnpm check:types- Check all packagespnpm --filter <workspace> check:types- Check specific package
Linting
pnpm lint- Check errorspnpm lint:fix- Auto-fix errors
i18n
- Keys: Add to
apps/web/src/locales/{locale}.json - Dev: Translate all three locale files (en, fr, zh)
- Supported locales:
en,fr,zh
Database
pnpm db:generate- Generate migrationspnpm db:migrate- Run migrations (requires env vars)pnpm db:studio- Open Drizzle Studio
Essential Commands
pnpm dev # Start dev server
pnpm build # Build all packages
pnpm check:types # Type check
pnpm lint:fix # Lint and fix
pnpm test # Run tests (avoid, use filtered tests)
pnpm test:e2e # Run E2E testsGit Hooks (Husky + lint-staged)
Pre-commit: Runs lint-staged (executes lint:fix and check:types on staged files)
Commit-msg: Validates conventional commits via commitlint
Important Notes
- Node.js: v24.11.1+
- Package Manager: pnpm 10.34.0
- Dev Server: Turbopack
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.

