Agent skill

TiDB Issue Metadata Guard

by pingcap in pingcap/tidb

Keeps TiDB GitHub issues consistent by following the issue templates, writing reproducible reports, checking for duplicates and applying labels explicitly.

Apache-2.0Auto-check passedDevelopment

Install TiDB Issue Metadata Guard

skills CLI
$ npx skills add pingcap/tidb --skill tidb-issue-metadata-guard -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pingcap/tidb tidb-issue-metadata-guard --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pingcap/tidb.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/tidb-issue-metadata-guard .claude/skills/tidb-issue-metadata-guard && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tidb-issue-metadata-guard
GitHub stars
41k
Token cost
~1k tokens
SKILL.md length
548 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Keeps TiDB GitHub issues consistent by following the issue templates, writing reproducible reports, checking for duplicates and applying labels explicitly.

  • Works in 6 steps: Write issue titles and descriptions in… → Search existing issues and PRs first… → When creating a new issue, start from… → …
  • Filing a TiDB bug report from the issue template
  • SKILL.md covers Overview, Workflow and Quick Checks
  • Calls gh

What it does

Before creating or editing a TiDB issue, the agent reads the matching file under `.github/ISSUE_TEMPLATE/` and starts from it. It writes in English, searches existing issues and pull requests first for bug reports, and fills the template fields with concrete values. For bugs that means a minimal reproduction, expected and actual behavior, and TiDB version information when available.

The content rules keep the first screen readable: the repro summary, expected result, actual result and version stay visible, while long SQL, schemas, logs, execution plans and checksum diffs go into a collapsible details block. Any analysis is short, with at most three likely causes backed by evidence. When editing, the agent fetches the current title, body and labels and patches only the intended sections. Labels are applied explicitly with `gh issue create` or `gh issue edit`, including at least one `component/*` label. The excerpt is cut off after that rule.

When your agent uses it

  • Filing a TiDB bug report from the issue template
  • Editing an existing TiDB issue without losing its template sections
  • Choosing component labels and checking for duplicate issues before filing

Example prompts

  • “File a TiDB bug for this wrong query result, with the repro SQL and expected versus actual output.”
  • “Check whether this planner regression has already been reported before I open an issue.”
  • “Add the execution plan to our existing TiDB issue, collapsed, and leave the other sections alone.”

Requirements

  • The GitHub CLI (`gh`) for creating and editing issues
  • A checkout of the TiDB repository with `.github/ISSUE_TEMPLATE/`

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Write issue titles and descriptions in English.
  2. Search existing issues and PRs first when the task is bug reporting or tracking an existing change.
  3. When creating a new issue, start from the matching issue template instead of writing the body from scratch.
  4. When editing an existing issue, start from the current issue body instead of rewriting it from scratch.
  5. When applying labels, do it explicitly instead of assuming the UI or template will fill them in.
  6. Prefer file-based edits for GitHub metadata.

What it can do on your machine

Read from SKILL.md and the folder at commit e7178de. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

TiDB Issue Metadata Guard loads about 1k tokens when it runs. Until then it costs about 27 tokens; SKILL.md has 548 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~27
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pingcap/tidb at commit e7178de, republished under its Apache-2.0 licence (© pingcap). 548 words, ~1,000 tokens.

Download SKILL.mdSave it as .claude/skills/tidb-issue-metadata-guard/SKILL.md (or your agent's skills folder).
name
tidb-issue-metadata-guard
description
Create or edit TiDB issues, choose labels, or check for duplicates before filing.

TiDB Issue Metadata Guard

Overview

Use this skill for TiDB GitHub issue metadata updates. The goal is to preserve issue-template structure, label hygiene, and searchable issue descriptions.

Before creating or editing an issue, read the matching file under .github/ISSUE_TEMPLATE/.

Workflow

  1. Write issue titles and descriptions in English.
  2. Search existing issues and PRs first when the task is bug reporting or tracking an existing change.
  3. When creating a new issue, start from the matching issue template instead of writing the body from scratch.
    • Follow the template and fill the required sections.
    • For bug reports, include minimal reproduction, expected behavior, actual behavior, and TiDB version information when available.
    • Fill issue fields with concrete values from the available artifacts instead of generic placeholders.
    • Keep the first screen readable: show the top-level repro summary, expected result, actual result, and version directly in the section body.
    • If a field is long, keep a short visible summary and put the full content in a <details> block.
      • Good candidates: full repro SQL, full schema, long logs, checksum diffs, execution plans, and plan replayer notes.
      • Do not hide the only reproduction steps or the top-level expected/actual conclusion inside <details>.
    • If supporting artifacts exist, mention them explicitly in the repro steps or attachments summary.
    • When adding an analysis section, keep it short and evidence-backed:
      • 1–3 likely causes at most
      • prefer evidence from SQL shape, plans, errors, or result diffs
  4. When editing an existing issue, start from the current issue body instead of rewriting it from scratch.
    • Fetch the current title, body, and labels first.
    • Patch only the intended template sections and preserve untouched sections, metadata, and still-valid context.
    • Re-apply the same content rules used for new issues: concrete values, visible top-level summary, <details> for long raw artifacts, and short evidence-backed analysis when needed.
  5. When applying labels, do it explicitly instead of assuming the UI or template will fill them in.
    • For new issues created with gh issue create, add labels explicitly when the GitHub UI would normally auto-apply them.
    • For existing issues, prefer gh issue edit so labels reflect the current state after the body update.
    • Add at least one component/* label.
    • For bug or regression issues, add severity/* and affected-version labels when appropriate.
    • Severity labeling rule:
      • Wrong-result bugs: use severity/major.
      • Query fails to execute on valid SQL, for example an internal planner or runtime error: use severity/major.
      • Complex-query or compatibility issues that are not confirmed wrong-result and are not execution-blocking: use severity/moderate.
    • If label permissions are missing, first add labels by commenting /label <label name>.
    • If label comments still do not work, add a separate comment with Suggested labels: ....
  6. Prefer file-based edits for GitHub metadata.
    • Materialize the intended issue body in a local Markdown file.
    • For new issues, review that file against the matching issue template before calling gh.
    • For existing issues, diff the patched body against the current issue body before calling gh.
Show full SKILL.md (66 more words)Show less

Quick Checks

  • The issue title and body are in English.
  • The issue still follows the matching template structure.
  • Long raw artifacts are folded with <details> when needed, while the top-level summary remains visible.
  • Existing issue edits preserve untouched sections and metadata outside the intended patch.
  • The issue carries the expected labels, or a follow-up label comment / Suggested labels: ... comment is present when label permissions are missing.

© pingcap, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/tidb-issue-metadata-guard of pingcap/tidb.

Open the folder on GitHubat commit e7178de

Compare with similar skills

TiDB Issue Metadata Guard next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

TiDB Issue Metadata Guard compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
TiDB Issue Metadata Guard this skillpingcap/tidb41k—~1kAutomated safety check: PassApache-2.0
Pre-Release PR Triagejamiepine/voicebox57k—~3.1kAutomated safety check: PassMIT
WinAppSDK Triage Meeting Prepmicrosoft/WindowsAppSDK4.7k—~2.8kAutomated safety check: PassApache-2.0
Ouroboros Maintainer TriageQ00/ouroboros6.2k—~1.7kAutomated safety check: PassMIT
RTK Issue Triagertk-ai/rtk83k—~3kAutomated safety check: NotesApache-2.0
Verdaccio Issue Triageverdaccio/verdaccio18k—~2.4kAutomated safety check: PassMIT

Similar skills

  • Pre-Release PR Triage

    jamiepine/voicebox

    Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.

    57k GitHub stars~3.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • WinAppSDK Triage Meeting Prep

    microsoft/WindowsAppSDK

    Official

    Prepares the triage meeting summary for WinAppSDK Needs-Triage issues, with research-backed area suggestions, draft replies and a diff since the last triage.

    4.7k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Triages and works through GitHub issues and pull requests in the Q00/ouroboros repo as a maintainer, within a stated review boundary and clear limits on what it may change.

    6.2k GitHub stars~1.7k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Audits open GitHub issues, categorizes them, flags duplicates and linked PRs in three phases, with optional deep analysis and comments posted only after validation.

    83k GitHub stars~3k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Verdaccio Issue Triage

    verdaccio/verdaccio

    Triages an incoming verdaccio/verdaccio issue against the code, the affected release line and related issues, and picks labels from the repository's existing taxonomy.

    18k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Issue Triage Loop

    cobusgreyling/loop-engineering

    Scans open GitHub issues and discussions, flags duplicates, scores priority and proposes labels into issue-triage-state.md without ever labeling or closing.

    11k GitHub stars~522 tokensUpdated today
    DevelopmentAuto-check passed

More from pingcap/tidb

All 9 skills in this repo
  • Decides from local git changes whether make bazel_prepare must run in TiDB before build or test commands, and reports the evidence for the decision.

    41k GitHub stars~408 tokensUpdated today
    Auto-check passed
  • Investigates TiDB plan or test-result diffs that the change does not explain, ruling out failpoint setup and merge effects before expected outputs are updated.

    41k GitHub stars~498 tokensUpdated today
    Auto-check passed
  • Use when running TiDB package tests and deciding whether failpoint enable/disable is required before and after the test command.

    41k GitHub stars~256 tokensUpdated today
    Auto-check passed
  • Use when recording TiDB integration tests under tests/integrationtest and verifying regenerated result files stay minimal and correct.

    41k GitHub stars~260 tokensUpdated today
    Auto-check passed
  • Use when running tests under tests/realtikvtest that require a local TiUP playground lifecycle with strict startup, readiness checks, and cleanup.

    41k GitHub stars~250 tokensUpdated today
    Auto-check passed
  • Checks a fix proposed by a user or reviewer for intent, correctness and compatibility before the agent implements it in the TiDB codebase.

    41k GitHub stars~523 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about TiDB Issue Metadata Guard

What does TiDB Issue Metadata Guard do?

Keeps TiDB GitHub issues consistent by following the issue templates, writing reproducible reports, checking for duplicates and applying labels explicitly. github/ISSUE_TEMPLATE/` and starts from it. It writes in English, searches existing issues and pull requests first for bug reports, and fills the template fields with concrete values.

When should I use TiDB Issue Metadata Guard?

TiDB Issue Metadata Guard fits situations like: filing a TiDB bug report from the issue template; editing an existing TiDB issue without losing its template sections; choosing component labels and checking for duplicate issues before filing.

How do I install TiDB Issue Metadata Guard in Claude Code?

Run `npx skills add pingcap/tidb --skill tidb-issue-metadata-guard -a claude-code`. Or copy the skill folder (.agents/skills/tidb-issue-metadata-guard in pingcap/tidb) into .claude/skills/tidb-issue-metadata-guard in your project. Claude Code loads it when a task matches its description.

How do I install TiDB Issue Metadata Guard in Codex?

Run `npx skills add pingcap/tidb --skill tidb-issue-metadata-guard -a codex`. Or copy the skill folder (.agents/skills/tidb-issue-metadata-guard in pingcap/tidb) into .agents/skills/tidb-issue-metadata-guard in your project. Codex loads it when a task matches its description.

Can I use TiDB Issue Metadata Guard in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pingcap/tidb --skill tidb-issue-metadata-guard -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tidb-issue-metadata-guard, .gemini/skills/tidb-issue-metadata-guard, .github/skills/tidb-issue-metadata-guard and .opencode/skills/tidb-issue-metadata-guard in your project.

What does TiDB Issue Metadata Guard need to run?

Going by SKILL.md and its folder, TiDB Issue Metadata Guard needs the command-line tools its instructions call (gh). Our summary lists: The GitHub CLI (`gh`) for creating and editing issues; A checkout of the TiDB repository with `.github/ISSUE_TEMPLATE/`.

Does TiDB Issue Metadata Guard access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is TiDB Issue Metadata Guard safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does TiDB Issue Metadata Guard use?

TiDB Issue Metadata Guard is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does TiDB Issue Metadata Guard use?

About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to TiDB Issue Metadata Guard?

Skills that share tags, products or a category with TiDB Issue Metadata Guard: Pre-Release PR Triage (jamiepine/voicebox, 57k stars), WinAppSDK Triage Meeting Prep (microsoft/WindowsAppSDK, 4.7k stars), Ouroboros Maintainer Triage (Q00/ouroboros, 6.2k stars) and RTK Issue Triage (rtk-ai/rtk, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains TiDB Issue Metadata Guard?

pingcap (a GitHub organization) maintains it in pingcap/tidb, which has 40,633 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 9, 2026.

Source: pingcap/tidb on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.