From a7ba8d9c6a7c9d2ad24d9ca9b1885505238cf969 Mon Sep 17 00:00:00 2001 From: qiancai Date: Tue, 26 May 2026 18:14:21 +0800 Subject: [PATCH 1/6] Create SKILL.md --- .ai/skills/write-update-tidb-docs/SKILL.md | 310 +++++++++++++++++++++ 1 file changed, 310 insertions(+) create mode 100644 .ai/skills/write-update-tidb-docs/SKILL.md diff --git a/.ai/skills/write-update-tidb-docs/SKILL.md b/.ai/skills/write-update-tidb-docs/SKILL.md new file mode 100644 index 0000000000000..e11f75bd83ba7 --- /dev/null +++ b/.ai/skills/write-update-tidb-docs/SKILL.md @@ -0,0 +1,310 @@ +--- +name: write-update-tidb-docs +description: Write new TiDB documentation or update existing TiDB documentation from code changes, engineering notes, PRs, issues, design docs, rough drafts, existing docs, or short feature descriptions. Use when R&D engineers need user-facing docs in pingcap/docs or pingcap/docs-cn. +--- + +# Write or Update TiDB Docs + +Use this skill to turn engineering context into user-facing TiDB documentation +in `pingcap/docs` or `pingcap/docs-cn`. Inputs can be code diffs, PRs, issues, +design notes, release notes, rough Markdown, existing docs, or a few sentences +from an R&D engineer. + +## Defaults + +- Inspect first, confirm when uncertain, then edit. +- Prefer updating existing docs. Write a new page only when the change introduces + a distinct user task, feature, reference area, integration, or troubleshooting + workflow that does not fit cleanly in an existing page. +- Documentation must justify its maintenance cost. Not every code change needs a + doc update. +- If the user asks about local changes without naming files, run `git status -u`. + If there are no uncommitted changes and the user clearly wants the latest local + change, inspect `git show --name-status` and targeted diffs. +- For broad changes, group work by documentation area, such as guides, reference + docs, release notes, examples, overview pages, and TOC updates. Use subagents + or parallel analysis when available, but review the final result holistically. +- For substantial new docs or vague inputs, switch to co-authoring mode: gather + context, agree on structure, draft section by section, and test whether the doc + answers likely reader questions. + +## Load context progressively + +Always read: + +- `.ai/shared/repo-conventions.md` +- `.ai/shared/writing-style.md` + +Read only when relevant: + +- `.ai/shared/translation-rules.md` and `.ai/shared/translation-terms.md` when + the target is `docs-cn`, or the task involves English-to-Chinese translation + or Chinese documentation updates. +- `resources/doc-templates/