You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/skills/tidb-issue-metadata-guard/SKILL.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,13 @@ description: Use when creating or editing TiDB GitHub issues so issue templates,
10
10
Use this skill for TiDB GitHub issue metadata updates.
11
11
The goal is to preserve issue-template structure, label hygiene, and searchable issue descriptions.
12
12
13
-
Before creating an issue, read the matching file under `.github/ISSUE_TEMPLATE/`.
13
+
Before creating or editing an issue, read the matching file under `.github/ISSUE_TEMPLATE/`.
14
14
15
15
## Workflow
16
16
17
17
1. Write issue titles and descriptions in English.
18
18
2. Search existing issues and PRs first when the task is bug reporting or tracking an existing change.
19
-
3.Start from the matching issue template instead of writing the body from scratch.
19
+
3.When creating a new issue, start from the matching issue template instead of writing the body from scratch.
20
20
- Follow the template and fill the required sections.
21
21
- For bug reports, include minimal reproduction, expected behavior, actual behavior, and TiDB version information when available.
22
22
- Fill issue fields with concrete values from the available artifacts instead of generic placeholders.
@@ -28,7 +28,13 @@ Before creating an issue, read the matching file under `.github/ISSUE_TEMPLATE/`
28
28
- When adding an analysis section, keep it short and evidence-backed:
29
29
- 1–3 likely causes at most
30
30
- prefer evidence from SQL shape, plans, errors, or result diffs
31
-
4. If you create an issue with `gh issue create`, add labels explicitly when the GitHub UI would normally auto-apply them.
31
+
4. When editing an existing issue, start from the current issue body instead of rewriting it from scratch.
32
+
- Fetch the current title, body, and labels first.
33
+
- Patch only the intended template sections and preserve untouched sections, metadata, and still-valid context.
34
+
- 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.
35
+
5. When applying labels, do it explicitly instead of assuming the UI or template will fill them in.
36
+
- For new issues created with `gh issue create`, add labels explicitly when the GitHub UI would normally auto-apply them.
37
+
- For existing issues, prefer `gh issue edit` so labels reflect the current state after the body update.
32
38
- Add at least one `component/*` label.
33
39
- For bug or regression issues, add `severity/*` and affected-version labels when appropriate.
34
40
- Severity labeling rule:
@@ -37,13 +43,15 @@ Before creating an issue, read the matching file under `.github/ISSUE_TEMPLATE/`
37
43
- Complex-query or compatibility issues that are not confirmed wrong-result and are not execution-blocking: use `severity/moderate`.
38
44
- If label permissions are missing, first add labels by commenting `/label <label name>`.
39
45
- If label comments still do not work, add a separate comment with `Suggested labels: ...`.
40
-
5. Prefer file-based edits for GitHub metadata.
46
+
6. Prefer file-based edits for GitHub metadata.
41
47
- Materialize the intended issue body in a local Markdown file.
42
-
- Review that file against the matching issue template before calling `gh`.
48
+
- For new issues, review that file against the matching issue template before calling `gh`.
49
+
- For existing issues, diff the patched body against the current issue body before calling `gh`.
43
50
44
51
## Quick Checks
45
52
46
53
- The issue title and body are in English.
47
54
- The issue still follows the matching template structure.
48
55
- Long raw artifacts are folded with `<details>` when needed, while the top-level summary remains visible.
56
+
- Existing issue edits preserve untouched sections and metadata outside the intended patch.
49
57
- The issue carries the expected labels, or a follow-up label comment / `Suggested labels: ...` comment is present when label permissions are missing.
0 commit comments