charm-library

Automate authoring, versioning, testing, and publishing Juju charm libraries.

1|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/tonyandrewmeyer/cantrip --skill charm-library
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: charm-library
Source: https://github.com/tonyandrewmeyer/cantrip/tree/main/src/cantrip/skills/charm-library
Command: npx skills add https://github.com/tonyandrewmeyer/cantrip --skill charm-library

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams author, version, test, and publish reusable Juju charm libraries that can be shared across charms, ensuring consistent interfaces and easier maintenance.

Core Features & Use Cases

  • Library structure and metadata guidelines that define verifiable, reusable components.
  • End-to-end publishing workflow for Charmhub, including versioning with LIBPATCH and cross-charm compatibility.
  • Documentation and testing practices to promote stable, auditable library code.

Quick Start

Run charmcraft create-lib to scaffold a new library and begin documenting and publishing it on Charmhub.

Frequently Asked Questions about charm-library

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish a reusable Juju charm library to Charmhub?

To publish a Juju charm library, you use Charmcraft to scaffold it with charmcraft create-lib, enforce YAML frontmatter with name and description, track LIBPATCH version bumps, and push the library code to Charmhub.

What is the best way to version shared Juju charm libraries?

The best way to version Juju charm libraries is by tracking LIBPATCH-based version bumps. This approach maintains v0/v1 metadata compatibility across cross-charm usage and ensures stable, auditable library code.

How does unit testing work for Juju charm libraries?

Unit testing for Juju charm libraries involves following specific documentation and testing practices provided by the skill to ensure the reusable library code remains stable, verifiable, and auditable across different charm teams.

Can I include external scripts and assets when authoring a charm library?

Yes, you can include optional resources like scripts, references, and assets when authoring a charm library. These components are supported for on-demand use alongside the required YAML frontmatter metadata.

Does charmcraft support cross-team library lifecycles for Juju charms?

Yes, charmcraft supports cross-team library lifecycles for Juju charms by automating authoring, versioning, testing, and publishing workflows, which ensures consistent interfaces and easier maintenance across different teams.

Why do I need YAML frontmatter in my charm library?

You need YAML frontmatter in your charm library because the skill enforces it with name and description fields. This metadata defines verifiable, reusable components and is required for publishing workflows on Charmhub.