Skip to content

Commit fe00aea

Browse files
authored
chore: add repository maintenance skills (#9915)
1 parent ffa75af commit fe00aea

8 files changed

Lines changed: 167 additions & 1 deletion

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: changelog-collect
3+
description: Collect and draft NG-ZORRO changelog entries between releases or branches. Use when asked to compare release ranges, collect PR changes, or prepare changelog content before release staging.
4+
---
5+
6+
# NG-ZORRO Changelog Collection
7+
8+
Use this skill to analyze a release range and prepare a reviewable changelog draft. Use `version-release` for version bumps, release branches, Azure publishing, and writing the final release files.
9+
10+
Establish the range from the requested tags or branches. Inspect the commits in that range and associated pull requests when available; use the complete branch delta, not commit subjects alone. Compare changed public APIs, documentation, and user-visible behavior when a commit message is ambiguous.
11+
12+
Draft entries in the existing root [`CHANGELOG.md`](../../../CHANGELOG.md) style:
13+
14+
- group public changes under the conventional generated headings such as Features, Bug Fixes, Performance Improvements, and Breaking Changes;
15+
- keep component scopes and API identifiers accurate;
16+
- describe the effect on library users rather than the implementation; and
17+
- retain issue or PR references when they identify the public change.
18+
19+
Exclude pure formatting, CI, routine tooling, internal refactors, and tests unless they change the distributed package, public API, documented behavior, accessibility, or performance in a user-relevant way. Treat dependency updates case by case: retain them only when their externally visible consequence is known.
20+
21+
Call out breaking changes, deprecations, and migration requirements explicitly. Present the range, draft entries, excluded changes, and unresolved items for review before editing changelog files. Do not change versions or stage a release as part of collection.

.agents/skills/commit-msg/SKILL.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: commit-msg
3+
description: Generate a conventional commit message for staged NG-ZORRO changes. Use when asked for a commit message, a git commit title, or a summary of staged changes.
4+
---
5+
6+
# NG-ZORRO Commit Message
7+
8+
Generate a commit message from the change that will actually be committed. Inspect `git status --short`, `git diff --cached --stat`, `git diff --cached`, and recent commit subjects before drafting it. If nothing is staged, say so; include unstaged changes only when the user asks.
9+
10+
Follow `commitlint.config.js` and `CONTRIBUTING.md` as the authoritative format:
11+
12+
- use `type(scope): subject`, with an optional scope;
13+
- choose one of `build`, `chore`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `release`, `revert`, `style`, or `test`;
14+
- use `module:<component>` for a component scope, or one of `showcase`, `release`, `packaging`, `changelog`, and `schematics` where applicable;
15+
- write an imperative, lower-case subject without ending punctuation, keeping each line within 100 characters; and
16+
- add a body or footer only when the user asks, the change needs motivation, or it carries a breaking-change or issue-closing reference.
17+
18+
Summarize the common intent of the entire staged set rather than listing files or copying the last commit. If the staged set has unrelated changes, point out the split before recommending a deliberately broad subject.
19+
20+
Return only the proposed subject by default. Explain the choice only when requested.

.agents/skills/create-pr/SKILL.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: create-pr
3+
description: Prepare or create an NG-ZORRO pull request using the repository template. Use when asked to open, draft, summarize, or create a PR for branch changes.
4+
---
5+
6+
# NG-ZORRO Pull Request
7+
8+
Prepare a PR from the whole branch delta, not only the working tree or most recent commit. Inspect the current branch, remotes, its probable base, `git log <base>..HEAD`, and `git diff <base>...HEAD`. Use a user-specified base when present; otherwise infer it from repository state and flag uncertainty. `master` is the normal contribution target, while release and maintenance PRs must follow the project release workflow.
9+
10+
## Target repository
11+
12+
Open contribution PRs against `NG-ZORRO/ng-zorro-antd`; use `master` unless the user specifies another target. Resolve the PR destination independently of local remote names, which are not part of the workflow contract. Compare against the target repository's base branch, inspect that repository for an existing matching PR, and identify the owner and branch for the cross-repository head.
13+
14+
When presenting a PR proposal, state the target repository and base branch alongside the head in `<owner>:<branch>` form. After confirmation, re-check all three values before pushing and creating the PR.
15+
16+
Read and fill [`.github/PULL_REQUEST_TEMPLATE.md`](../../../.github/PULL_REQUEST_TEMPLATE.md) rather than inventing a body structure. Preserve its sections, remove instructional comments, and check only items supported by the branch contents and validation actually performed.
17+
18+
Draft:
19+
20+
- an English title that summarizes the branch's principal user-visible change and follows the repository's commit-message convention;
21+
- the PR type matching the main outcome;
22+
- current and new behavior, including the linked issue when known;
23+
- an accurate breaking-change decision and migration information when applicable; and
24+
- other information that helps review, such as focused validation or screenshots for visible changes.
25+
26+
Treat site-only, documentation-only, test-only, CI, and internal maintenance changes as such; do not manufacture user-facing behavior or release notes for them. For a release PR, defer to `version-release`.
27+
28+
Present the proposed target repository, base branch, head, title, body, and any assumptions for user confirmation before pushing a branch or calling `gh pr create`. Then create the PR only with the confirmed content.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: feature-sync
3+
description: Sync an Ant Design React component or feature into NG-ZORRO. Use when checking or porting upstream APIs, behavior, styles, demos, documentation, or tests.
4+
---
5+
6+
# Ant Design React Sync
7+
8+
Turn upstream functionality into an Angular implementation that fits NG-ZORRO's public API and maintenance model. Follow the repository's `AGENTS.md` first; it is the source of truth for the current Angular coding standards and global quality requirements.
9+
10+
## Establish the Upstream Contract
11+
12+
Inspect official upstream source and documentation before changing code. Read demos, tests, and changelog entries when they clarify the requested scope.
13+
14+
Establish:
15+
16+
- the public API, defaults, input boundaries, and deprecations;
17+
- user-observable behavior, including interaction states, keyboard behavior, semantics, and animation;
18+
- styling, theme tokens, and composition model; and
19+
- the upstream version that introduced the target capability.
20+
21+
Use source and documentation as the contract. Changelog entries provide version and historical context, not a substitute for either. Distinguish an upstream capability that has not yet been ported from behavior that currently diverges from upstream.
22+
23+
## Map to Angular
24+
25+
Do not translate React source line by line. Preserve the public semantics while choosing the smallest, clearest Angular boundary.
26+
27+
Decide deliberately:
28+
29+
- how React props, callbacks, children, refs, and context map to Angular public APIs and composition;
30+
- whether the capability belongs in a component, directive, service, or existing extension point;
31+
- whether it needs browser-only DOM access, layout measurement, or side effects, and how it remains compatible with SSR and render timing; and
32+
- whether Angular CDK or an existing NG-ZORRO public utility already solves the problem.
33+
34+
Translate upstream CSS-in-JS styling into the repository's Less theme variables and mixins. Keep theme defaults in Less; use ordinary inline styles only for public inputs whose values are genuinely runtime-dependent. Introduce CSS custom properties only when an existing integration specifically requires runtime inheritance or consumer customization.
35+
36+
When framework differences prevent a one-to-one mapping, choose an Angular API consistent with established repository patterns and document intentional differences.
37+
38+
## Integrate
39+
40+
Study comparable components before deciding the necessary integration points. Update public exports, styles, demos, documentation, tests, and site-generation inputs only when the feature requires them.
41+
42+
Treat generated artifacts according to the repository's tracking policy. Change the source of a generation pipeline instead of editing its output directly.
43+
44+
## Verify
45+
46+
Verify the upstream contract that was ported, not only implementation details.
47+
48+
1. Start with focused tests for defaults, critical states, and boundary inputs.
49+
2. Run the repository checks, builds, and documentation generation appropriate to the changed surface.
50+
3. Inspect generated output when the work affects presentation, interaction, or documentation.
51+
4. Use `git diff --check` to catch whitespace and patch errors.
52+
53+
## Deliver
54+
55+
State the upstream scope that was synchronized, intentional framework differences, and the validation performed. Stage, commit, push, or create a pull request only when the user explicitly requests it.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: issue-reply
3+
description: Triage and draft replies for NG-ZORRO GitHub issues. Use when asked to review, answer, label, close, or maintain issues.
4+
---
5+
6+
# NG-ZORRO Issue Reply
7+
8+
First read the issue body, labels, linked issues or pull requests, and discussion. Classify the report as a reproducible bug, feature request, usage question, duplicate, or insufficient/invalid report. Check existing component documentation, APIs, demos, issues, and changelog entries before deciding that functionality is absent or a regression is unresolved.
9+
10+
Write in the language used by the reporter's issue body. Keep the response specific, polite, and actionable. Do not promise an implementation date or acceptance of a feature.
11+
12+
Apply the repository's community policy from `CONTRIBUTING.md` and `.github/nz-boot.yml`:
13+
14+
- For a bug without a minimal reproduction, request a StackBlitz reproduction or minimal repository and use the configured `Need Reproduce` / `Need More Info` flow.
15+
- For a valid reproducible bug, recommend the appropriate component label; use `Component: <component>` where the report is clearly owned by one component.
16+
- For a feature request, check whether an existing API already solves the scenario before discussing a new API. Major features need an issue discussion; small features may be proposed as a PR.
17+
- For a usage question, help with a documented API when possible; otherwise direct support questions to the channels named in `CONTRIBUTING.md`.
18+
- For a duplicate, point to the canonical issue and explain the closure succinctly.
19+
- Do not close uncertain bugs, active discussions, or valid feature requests. The repository's no-response automation handles stale `Need More Info` issues after seven days.
20+
21+
For any request that would comment, label, assign, reopen, or close an issue, first produce a triage summary and proposed response/actions. Perform GitHub mutations only after the user confirms the proposal.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: test-review
3+
description: Review the value of NG-ZORRO tests. Use when asked whether a test should be kept, rewritten, or removed, especially for duplicated coverage or implementation-detail assertions.
4+
---
5+
6+
# NG-ZORRO Test Review
7+
8+
Review tests for the public contract they protect; this is a review task, not a request to add tests or change production code. Inspect the relevant issue, documentation, demos, implementation, and nearby Vitest specifications as needed. Do not run tests unless the user asks for execution evidence.
9+
10+
State the claimed contract in observable terms: given a condition, a consumer should observe a result. A useful expected value has an independent source such as a reported regression, public API, documented behavior, accessibility semantics, browser behavior, or a user-visible result.
11+
12+
Prefer assertions on rendered DOM, ARIA semantics, emitted outputs, public API behavior, and interaction outcomes. Treat assertions of private helpers, intermediate state, temporary classes, CSS custom properties, or isolated style declarations as implementation-coupled unless the test has an independent visual or compatibility contract.
13+
14+
Check whether an existing spec already protects the same condition. Classify each reviewed test as:
15+
16+
- **Keep** — independently specified, externally observable, and non-duplicative.
17+
- **Rewrite** — the intended regression is valid but its assertion is coupled to implementation.
18+
- **Remove** — the expected value is derived from the same implementation, only proves existence, or duplicates an existing contract.
19+
20+
Lead with the classification and give the few strongest reasons. Offer a rewrite direction only when requested.

.agents/skills/version-release/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: ng-zorro-version-release
2+
name: version-release
33
description: NG-ZORRO/ng-zorro-antd repository release workflow. Use this skill whenever the user mentions 发版, 发布版本, release, release PR, stage-release, 升级版本号, changelog 发布准备, Azure publish, 部署官网, GitHub Release, or asks to prepare or execute an NG-ZORRO version release. This skill is project-specific and should be preferred over generic npm publish guidance.
44
---
55

.claude/skills

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../.agents/skills

0 commit comments

Comments
 (0)