本文へスキップ
Skillpedia
デプロイとクラウド(DevOps)41k · #6675

bazel-build-optimization

できること

このスキルは、大規模なプロジェクトでBazelというビルドツールの動作を最適化するのに役立ちます。実運用で使われるパターンを教えてくれるので、プロジェクトのビルドをより速く、より確実に行えるようになります。

使う場面

  • ✓大規模プロジェクトで初めてBazelを設定するとき。
  • ✓Bazelにリモートのコンピュータを使わせて、ビルドを高速化したいとき。
  • ✓ビルドにかかる時間が長すぎる理由を調べたいとき。

スキルのリンク

https://github.com/wshobson/agents/blob/main/plugins/developer-essentials/skills/bazel-build-optimization/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/wshobson/agents/blob/main/plugins/developer-essentials/skills/bazel-build-optimization/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“大規模プロジェクトでビルドを速くするには、Bazelをどのように設定すればよいですか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

プロジェクトのファイルの整理方法やBazelの設定について、例とベストプラクティスを提供します。これにより、Bazelがコードをどのようにビルドすればよいかをより正しく理解でき、処理が効率化されます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Bazel Build Optimization

Production patterns for Bazel in large-scale monorepos.

When to Use This Skill

  • Setting up Bazel for monorepos
  • Configuring remote caching/execution
  • Optimizing build times
  • Writing custom Bazel rules
  • Debugging build issues
  • Migrating to Bazel

Core Concepts

1. Bazel Architecture

workspace/
├── WORKSPACE.bazel       # External dependencies
├── .bazelrc              # Build configurations
├── .bazelversion         # Bazel version
├── BUILD.bazel           # Root build file
├── apps/
│   └── web/
│       └── BUILD.bazel
├── libs/
│   └── utils/
│       └── BUILD.bazel
└── tools/
    └── bazel/
        └── rules/

2. Key Concepts

Concept Description
Target Buildable unit (library, binary, test)
Package Directory with BUILD file
Label Target identifier //path/to:target
Rule Defines how to build a target
Aspect Cross-cutting build behavior

Templates and detailed worked examples

Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.

Best Practices

Do's

  • Use fine-grained targets - Better caching
  • Pin dependencies - Reproducible builds
  • Enable remote caching - Share build artifacts
  • Use visibility wisely - Enforce architecture
  • Write BUILD files per directory - Standard convention

Don'ts

  • Don't use glob for deps - Explicit is better
  • Don't commit bazel-* dirs - Add to .gitignore
  • Don't skip WORKSPACE setup - Foundation of build
  • Don't ignore build warnings - Technical debt
よくある質問

Bazelとは何ですか?

Bazelは、特に大規模で複雑なソフトウェアプロジェクトをビルド(コードを実行可能なプログラムに変換)するのを助けるツールです。

「monorepo(モノレポ)」とは何ですか?

複数の異なるプロジェクトを、ひとつのコードリポジトリにまとめて管理する方式のことです。

「ビルドの最適化」とは何を意味しますか?

ソフトウェアのビルド処理をより速くし、使用するコンピュータの資源をより少なくすることを意味します。

詳細

作者による元の説明

Optimize Bazel builds for large-scale monorepos. Use when configuring Bazel, implementing remote execution, or optimizing build performance for enterprise codebases.

repo: wshobson/agents

人気

GitHubのスター
41k
ランキング
#6675
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル