
Turborepo Monorepo
Wire GitHub Actions CI for a pnpm Turborepo with affected-package filters and optional Remote Cache so solo builders ship monorepos without full-repo rebuilds every push.
Overview
Turborepo Monorepo is an agent skill for the Ship phase that documents GitHub Actions CI for pnpm Turborepos with affected filters and optional Remote Cache.
Install
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill turborepo-monorepoWhat is this skill?
- Complete GitHub Actions CI template with pnpm 9, Node 20, checkout, and concurrency cancel-in-progress
- Turborepo `--filter=[HEAD^]` for lint, typecheck, test, and build on only packages touched since last commit
- Remote Cache variant with TURBO_TOKEN and TURBO_TEAM secrets for faster CI across machines
- 15-minute job timeout and standard push/PR triggers on main
- pnpm/action-setup and setup-node with pnpm cache for repeatable installs
- 15-minute CI job timeout in the basic workflow example
Adoption & trust: 1.2k installs on skills.sh; 271 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You run a multi-package repo but CI still lints, tests, and builds everything on every push, burning minutes and hiding which workspace actually broke.
Who is it for?
Indie builders with apps and libs in one Turborepo who want PR CI that matches how turbo filters work locally.
Skip if: Single-package repos with no turbo.json, or teams that only need Vercel preview deploys without a custom Actions pipeline.
When should I use this skill?
Setting up or fixing CI for a Turborepo monorepo with pnpm and GitHub Actions, including optional Remote Cache.
What do I get? / Deliverables
You get ready-to-adapt workflows that run Turborepo tasks only on changed packages and can hook into Remote Cache for faster repeat builds on main and PRs.
- GitHub Actions workflow YAML for build-and-test
- Remote Cache–enabled CI variant with env secrets
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Continuous integration is the canonical gate before release; this skill documents the workflow that runs lint, typecheck, test, and build on every PR and main push. Automated build-and-test pipelines belong on the testing shelf because they validate changed packages before merge and deploy—not one-off local dev setup.
Where it fits
Paste the baseline workflow when you add a second package to the repo and need CI to understand workspace boundaries.
Enable HEAD^ filters on PRs so only touched apps run tests before you merge a risky refactor.
Add TURBO_TOKEN and TURBO_TEAM after CI times out because every job cold-builds shared packages.
How it compares
Use for monorepo CI orchestration instead of generic Node CI snippets that ignore Turborepo filters and cache.
Common Questions / FAQ
Who is turborepo-monorepo for?
Solo and small teams shipping JavaScript or TypeScript monorepos with Turborepo and pnpm who need a credible GitHub Actions baseline without hiring a platform engineer.
When should I use turborepo-monorepo?
During Ship when you add or fix CI; during Build when you first split apps into workspaces and need automation; during Operate when you tune cache secrets and job timeouts after flaky runs.
Is turborepo-monorepo safe to install?
It is documentation-style procedural knowledge with example YAML referencing standard GitHub and Vercel ecosystem actions; review the Security Audits panel on this page and pin action versions in your own repo.
SKILL.md
READMESKILL.md - Turborepo Monorepo
# CI/CD con Turborepo ## GitHub Actions ### Basic workflow ```yaml name: CI on: push: branches: [main] pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: build-and-test: name: Build and test runs-on: ubuntu-latest timeout-minutes: 15 steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup pnpm uses: pnpm/action-setup@v4 with: version: 9 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 20 cache: 'pnpm' - name: Install dependencies run: pnpm install - name: Run lint run: pnpm run lint --filter=[HEAD^] - name: Run type check run: pnpm run typecheck --filter=[HEAD^] - name: Run tests run: pnpm run test --filter=[HEAD^] - name: Build run: pnpm run build --filter=[HEAD^] ``` ### Con Turborepo Remote Cache ```yaml name: CI on: push: branches: [main] pull_request: jobs: build-and-test: runs-on: ubuntu-latest # Output from turbo's `pack` command outputs: artifact-hash: ${{ steps.pack.outputs.hash }} env: TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TEAM: ${{ secrets.TURBO_TEAM }} steps: - uses: actions/checkout@v4 - name: Setup pnpm uses: pnpm/action-setup@v4 with: version: 9 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 20 cache: 'pnpm' - name: Install dependencies run: pnpm install - name: Build & test run: pnpm run build test - name: Pack cache id: pack run: | tar -czf cache.tar.gz .turbo/cache echo "hash=$(sha256sum cache.tar.gz | cut -c1-10)" >> $GITHUB_OUTPUT - name: Upload cache uses: actions/cache/save@v4 with: path: .turbo/cache key: turbo-${{ runner.os }}-${{ steps.pack.outputs.hash }} ``` ### Workflow con affected packages ```yaml name: Affected CI on: pull_request: jobs: affected: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup pnpm uses: pnpm/action-setup@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 20 cache: 'pnpm' - name: Install dependencies run: pnpm install - name: Lint affected run: pnpm run lint --filter=[HEAD^] - name: Test affected run: pnpm run test --filter=[HEAD^] - name: Build affected run: pnpm run build --filter=[HEAD^] ``` ## CircleCI ```yaml version: 2.1 orbs: node: circleci/node@5.1 executors: node-executor: docker: - image: cimg/node:20.11 resource_class: medium jobs: build-and-test: executor: node-executor steps: - checkout - node/install-packages: pkg-manager: pnpm cache-version: v1 - run: name: Lint affected command: pnpm run lint --filter=[HEAD^] - run: name: Test affected command: pnpm run test --filter=[HEAD^] - run: name: Build affected command: pnpm run build --filter=[HEAD^] workflows: build-test: jobs: - build-and-test: context: - turbo-secrets ``` ## GitLab CI ```yaml stages: - validate - test - build variables: PNPM_VERSION: "9" NODE_VERSION: "20" TURBO_TOKEN: ${TURBO_TOKEN} TURBO_TEAM: ${TURBO_TEAM} .cache_config: cache: key: files: - pnpm-lock.yaml paths: - .pnpm-store - node_modules lint: stage: validate image: node:${NODE_VERSION} extends: .cache_config script: - corepack enable - corepack prepare pnpm@${PNPM_VERSION} --activate - pnpm install --frozen-loc