Skip to content
Back to skills

Tidb Bazel Prepare Gate

ASecurity

Use when deciding whether make bazel_prepare is required before build or test commands based on local file changes in TiDB.

  • 40,615 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 1, 2026
databasesgobashtestinggit

Security analysis

A100/100

Scanned September 1, 2026

npx -y skills add pingcap/tidb --skill tidb-bazel-prepare-gate --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tidb Bazel Prepare Gate?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tidb Bazel Prepare Gate
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pingcap-tidb-bazel-prepare-gate/badge)](https://www.skillsdirectory.com/skills/pingcap-tidb-bazel-prepare-gate)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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:

```bash
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:

```diff
+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:

```diff
+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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.