agentleFS
llm-ringllm-ring/lmring/CLAUDE.md

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.

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
  1. Distinctive:

    Use rebase for git pull

    line 41
  2. Very specific:

    Use .github/pull_request_template.md for PR description

    line 44
  3. Very specific:

    Use pnpm as the primary package manager

    line 49
  4. Very specific:

    Never run pnpm test (runs all tests, takes significant time)

    line 60
  5. Distinctive:

    Stop and ask for help if test fails twice

    line 61
  6. Very specific:

    Keys: Add to apps/web/src/locales/{locale}.json

    line 77

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

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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 runtime

Development

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.md for PR description
  • PR titles starting with ✨ feat/ or 🐛 fix trigger release workflow

Package Management

  • Use pnpm as 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.spyOn over vi.mock
  • Tests must pass type check: pnpm check:types

Typecheck

  • pnpm check:types - Check all packages
  • pnpm --filter <workspace> check:types - Check specific package

Linting

  • pnpm lint - Check errors
  • pnpm 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 migrations
  • pnpm 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 tests

Git 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

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.