agentleFS
MindrallyMindrally/skills/turborepo/SKILL.md

turborepo

Skill266 starsChanged 10 months agoApache-2.0View on GitHub

Best practices for Turborepo monorepo build system configuration and optimization

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use hono, better-auth-best-practices and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • VercelSkill

    hono

    Use when building Hono web applications deployed to Vercel, or when the user asks about Hono APIs, routing, middleware, JSX, validation, testing, or streaming. TRIGGER when code imports from 'hono' or 'hono/*', or user mentions Hono. Use `npx hono request` to test endpoints.

    Also in 4 projects that use this

  • anasahmed07Skill

    better-auth-best-practices

    Skill for integrating Better Auth - the comprehensive TypeScript authentication framework.

    Also in 3 projects that use this

  • akornmeierSkill

    shadcn-ui

    Use when building React UIs with component libraries, implementing forms, dialogs, navigation, or data display. Use when user mentions shadcn, Radix UI, Base UI, or asks about accessible React components. Proactively suggest when building UI that would benefit from pre-built accessible components with Tailwind CSS styling.

    Also in 3 projects that use this

  • SentrySkill

    vercel-composition-patterns

    Also in 3 projects that use this

  • VercelSkill

    web-design-guidelines

    Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".

    Also in 4 projects that use this

  • StrayDragonSkill

    ui-ux-pro-max

    UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 5 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Keep the root package.json minimal with workspace configuration

    line 16
  2. Distinctive:

    Use consistent naming conventions across all workspaces

    line 17
  3. Very specific:

    Use internal package references with workspace protocol: "@repo/ui": "workspace:*"

    line 28
  4. Very specific:

    Use ^ prefix for topological dependencies (build dependencies first)

    line 52
  5. Very specific:

    Use inputs to specify which files affect task caching

    line 60
  6. Very specific:

    Use dependsOn to define task relationships:

    line 65
  7. Distinctive:

    Create shared config packages:

    line 73
  8. Very specific:

    Use turbo dev to run development servers across workspaces

    line 81
  9. Very specific:

    Use --filter with patterns: turbo build --filter=./apps/*

    line 83
  10. Very specific:

    Use --dry-run to preview what would be executed

    line 89
  11. Distinctive:

    Keep task definitions consistent across similar workspaces

    line 95
  12. Very specific:

    Use workspace-level turbo.json for package-specific overrides

    line 96
  13. Distinctive:

    Document workspace purposes and relationships in README files

    line 98
  14. Distinctive:

    Use TypeScript project references for faster type checking

    line 99

“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “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

Turborepo Development

You are an expert in Turborepo, the high-performance build system for JavaScript and TypeScript monorepos.

Project Structure

  • Organize workspaces following the standard Turborepo structure:
    • apps/ - Application workspaces (web apps, APIs, mobile apps)
    • packages/ - Shared packages (UI components, utilities, configs)
    • tooling/ - Build tools and configurations (optional)
  • Keep the root package.json minimal with workspace configuration
  • Use consistent naming conventions across all workspaces

Workspace Configuration

  • Define workspaces in the root package.json:
    {
      "workspaces": ["apps/*", "packages/*"]
    }
  • Each workspace should have its own package.json with proper dependencies
  • Use internal package references with workspace protocol: "@repo/ui": "workspace:*"

turbo.json Configuration

{
  "$schema": "https://turbo.build/schema.json",
  "tasks": {
    "build": {
      "dependsOn": ["^build"],
      "outputs": ["dist/**", ".next/**", "!.next/cache/**"]
    },
    "dev": {
      "cache": false,
      "persistent": true
    },
    "lint": {},
    "test": {
      "dependsOn": ["build"]
    }
  }
}
  • Use ^ prefix for topological dependencies (build dependencies first)
  • Define proper outputs for caching
  • Mark development tasks with cache: false and persistent: true

Caching Strategy

  • Configure remote caching for CI/CD with Vercel or self-hosted solutions
  • Define accurate outputs arrays to ensure proper cache hits
  • Use inputs to specify which files affect task caching
  • Exclude cache directories from outputs (e.g., !.next/cache/**)

Task Dependencies

  • Use dependsOn to define task relationships:
    • "^build" - Run build in dependencies first
    • "lint" - Run lint in the same package
    • "@repo/ui#build" - Run build in a specific package
  • Define proper task ordering for complex build pipelines

Shared Configurations

  • Create shared config packages:
    • @repo/typescript-config - Shared TypeScript configurations
    • @repo/eslint-config - Shared ESLint configurations
    • @repo/tailwind-config - Shared Tailwind configurations
  • Reference configs using extends or imports in workspace configs

Development Workflow

  • Use turbo dev to run development servers across workspaces
  • Filter commands to specific workspaces: turbo build --filter=web
  • Use --filter with patterns: turbo build --filter=./apps/*
  • Watch mode with turbo watch for continuous builds

CI/CD Integration

  • Enable remote caching in CI for faster builds
  • Use --dry-run to preview what would be executed
  • Implement proper environment variable handling with globalEnv and env
  • Set up GitHub Actions or other CI with Turborepo caching

Best Practices

  • Keep task definitions consistent across similar workspaces
  • Use workspace-level turbo.json for package-specific overrides
  • Minimize root-level dependencies; install in workspaces that need them
  • Document workspace purposes and relationships in README files
  • Use TypeScript project references for faster type checking
  • Implement incremental builds for large codebases

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.