agentleFS
MindrallyMindrally/skills/monorepo/SKILL.md

monorepo

Skill266 starsChanged 10 months agoApache-2.0View on GitHub

Best practices for monorepo development with TypeScript, React, Next.js, Expo, Turbo, and related technologies

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

26 rules. About 0 are common, 21 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈21

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write concise, technical TypeScript code with accurate examples

    line 12
  2. Distinctive:

    Use functional and declarative programming patterns.

    line 13
  3. Distinctive:

    Prefer iteration and modularization over code duplication

    line 14
  4. Very specific:

    Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)

    line 15
  5. Very specific:

    Use lowercase with dashes for directory names (e.g., components/auth-wizard)

    line 18
  6. Distinctive:

    Use TypeScript for all code.

    line 22
  7. Distinctive:

    Avoid enums; use literal types or maps instead

    line 24
  8. Distinctive:

    Use Zustand for state management

    line 29
  9. Distinctive:

    Use TanStack React Query for data fetching and caching

    line 30
  10. Distinctive:

    Follow best practices using Turbo for monorepo management

    line 36
  11. Very specific:

    Use separate apps and packages directories

    line 37
  12. Very specific:

    Keep shared configurations in the root configs/ directory

    line 38
  13. Distinctive:

    Use consistent naming conventions for workspaces

    line 39
  14. Distinctive:

    Follow the standard Turborepo workspaces directory structure:

    line 40
  15. Distinctive:

    Use i18next for web internationalization

    line 46
  16. Distinctive:

    Use expo-localization for React Native internationalization

    line 47
  17. Distinctive:

    Keep translation files organized by feature or domain

    line 48
  18. Distinctive:

    Use early returns for error conditions to avoid deeply nested if statements

    line 54
  19. Distinctive:

    Place the happy path last in the function for improved readability

    line 55
  20. Distinctive:

    Avoid unnecessary else statements.

    line 56
  21. Distinctive:

    Use guard clauses to handle preconditions and invalid states early

    line 57
  22. Distinctive:

    Use dynamic imports for code splitting

    line 62
  23. Distinctive:

    Use Solito for navigation across web and mobile

    line 69
  24. Very specific:

    Use .native.tsx files for platform-specific code

    line 70
  25. Distinctive:

    Use Supabase for authentication and database

    line 75
  26. Distinctive:

    Use Zod schemas for API validation

    line 77

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill 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
SKILL.md

Monorepo Development

You are an expert in TypeScript, React and Next.js, Expo (React Native), Tamagui, Supabase, Zod, Turbo (Monorepo Management), i18next, Zustand, TanStack React Query, Solito, and Stripe.

Code Style and Structure

  • Write concise, technical TypeScript code with accurate examples
  • Use functional and declarative programming patterns; avoid classes
  • Prefer iteration and modularization over code duplication
  • Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)
  • Structure files with exported components, subcomponents, helpers, static content, and types
  • Favor named exports for components and functions
  • Use lowercase with dashes for directory names (e.g., components/auth-wizard)

TypeScript and Validation

  • Use TypeScript for all code; prefer interfaces over types for object shapes
  • Utilize Zod for schema validation and type inference
  • Avoid enums; use literal types or maps instead
  • Implement proper error handling with discriminated unions

State and Data Management

  • Use Zustand for state management
  • Use TanStack React Query for data fetching and caching
  • Minimize useEffect and setState; favor derived state
  • Implement optimistic updates for better UX

Monorepo Structure

  • Follow best practices using Turbo for monorepo management
  • Use separate apps and packages directories
  • Keep shared configurations in the root configs/ directory
  • Use consistent naming conventions for workspaces
  • Follow the standard Turborepo workspaces directory structure:
    • apps/ for application workspaces (Next.js, Expo apps)
    • packages/ for shared package workspaces (UI, utils, configs)

Internationalization

  • Use i18next for web internationalization
  • Use expo-localization for React Native internationalization
  • Keep translation files organized by feature or domain

Error Handling and Validation

  • Prioritize error handling and edge cases
  • Handle errors and edge cases at the beginning of functions
  • Use early returns for error conditions to avoid deeply nested if statements
  • Place the happy path last in the function for improved readability
  • Avoid unnecessary else statements; use if-return pattern instead
  • Use guard clauses to handle preconditions and invalid states early
  • Implement proper error logging and user-friendly error messages

Performance Optimization

  • Use dynamic imports for code splitting
  • Implement lazy loading for non-critical components
  • Optimize images: use WebP format, include size data, implement lazy loading
  • Minimize the use of 'use client', 'useEffect', and 'setState'

Cross-Platform Development

  • Use Solito for navigation across web and mobile
  • Use .native.tsx files for platform-specific code
  • Share business logic and UI components through packages

Backend Integration

  • Use Supabase for authentication and database
  • Implement Row Level Security (RLS) policies
  • Use Zod schemas for API validation
  • Handle webhook events properly

Payments

  • Implement Stripe integration with proper webhook handlers
  • Handle subscription syncing between Stripe and your database
  • Implement proper error handling for payment failures

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.