Communitygithub.com

Turborepo单体仓库

Turborepo单体仓库——共享包、构建缓存与管道配置。

Turborepo单体仓库 是什么?

该技能定义了一个基于Turborepo的monorepo(单体仓库)架构,用于高效管理包含多个应用和共享包的项目。它通过`turbo.json`配置任务管道,实现构建缓存与依赖顺序编排,显著提升构建速度。支持的应用类型包括web、API、移动端等,位于`apps/`目录;共享包(如UI组件、TypeScript配置、ESLint配置)位于`packages/`目录,并采用`main: ./src/index.ts`直接引用源码,无需额外构建步骤。技能强调了避免跨应用直接导入、保持依赖版本一致、完善`dependsOn`声明等关键实践,适用于Claude Code、Cursor、Codex等主流AI编程助手,帮助开发者快速搭建和维护大规模TypeScript生态下的monorepo项目。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/YepAPI/skills/tree/HEAD/skills/monorepo

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

单体仓库

规则

  • Turborepo用于任务编排——turbo.json定义管道
  • 在package.json中声明工作区:"workspaces": ["apps/*", "packages/*"]
  • 共享包位于packages/——UI组件、配置、类型定义
  • 应用位于apps/——web、API、移动端等
  • 内部包使用"main": "./src/index.ts"——无需构建步骤
  • turbo.json管道:定义dependsOn、outputs、cache
  • 共享TypeScript配置:packages/config-typescript/由所有包继承
  • 共享ESLint配置:packages/config-eslint/

避免

  • 在应用之间直接导入——使用共享包
  • 不同包中使用不同版本的同一依赖——使用pnpm覆盖
  • 在turbo管道中遗漏dependsOn——会导致构建结果过时
  • 构建内部包——使用TypeScript路径别名或main: ./src/index.ts

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

YepAPI/skills

WCAG 2.1 AA — semantic HTML, keyboard navigation, screen readers.

YepAPI/skills

Experiment setup, variant splitting, statistical significance, and feature flag integration.

YepAPI/skills

CRUD generators, data tables, user management, role-based access, and bulk operations.

YepAPI/skills

Monitor what ChatGPT and Gemini say about your brand using YepAPI.

YepAPI/skills

Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

YepAPI/skills

Commander.js, interactive prompts with Clack, spinners, colors, config files, exit codes, and npm publishing.

YepAPI/skills

cmdk integration, Cmd+K trigger, fuzzy search, grouped actions, keyboard navigation, and dynamic action registration.

YepAPI/skills

Content planning with trend and sentiment data from YepAPI.

YepAPI/skills

Content calendar, keyword-driven planning, and content briefs.

YepAPI/skills

Theme switching with CSS variables, system preference detection, next-themes, and persistence.

YepAPI/skills

Threaded comments, @mentions, reactions, moderation queue, optimistic UI, and cursor pagination.

YepAPI/skills

Competitive analysis between domains using YepAPI.

YepAPI/skills

Layout grids, KPI cards, data tables with sorting/filtering, sidebar navigation, and responsive breakpoints.

YepAPI/skills

Data encryption — TLS everywhere, AES-256-GCM for PII, bcrypt passwords, encrypted backups.

YepAPI/skills

Chart patterns with Recharts/Nivo/D3, responsive containers, color scales, and accessibility.

YepAPI/skills

Drizzle schema definition, push vs migrate, type-safe queries, relations, transactions, and prepared statements.

YepAPI/skills

Upload handling, resize/compress, CDN delivery, blur placeholders, and next/image patterns.

YepAPI/skills

Local business and Google Maps research using YepAPI.

YepAPI/skills

Cursor-based pagination, IntersectionObserver, virtualized lists with @tanstack/react-virtual, and scroll position restoration.

YepAPI/skills

Chat UI components, streaming responses with AI SDK, context window management, and RAG patterns.

相关技能