Tidb Bazel Prepare Gate tidb-bazel-prepare-gate
Use when deciding whether make bazel_prepare is required before build or test commands based on local file changes in TiDB.
- Our test
- 5/10
- tested Dec 6, 2026
- GitHub stars
- 41k
- pingcap/tidb
- Added by
- 0
- members
- Updated
- Dec 6
- commit 86e528b
- Content
- 1 file
- no scripts · 2 KB
- License
- Apache 2.0
- free to use
What our test found
The skill gives useful change-inspection steps and some triggers, but its core decision depends on an external policy that is not provided.
Limits spotted
- The referenced AGENTS.md decision rules are essential but not included.
- The listed commands inspect tracked diffs and untracked files, but the skill does not explain how to assess every possible change type.
- It assumes the user is working in the TiDB repository and has Git and Make available.
name: tidb-bazel-prepare-gate description: Use when deciding whether make bazel_prepare is required before build or test commands based on local file changes in TiDB.
TiDB Bazel Prepare Gate
Overview
Use this skill before build/test commands when you are unsure whether make bazel_prepare is required. Policy source: AGENTS.md -> Build Flow -> When make bazel_prepare is required. In normal coding loops, skip this skill unless one of the decision-rule triggers is likely present.
Inspect Local Changes
Run from repository root:
git status --short
git diff --name-status
git diff --name-status --cached
git ls-files --others --exclude-standard
git diff -U0 -- '*.go'
git diff -U0 --cached -- '*.go'Decision Rules
Trigger conditions are defined in AGENTS.md -> Build Flow -> When make bazel_prepare is required. Compare the output from the commands above against those conditions.
For the top-level test-function trigger in existing *_test.go files, inspect added lines in git diff -U0 -- '*.go' and git diff -U0 --cached -- '*.go' output for patterns like:
+func TestXxx(t *testing.T) {and treat that as requiring make bazel_prepare.
For import-section changes in existing Go files, inspect git diff -U0 -- '*.go' and git diff -U0 --cached -- '*.go' for added/removed import lines, for example:
+import (
-import "fmt"
+ "context"and treat those changes as requiring make bazel_prepare.
If any condition matches, run make bazel_prepare. If none of the rules match, continue without make bazel_prepare and report the evidence.