單倉儲(monorepo)建置若無適當快取會變得緩慢且沒有效率。此技能提供生產就緒的 Turborepo 設定,適用於本地和遠端快取,大幅減少建置時間。
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「turborepo-caching」。 建立一個 turbo.json,包含快取 dist 和 .next 輸出的建置管線
預期結果:
完整的 turbo.json,包含建置任務設定,含 outputs、dependencies 和環境變數
正在使用「turborepo-caching」。 我如何使用 Vercel 設定遠端快取?
預期結果:
執行 npx turbo login、npx turbo link 以及在 CI 中設定 TURBO_TOKEN 的逐步說明
安全審計
安全All 47 static findings are false positives. The skill contains Turborepo documentation and configuration templates with CLI command examples. The flagged patterns (external commands, network URLs, filesystem operations) are legitimate documentation showing Turborepo usage patterns, not actual code execution risks. No malicious intent or security vulnerabilities confirmed.
品質評分
你能建構什麼
Turborepo 初始設定
從第一天開始就為新單倉儲設定最佳化快取
CI/CD 效能優化
透過遠端快取和受影響套件篩選,將 CI 建置時間減少 50-90%
自託管快取基礎設施
為無 Vercel 的組織部署私有快取伺服器
試試這些提示
建立一個包含 build、test、lint 和 dev 任務的 turbo.json 設定。包含適當的 outputs 和 dependencies。
展示如何為我的 Turborepo 專案設定 Vercel 遠端快取,包含 CI 的環境變數。
建立一個 GitHub Actions 工作流程,僅使用 turbo 篩選建置目前變更所影響的套件。
建立一個 Express.js 伺服器實作,用於具有成品儲存的自託管 Turborepo 遠端快取。
最佳實務
- 始終明確定義 outputs 以避免快取不必要的檔案
- 在 CI 中使用遠端快取以在所有開發者之間共用建置結果
- 正確設定 dependsOn 以防止任務之間的競態條件
避免
- 不要快取持續性任務如開發伺服器(請改用 persistent: true)
- 不要在 turbo 快取的環境變數中包含機密資訊
- 不要跳過 dependsOn,因為這可能導致相依套件建置失敗