Agent Skills › chrisbanes/skills › release-kotlin-library

release-kotlin-library

GitHub

用于准备、发布或检查 Kotlin 库发布就绪状态的技能,涵盖验证 gradle-maven-publish-plugin 依赖、核对变更日志与 API 快照及确认发布流程。

skills/release-kotlin-library/SKILL.md chrisbanes/skills

触发场景

准备发布 Kotlin 库 检查库发布就绪状态 执行 Kotlin 库发布操作

安装

npx skills add chrisbanes/skills --skill release-kotlin-library -g -y
更多选项

不安装直接使用

npx skills use chrisbanes/skills@release-kotlin-library

指定 Agent (Claude Code)

npx skills add chrisbanes/skills --skill release-kotlin-library -a claude-code -g -y

安装 repo 全部 skill

npx skills add chrisbanes/skills --all -g -y

预览 repo 内 skill

npx skills add chrisbanes/skills --list

SKILL.md

Frontmatter
{
    "name": "release-kotlin-library",
    "description": "Use when preparing, publishing, or checking readiness for a Kotlin library release, including verifying its gradle-maven-publish-plugin prerequisite, reconciling changelogs and API snapshots, and checking publication."
}

Release Kotlin library

Core principle

Publish the prepared, validated, user-approved release commit and call the release complete only after verifying its artifacts and Git state.

Prerequisite

This skill relies on gradle-maven-publish-plugin (com.vanniktech.maven.publish) for library publication, whether run locally or through tag-triggered CI. API snapshot support assumes Metalava-generated api/api.txt files; disable snapshots when the repository does not maintain them.

Procedure

  1. Route standalone changelog maintenance to changelog and finish that task without applying this skill's publishing prerequisite or release answer forms. For release work, establish scope and inspect repository instructions, Git state, release history, version properties, publishing configuration and required checks. If the user limits review to supplied state, run no commands and mark unsupplied state unknown. Confirm, from build files or supplied repository facts, that published modules apply com.vanniktech.maven.publish directly or via a convention plugin; declaration alone is insufficient. If absent or unverified, report it and stop before release mutations; do not install or migrate publishing plugins. Distinguish readiness review, preparation and explicit release authorization; select the matching finish path before proceeding. For recovery or recovery review, select and read the recovery answer form before analysis. For changelog-related review, also load changelog in read-only mode. For release preparation, including its changelog portion, read the preparation answer form completely, in its own call, before analysis. Keep reviews read-only, including credentials. Follow the existing local or CI publishing mechanism; do not migrate it. Read the helper contract before configuring the bundled script. Stop before mutation on unsupported layouts or ambiguous destinations.
  2. Before preparation, use changelog for specified-release notes. If that skill is unavailable, report the missing dependency and stop changelog preparation rather than inventing a substitute. Supply the target version, repository heading conventions and authorized scope; consume its reviewed baseline, notes, coverage or skip result, and gaps. Leave heading finalization to the release helper unless the request is explicitly limited to finalizing the changelog. Resolve coverage gaps before publication. Use supplied release and next-development versions; propose and confirm missing values before release mutation, never silently incrementing a prerelease to a patch snapshot. The caller owns any authorized changelog-correction commit needed before helper preparation's clean-worktree gate.
  3. Identify repository release checks, including tests and Metalava API generation and compatibility checks where configured. Confirm that API files are current before snapshotting; the helper copies them without running Metalava. Do not treat other API dump formats as Metalava snapshots. Require passing evidence for the release code; a green parent commit is insufficient after relevant changes. For Gradle execution, use gradle-run, with --no-scan unless a scan is explicitly authorized. Fix failed checks within authorized scope; otherwise stop with the failing gate and next action.
  4. Configure and preflight the helper with explicit versions, paths, heading style, API snapshot applicability, branch, remote, tag and command arguments. Keep configuration and evidence outside tracked release files. Check the index, snapshot collisions and local/remote destinations before writes. Load ~/.env for local publication as data, never by shell sourcing or printing it. Preserve explicit process environment values. Missing required credentials block local publication; do not request or log their values. For tag-triggered CI, use existing Git authentication and CI-managed publishing secrets without loading or requiring local dotenv values.
  5. Prepare the release: update the version, finalize the changelog heading and applicable published-module API snapshots, run configured checks, and commit only release files. Recheck the finalized changelog against the changelog coverage result; return to that skill if finalization changes notes or history. Inspect the resulting commit. Bind validation to this state and invalidate it if relevant code changes. The helper must not publish during preparation.
  6. Present the prepared release for explicit user approval before publication: release version and tag, finalized changelog (or its absence), next development version, release commit, artifact coordinates and destination, publishing mechanism, and validation results. Provide the actual notes or a directly reviewable diff, not just a claim that they are ready. Explain that this approval gate is required by this skill and wait for the user's decision; a general request to release does not approve unseen release details. Reuse approval already given for this exact prepared release. If the code, versions, notes or publishing scope change, prepare and validate the revised release and obtain approval again. Preparation-only and readiness requests stop at their requested scope without soliciting publication approval.
  7. Once the prepared release is approved and all gates pass, publish from that commit via the repository's selected mechanism. Local publication and tag-triggered CI are alternatives; do not run both. Do not publish artifacts, push a release tag or trigger publishing CI before approval.
  8. Verify all expected artifact coordinates and versions at the configured destination, along with CI completion when applicable. Verify the remote tag resolves to the prepared commit. A successful command or tag alone is not artifact evidence. Only then advance, commit, push and verify the agreed next development version. Create and read back a GitHub Release only when repository conventions call for it, using the finalized release notes.
  9. On partial or uncertain success, stop dependent mutations and report verified, failed and unknown stages without secrets. Inspect live artifact, workflow, tag and branch state before recovery; never blindly repeat publication, overwrite remote tags, delete published artifacts or claim rollback. Resume only a proven remaining action within existing authorization.

Finish paths

  • Release preparation, including its changelog portion: Fill the selected preparation answer form. Show actual reviewable notes or diff, remaining checks, and the explicit later publication-approval gate; do not request approval now.
  • Recovery/recovery review: Fill the selected recovery answer form as numbered sections; check every applicable disposition before replying.
  • Completed release: Report release version, commit/tag, validation, artifact readback, next development commit, and conditional GitHub Release URL. Claim completion only when every applicable check passes.

For a readiness review or blocker, state that narrower outcome and remaining gate. Do not expose credential contents or raw sensitive command output.

版本历史

  • 2026.11.2 当前 2026-11-02 19:48

    从发布流程中抽离出独立的 changelog 技能,使发布准备任务可消费其审查后的注释和覆盖结果,并更新相关路由与测试。

  • 2026.10.18 2026-10-19 03:05

    新增恢复审查和仅 Changelog 工作的处理路径;细化了准备阶段答案表单的读取要求;增加了对不支持布局或目标不明时停止操作的约束。

  • 2026.9.25 2026-09-27 20:24

    优化技能入口提示大小,将详细流程路由至参考文档;强化强制调用证据以支持评分,并恢复 GitHub 项目操作的强制工作流契约读取。

  • 2026.9.21 2026-09-22 08:34

    明确最终版本的变更日志需汇总整个周期内容,并要求在发布前获得显式用户批准。

  • 2026.9.2 2026-09-09 03:00

同 Skill 集合

skills/android-benchmark-comparison/SKILL.md
skills/changelog/SKILL.md
skills/compose-animations/SKILL.md
skills/compose-component-design/SKILL.md
skills/compose-focus-navigation/SKILL.md
skills/compose-modifier-and-layout-style/SKILL.md
skills/compose-performance/SKILL.md
skills/compose-recomposition-performance/SKILL.md
skills/compose-side-effects/SKILL.md
skills/compose-slot-api-pattern/SKILL.md
skills/compose-stability-diagnostics/SKILL.md
skills/compose-state-and-effects/SKILL.md
skills/compose-state-authoring/SKILL.md
skills/compose-state-deferred-reads/SKILL.md
skills/compose-state-hoisting/SKILL.md
skills/compose-state-holder-ui-split/SKILL.md
skills/compose-ui-testing-patterns/SKILL.md
skills/deliver-spec/SKILL.md
skills/gradle-run/SKILL.md
skills/grounded-writing/SKILL.md
skills/implement-issue/SKILL.md
skills/implement-with-subagents/SKILL.md
skills/kotlin-api-design/SKILL.md
skills/kotlin-concurrency-and-flow/SKILL.md
skills/kotlin-control-flow/SKILL.md
skills/kotlin-coroutines-structured-concurrency/SKILL.md
skills/kotlin-flow-state-event-modeling/SKILL.md
skills/kotlin-functions/SKILL.md
skills/kotlin-multiplatform-expect-actual/SKILL.md
skills/kotlin-types-value-class/SKILL.md
skills/run-github-project/SKILL.md
skills/shepherd/SKILL.md
skills/to-plan/SKILL.md
skills/using-chrisbanes-skills/SKILL.md

元信息

文件数
0
版本
2026.11.2
Hash
0ea30888
收录时间
2026-09-09 03:00

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-03 22:38
浙ICP备14020137号-1