Agent Skills › KiwiCanopy/KiwiDesk › verify-gate

verify-gate

GitHub

执行KiwiDesk项目的完整验证门禁,包括调试构建、测试和代码检查。仅在变更触及并发相关代码时运行发布构建。旨在提交或PR前确保代码质量与合规性。

.claude/skills/verify-gate/SKILL.md KiwiCanopy/KiwiDesk

Trigger Scenarios

准备提交代码前 创建Pull Request前 变更涉及并发逻辑时

Install

npx skills add KiwiCanopy/KiwiDesk --skill verify-gate -g -y
More Options

Non-standard path

npx skills add https://github.com/KiwiCanopy/KiwiDesk/tree/main/.claude/skills/verify-gate -g -y

Use without installing

npx skills use KiwiCanopy/KiwiDesk@verify-gate

指定 Agent (Claude Code)

npx skills add KiwiCanopy/KiwiDesk --skill verify-gate -a claude-code -g -y

安装 repo 全部 skill

npx skills add KiwiCanopy/KiwiDesk --all -g -y

预览 repo 内 skill

npx skills add KiwiCanopy/KiwiDesk --list

SKILL.md

Frontmatter
{
    "name": "verify-gate",
    "description": "Run KiwiDesk's full verification gate — debug build, tests, and lint (AGENTS.md §3, the Verify step), plus the release build when the change touches concurrency. Use before any commit or PR.",
    "argument-hint": "[optional: file\/dir to scope the lint]"
}

Run KiwiDesk's verification gate — the Verify step AGENTS.md §3 delegates here — in order, and report the result of each step. Stop and surface the failure the moment a step fails; do not continue to later steps.

Which gate the change earns

Default to the full gate below. One narrow exception, and it is about running the gate that can catch something rather than about saving time:

  • Read .github/ci-ignore.txt. Never restate that list here — it is the one authority, shared with the changes job in ci.yml, and CiPathFilterTests is what keeps it honest.
  • If git diff --name-only against the base is entirely inside that list, the Swift gate cannot be affected: nothing the build, the lint or the suite reads is in it. Skip steps 1–3.
  • Anything else runs the full gate. docs/, AGENTS.md, .claude/rules/** and .claude/agents/** are deliberately not on the ignore list, so "it's only prose" is not a reason to skip: RuleCitationTests and InstructionPinTests read that tree — including paths a rule file pins, which is why docs/** is not ignorable — and a prose-only edit there has already shipped a dangling citation.
  • Additionally, when the change touches docs/ or site/, run the site build — npm ci && npm run build in site/. It is a separate gate, not a substitute: a missing Starlight frontmatter block breaks the site and no Swift test can see it.

Say in the report which gate you ran and why.

Fast inner loop

  1. swift build
  2. swift test -q (one command — the old two-command split died with the #494 tail-hang fix; history and the rest of the test conventions live in .claude/rules/tests.md. -q drops the ~20k per-test progress lines a green full run prints (#1140); failure issues and the run summary still print, and a red run is re-run --filtered for detail)
  3. scripts/lint.sh $ARGUMENTS (omit the argument to lint the repo)

scripts/lint.sh prints warnings that are not failures — only its exit code decides.

A compiler warning reds CI even though step 1 passes (#1594, #1596). ci.yml's Build and Test steps ratchet (-warnings-as-errors, deprecations excepted) and step 1 above does not, so a new warning — in Sources/ or Tests/ — is a red PR after a green local gate. Worse, SwiftPM re-emits nothing for a module it did not recompile, so a warm tree hides it from a re-run. Before pushing, check the warning the ratchet would see:

swift build --build-tests -Xswiftc -warnings-as-errors \
  -Xswiftc -Wwarning -Xswiftc DeprecatedDeclaration

Step 1 keeps its bare command deliberately: VerifyGateParityTests scrapes it and requires the identical line in scripts/release.sh and release.yml's verify job, both of which the ratchet deliberately exempts.

Release build — conditional

  1. swift build -c release

The release build enables the optimizer and stricter concurrency diagnostics (e.g. non-Sendable captures in @Sendable closures) that the debug build silently misses. CI runs it as a parallel job on every PR (#532), and that job is a required status check on main — scripts/protect-main.sh's CONTEXTS is the one copy of which checks are (#487) — so a red release build cannot merge. It is therefore not a mandatory local step.

Run it locally when the change touches concurrency, @Sendable boundaries, or Sendable conformances — there the ~2min buys back a PR round-trip. Otherwise skip it and let CI catch it, and say in the report that it was skipped and why. Run it locally anyway for anything landing without a PR, where no check gates the push.

Report

End with a one-line PASS/FAIL summary per step, marking step 4 PASS, FAIL, or SKIPPED (with the reason). On any failure, show the relevant compiler/test/lint output and stop — the gate has not passed.

Version History

  • cfa7caf Current 2026-09-27 10:25

Same Skill Collection

.claude/skills/file-issue/SKILL.md
.claude/skills/review-change/SKILL.md

Metadata

Files
0
Version
cfa7caf
Hash
8bfa173a
Indexed
2026-09-27 10:25

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-29 04:28
浙ICP备14020137号-1