commit
免费Stage relevant files and create a well-formed git commit for the docs-builder repo. Use this when the user asks to commit changes, save work, or create a commit.
中文简介正在准备中。当前显示原文说明。
Create a GitHub pull request for the current branch with a focused why/what body and exactly one release-drafter label. Use when the user asks to open a PR, create a pull request, or ship a branch.
中文简介正在准备中。当前显示原文说明。
实测评分 未实测
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Read .claude/skills/writing-style.md and .claude/skills/surfaces.md before writing anything.
Creates a GitHub PR body that a newcomer can orient from in under a minute: front-loaded outcome, grounded Why, behaviour-led What, verifiable by the reviewer.
git status
git log main..HEAD --oneline
git diff main...HEAD --stat
If the working tree has changes that belong in this PR, read and follow commit first. Do not commit inline. Do not skip hooks.
git push -u origin HEAD
[bug] / [feature] / [chore] prefixes — the label carries the typeRequired structure:
<One or two sentences, no heading. What this changes and the effect.
A newcomer reads only this and knows whether the PR concerns them.>
**Affects:** <one to three surfaces from surfaces.md, most affected first>
**Prompt summary:** <One paragraph, two to three sentences. What the author was asked
to do in their own framing — the goal behind the branch, not the diff. Present tense,
active voice. This is the ask; ## Why is the problem in the code. They are not
interchangeable and neither restates the other. Omit only when the branch has no
originating ask.>
## Why
<Two to four sentences. The concrete failure or gap. Active voice, present tense
for current behaviour. Do not open with the history of a prior PR.>
## What
#### <Conceptual label — not a filename>
<Prose paragraph. Group by what changed conceptually, not by which files moved.
Lead with behaviour. Name a symbol only when the reviewer needs it to find the code.
Two to four sentences. Three to five sections total.>
## Verify
<How a reviewer confirms this locally. Use real commands they would run:
`./build.sh`, `dotnet test`, `npm run test`, `dotnet run --project …`.
If there is no clear local verification step, omit this section entirely.
Do not list CI checks, YAML linting, or bash scripts an agent would run
to prove their own work — those are not reviewer steps.>
## Check on the preview
<Only when the change shows on a built page. One bullet per page on this PR's preview,
`https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/<PR number>/<path>`:
the link, a dash, then the one thing to look at there. Pick pages that each show a
different behaviour of the change, and one control page the change must leave alone.
The preview does not exist yet when the PR is created, so the links cannot be opened
then. Take each <path> from the page's own address instead: a Markdown page's docset
path, or `api/doc/<api>/operation/operation-<operation id>` for an API operation.
A local build (`.artifacts/docs/html/<path>/index.html`) confirms a path when one is
already at hand; do not build the site only for this. The preview serves the paths
once its workflow finishes. Omit when nothing renders differently.>
A Check on the preview entry reads like this:
- [Cloud Connect: Get subscription](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/4446/api/doc/cloud-connect/operation/operation-getsubscription) — path filled from the spec example, `Authorization: ApiKey ${API_KEY}`, no Console card.
- [Elasticsearch: Delete async search](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/4446/api/doc/elasticsearch/operation/operation-async-search-delete) — control page: spec-written samples, unchanged.
Conditional add-ons — each is one or two sentences with a bold lead-in, no heading:
breaking label.CLAUDE.md's "Boundaries: never touch / human-gated" list, or leaves state that a code revert will not undo.3 of 5, on top of #3855. A bare Stack: 3/5 with no links is not enough.Do not include bullet lists of changed files. Do not summarize what the diff already states plainly.
.github/workflows/required-labels.yml enforces exactly one release-drafter label at mode: exactly, count: 1 — two labels or zero fails CI. Pick the single best fit.
| Label | Use when |
|---|---|
breaking | An existing config, invocation, or documented behaviour stops working |
feature | A capability that did not exist before |
enhancement | An existing capability got better |
bug | A defect in existing behaviour is fixed |
documentation | Docs-only change (docs/ pages, not incidental doc updates in the same PR) |
chore | Cleanup, refactor, internal restructure — no user-visible change |
dependencies | Dependency version bumps |
automation | CI/CD, GitHub Actions, build tooling |
redesign | Frontend visual or structural redesign |
changelog:skip | Nothing worth a changelog line |
Never use fix (use bug) or ci (use automation) — both are release-drafter aliases that split the same changelog category.
feature vs enhancement: feature = didn't exist; enhancement = existed but got better.
breaking guidance: use it when an older docs-builder invocation or an existing repo config stops working. The canonical trigger is Configuration in the **Affects:** line plus a rename or removal — #3856 removed output: from changelog.yml profiles and shipped as feature; it should have been breaking. Internal C# type renames and private method signature changes are not breaking.
gh pr view --json number,url,state,baseRefName --jq '{number,url,state,baseRefName}' 2>/dev/null
Check state before doing anything. If state is "MERGED" or "CLOSED", the branch already landed; treat it as no PR and proceed to step 8 to create a new one. Never edit a merged or closed PR.
If state is "OPEN" — update it.
Rebuild the body from the cumulative diff against the PR's own base branch (not a hardcoded main):
git diff origin/<baseRefName>...HEAD --stat
git diff origin/<baseRefName>...HEAD
Write the description of the current diff against the base — never a log of the commits on the branch and never an "update" or "addendum" appended to the old body. Any section of the old body that no longer matches the diff is wrong, not history. Replace it.
**Prompt summary:** verbatim unless the ask itself changed; extend it rather than replace it when scope was added.**Affects:** and the label — added commits can shift a chore to a bug, or bring in a new surface.gh pr edit --title "<title>" --body "$(cat <<'EOF'
<new body>
EOF
)"
Add or remove the label only if it changed:
gh pr edit --add-label "<new-label>" --remove-label "<old-label>"
If no PR exists — create it. Proceed to step 8.
One call — title, label, and body together. When the change renders differently, one gh pr edit follows right away to add Check on the preview: the section needs the PR number, which exists only after creation, so read it from the URL gh pr create prints and build the links from it. Do not wait for the preview workflow and do not build the site for this; the paths come from the pages' own addresses, and the preview serves them once it has run.
gh pr create --title "<title>" --label "<label>" --body "$(cat <<'EOF'
<lead sentence(s)>
**Affects:** <surfaces>
## Why
...
## What
- ...
- ...
- ...
## Verify
```bash
<command>
EOF )"
### 9. Return the PR URL
Always print the URL so the user can open it directly.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Stage relevant files and create a well-formed git commit for the docs-builder repo. Use this when the user asks to commit changes, save work, or create a commit.
中文简介正在准备中。当前显示原文说明。
Registers a feature flag as additive-only and verifies the flag-off path still matches the previous default. Use whenever adding or extending a feature flag, editing FeatureFlags.cs, changing feature_flags in assembler.yml, gating a code path behind a FEATURE_* environment variable, or enabling a flag in an environment. Do not skip this skill for flag work even if the user does not name it.
中文简介正在准备中。当前显示原文说明。
File a well-formed bug report or feature request. Use when the user asks to open an issue, report a bug, or request a feature in the docs-builder repo.
中文简介正在准备中。当前显示原文说明。
Auto-fix all formatting issues in the docs-builder repo — runs dotnet format for C# and npm fmt:write for TypeScript/JS. Use when the user asks to fix formatting, lint the code, or when a pre-commit hook fails due to formatting.
中文简介正在准备中。当前显示原文说明。
Search, analyze, and author Elastic documentation using the remote MCP server. Use this when the user asks about Elastic product documentation, features, or APIs; wants to find, read, or verify existing docs pages; is writing or editing documentation; mentions cross-links between repos; asks about documentation structure, coherence, or consistency; wants to generate templates following Elastic content type guidelines; or references elastic.co/docs URLs or Elastic product names.
中文简介正在准备中。当前显示原文说明。
Review changed or staged C# code against the docs-builder coding standards and flag violations. Use when the user asks to review code style, check for standards violations, or audit a diff before committing.
中文简介正在准备中。当前显示原文说明。