一键导入
monorepo-check
Run comprehensive checks across the entire monorepo. Use before creating PRs or after making cross-package changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run comprehensive checks across the entire monorepo. Use before creating PRs or after making cross-package changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate CRUD API endpoints following OpenOrder patterns (Fastify, Prisma, Zod, RBAC)
Scaffold new POS or payment adapter implementations. Use when adding support for Square, Toast, Clover, Stripe, or other integrations.
Create conventional commits following OpenOrder standards with AGPL co-authoring
Initialize Docker development environment with database migrations. Use for first-time setup or after pulling major changes.
Create and validate Prisma database migrations. Use after schema.prisma changes or when adding new database features.
Audit codebase for security vulnerabilities, secret leakage, dependency risks, and configuration issues. Use before commits, when adding dependencies, or reviewing PRs. Enforces zero-secrets policy, dependency isolation, and secure build practices.
| name | monorepo-check |
| description | Run comprehensive checks across the entire monorepo. Use before creating PRs or after making cross-package changes. |
| disable-model-invocation | false |
| allowed-tools | Bash(npm run*), Bash(cd apps/*), Bash(cd packages/*) |
This skill runs comprehensive checks across the entire Turborepo monorepo.
Verify Clean State
git status
Type Checking
npm run type-check
What it does:
If it fails:
cd apps/api && npx prisma generatecd packages/shared-types && npm run buildnpm install from rootLinting
npm run lint
What it does:
If it fails:
npm run lint:fixTesting
npm test
What it does:
If it fails:
npm test -- --reporter=verbose for detailsBuild Validation (Optional)
npm run build
What it does:
If it fails:
Report Results
Success Output:
✅ Monorepo Check Complete
Type Checking: ✅ Passed (8 packages)
Linting: ✅ Passed (0 errors, 2 warnings)
Testing: ✅ Passed (142 tests, 0 failed)
All checks passed! Safe to create PR.
Failure Output:
❌ Monorepo Check Failed
Type Checking: ✅ Passed
Linting: ❌ Failed
Testing: ⏭️ Skipped (linting must pass first)
Errors in apps/dashboard/src/components/OrderList.tsx:
Line 42: 'order' is assigned a value but never used
Line 58: Missing dependency 'fetchOrders' in useEffect
Fix with: npm run lint:fix
Or manually resolve the issues above.
Error: Cannot find module '@openorder/shared-types'
# Fix: Rebuild shared types
cd packages/shared-types && npm run build
npm install
Error: Property 'X' does not exist on type 'Y'
cd apps/api && npx prisma generateError: 'React' must be in scope when using JSX
import React from 'react' (React 17-)Error: Unexpected any
any with proper typeunknown if type is truly unknownError: Cannot connect to database
# Start Docker services
docker compose -f docker/docker-compose.yml up -d postgres redis
# Wait for readiness
sleep 5
# Retry tests
npm test
Error: Timeout exceeded
it('test', async () => { ... }, 10000)If you modified package.json in any package:
# Reinstall from root
npm install
# Verify workspace links
npm list --depth=0
If you modified packages/shared-types/src/:
# Rebuild shared types
cd packages/shared-types && npm run build
# Rebuild dependent packages
cd ../../apps/storefront && npm run build
cd ../dashboard && npm run build
If you modified apps/api/prisma/schema.prisma:
# Regenerate Prisma Client
cd apps/api && npx prisma generate
# Rebuild packages that import Prisma types
cd ../../packages/shared-types && npm run build
Turbo Cache: Turborepo caches build outputs. If builds seem stale:
# Clear cache
npx turbo clean
# Rebuild everything
npm run build
Parallel Execution:
Turbo runs tasks in parallel when possible. Check pipeline in turbo.json:
{
"tasks": {
"build": {
"dependsOn": ["^build"], // Depends on dependencies building first
"outputs": ["dist/**", ".next/**"]
}
}
}
Before creating a pull request:
This skill mirrors what GitHub Actions will run:
.github/workflows/test.yml:
- run: npm install --frozen-lockfile
- run: npm run type-check
- run: npm run lint
- run: npm test
- run: npm run build
Running locally ensures CI will pass.
Phantom Dependencies: If a package works locally but fails in CI:
package.json has all required dependenciespnpm to prevent hoisting (stricter than npm)Circular Dependencies: If builds hang or fail mysteriously:
# Check for circular imports
npx madge --circular --extensions ts,tsx apps/api/src
Version Mismatches: If types don't match across packages:
# Ensure consistent versions
npm list react
npm list typescript
Fix by aligning versions in root package.json.
After pulling changes:
npm install
npm run type-check
After modifying shared code:
npx turbo clean
npm run build
Before creating PR:
npm run type-check && npm run lint && npm test