Back to Skills

build-variant-from-local-kits

Build a variant using locally published kits for development validation

4stars11forksUpdated 3/1/2026

Security Assessment

Safe(100/100)
Security Score100/100

About build-variant-from-local-kits

The 'build-variant-from-local-kits' skill facilitates the creation of Bottlerocket variant images using locally published kits. This skill addresses the need for developers to validate kit changes in a complete variant build before pushing updates to production registries. It enables local testing of these changes, offering an efficient way to ensure correctness and stability in development environments. By using a local registry for fetching kits, developers can simulate the production environment without depending on external resources or network calls, making testing faster and more reliable.

The main features of this skill include fetching kits from a local registry, updating lock files, and building variants for different architectures or versions. It allows developers to configure the local registry, select which kits to fetch locally, and update their build environment seamlessly. This skill also provides mechanisms to validate that the build completes successfully and the resulting image is stored for further use. Additionally, it includes a cleanup process for reverting back to upstream configurations once testing is complete, ensuring that the local testing does not affect the main development environment. This makes it a powerful tool for developers working on Bottlerocket variants and requiring thorough testing.

This skill is primarily used by developers working with Bottlerocket variants who need to test kit changes before publishing them to production. It is especially valuable for those creating bootable images for local testing, conducting end-to-end validation of kit modifications, and ensuring the stability of custom builds in a local development environment. The skill can be utilized in environments where a local registry and kit modifications are involved, offering a practical solution for validating changes in a controlled environment.

FAQ

How do I configure the local registry for building variants?

To configure the local registry, navigate to the Bottlerocket repository and run the command `brdev twoliter use-local-deps`. This will set up a local registry for fetching kits, creating the `Twoliter.override` file to point to it.

What happens if a kit is not found in the local registry?

If a kit is not found in the local registry, you will encounter an error stating 'failed to pull kit'. To resolve this, verify that the kit has been published using the `brdev registry list` command.

Can I build variants for specific architectures?

Yes, you can build variants for specific architectures by specifying the architecture with the `BUILDSYS_ARCH` environment variable. For example, to build for `aarch64`, run the command `cargo make -e BUILDSYS_ARCH=aarch64`.

What should I do if the lock file is out of sync?

If the lock file is out of sync, simply run `./tools/twoliter/twoliter update` to synchronize the lock file with the local registry configuration.

How do I restore the upstream configuration after testing?

To restore the upstream configuration, run `brdev twoliter use-upstream-deps`, which will remove the `Twoliter.override` file and revert any local registry settings. Don't forget to manually undo any changes to `vendor = 'local'` in the `Twoliter.toml` file.

Install build-variant-from-local-kits

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill