agentleFS
MindrallyMindrally/skills/turborepo/SKILL.md

turborepo

Skill275 starsChanged 54 days agoApache-2.0View on GitHub

Best practices for Turborepo monorepo build system configuration and optimization

49 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use c15t, next-cache-components-optimizer and 9 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.
  • mezotvSkill

    c15t

    Work with c15t consent management docs, APIs, and integrations for Next.js, React, and JavaScript. Use when the user asks about c15t setup, components, hooks, styling, cookie/consent UX, GDPR/CCPA/IAB TCF compliance, script or iframe blocking, GTM/GA4/PostHog/Meta integrations etc, or self-hosting c15t/backend.

    Also in 3 projects that use this

  • VercelSkill

    next-cache-components-optimizer

    Optimize the meaningful UI available immediately from a Next.js route on an initial load (hard navigation) or named client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route and entry point at a time; the shipped test then guards against regression. Use when asked to grow a static shell, fix a slow first paint or non-instant navigation, diagnose which Suspense boundary blocks useful UI, or add instant() regression coverage. Requires Next.js 16.3+ with Cache Components already adopted.

    Also in 5 projects that use this

  • JetBrainsSkill

    tsdown

    Bundle TypeScript and JavaScript libraries with blazing-fast speed powered by Rolldown. Use when building libraries, generating type declarations, bundling for multiple formats, or migrating from tsup.

    Also in 9 projects that use this

  • JetBrainsSkill

    vitepress

    VitePress static site generator powered by Vite and Vue. Use when building documentation sites, configuring themes, or writing Markdown with Vue components.

    Also in 5 projects that use this

  • lukevellaSkill

    two-factor-authentication-best-practices

    This skill provides guidance and enforcement rules for implementing secure two-factor authentication (2FA) using Better Auth's twoFactor plugin.

    Also in 3 projects that use this

  • +6 more from JetBrains

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 48 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 19
  2. Distinctive:

    Use consistent naming conventions across all workspaces

    line 20
  3. Very specific:

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

    line 31
  4. Very specific:

    Use ^ prefix for topological dependencies (build dependencies first)

    line 55
  5. Very specific:

    Use inputs to specify which files affect task caching

    line 63
  6. Very specific:

    Use dependsOn to define task relationships:

    line 68
  7. Distinctive:

    Create shared config packages:

    line 76
  8. Very specific:

    Use turbo dev to run development servers across workspaces

    line 84
  9. Very specific:

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

    line 86
  10. Very specific:

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

    line 92
  11. Distinctive:

    Keep task definitions consistent across similar workspaces

    line 98
  12. Very specific:

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

    line 99
  13. Distinctive:

    Document workspace purposes and relationships in README files

    line 101
  14. Distinctive:

    Use TypeScript project references for faster type checking

    line 102

“Common” is measured: kept by at least 6 in 10 of the 48 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.