CommunityCoding & Developmentgithub.com

api-check

Check a Java or Kotlin library's change against the API of its last published release with Bumpwise, before committing or releasing. Use after changing public classes, methods, fields or Kotlin declarations of a published library (Maven or Gradle), when asked whether a change breaks users, which version comes next (major/minor/patch), or to prepare a release or changelog.

What is api-check?

api-check is a Claude Code agent skill that check a Java or Kotlin library's change against the API of its last published release with Bumpwise, before committing or releasing. Use after changing public classes, methods, fields or Kotlin declarations of a published library (Maven or Gradle), when asked whether a change breaks users, which version comes next (major/minor/patch), or to prepare a release or changelog.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/gilware/bumpwise-skills/tree/HEAD/skills/api-check

Installed? Explore more Coding & Development skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Check the API against the last release

Bumpwise compares the library's compiled classes with the version published on Maven Central (or the repository the project uses) and says whether the change breaks existing users, which semantic version is needed, and what the compatible alternative is.

When

  • After editing the public API of a library that is published: public or protected classes, methods, fields, constructors, Kotlin parameters and defaults, sealed hierarchies.
  • Before committing such a change, and before a release ("what is the next version?", "prepare the release", "write the changelog").
  • Not for applications or code that is not published as a library. If Bumpwise says there is no published release yet, say so and stop.

Running Bumpwise

Use the first of these that works:

  1. The check_api_compatibility tool, if a bumpwise MCP server is connected. All its arguments are optional: project (a module folder), exclude (packages that are not API) and includeChangelog.
  2. The bumpwise command, if it is on the PATH (bumpwise version prints its version).
  3. npx -y @gilware/bumpwise in place of bumpwise, if Node.js 18 or later is installed. It downloads the same command line once and checks its SHA-256.

All three need Java 17 or later. If none of them is available, tell the user that Bumpwise is not installed and point them to https://gilware.com/bumpwise/cli/. Do not run an installer yourself.

How

  1. Build the library the way the project is usually built (its README, CLAUDE.md or AGENTS.md, CI file or wrapper): compiling is enough, tests are not needed. Bumpwise reads compiled classes, so build again after each edit.
  2. In the library's folder, run bumpwise check --format markdown. Options: --project DIR for a module folder in a multi-module build, --exclude PACKAGE for packages that are not public API (for example com.acme.internal), and --changelog (with the default text format) when preparing a release.
  3. Read the exit code: 0 means compatible, 1 breaking changes, 2 that Bumpwise could not check (the output says why).
  4. Tell the user the result in a few lines: the verdict, the required bump and the next version.

Acting on the result

  • Breaking changes found and not intended: change the code to the compatible alternative Bumpwise gives (for example keep the old method, mark it @Deprecated, and delegate to the new one), build, and check again until it reports no breaking change.
  • Breaking on purpose: say that the release needs a new major version, and list what users must change.
  • Declared version too low: say which version the project should have. Change the version in the build file only when the user asks.
  • Packages reported that are internal: suggest --exclude, or an exclude list in .bumpwise.yml so the whole team gets the same result.

Never commit, tag or publish on your own because the check passed.

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

Related Skills