charmcraft

Build, test, and publish Juju charms with charmcraft.

3|Updated Aug 3, 2025
One-click install
npx skills add https://github.com/tonyandrewmeyer/charming-with-claude --skill charmcraft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: charmcraft
Source: https://github.com/tonyandrewmeyer/charming-with-claude/tree/main/claude-instructions/.claude/skills/charmcraft
Command: npx skills add https://github.com/tonyandrewmeyer/charming-with-claude --skill charmcraft

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides expert guidance for working with charmcraft to streamline Juju charm development, from project initialization to building, testing, and publishing on Charmhub.

Core Features & Use Cases

  • Project Initialization: Create a new charm project with templates and proper structure
  • Building & Packaging: Pack, analyse, and validate charms before deployment
  • Library Management: Fetch and manage Charm libraries for dependencies
  • Publishing: Upload and release charms to Charmhub across channels
  • Testing Workflows: Integrate with tox for linting, unit, and integration tests

Quick Start

Start a Kubernetes charm with: charmcraft init --profile=kubernetes --name=my-charm --author="Your Name"; then pack and publish to Charmhub with: charmcraft pack; charmcraft analyse ./my-charm.charm; charmcraft upload ./my-charm.charm --release=edge

Frequently Asked Questions about charmcraft

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

FAQPage Schema
How do I build and package a Juju charm with charmcraft?

Build and package charms by running charmcraft pack in your charm project directory. This creates a .charm file ready for deployment. Use charmcraft analyse to validate the charm before uploading to Charmhub with charmcraft upload.

What's the best way to initialize a new charm project?

Initialize a charm project with charmcraft init, specifying a profile (kubernetes or machine), name, and author. This generates a templated project structure with charmcraft.yaml configuration and Ops framework integration ready for development.

How do I publish a charm to Charmhub?

Publish charms to Charmhub by running charmcraft upload ./charm-name.charm, optionally specifying a release channel (edge, candidate, stable). Your charm becomes discoverable and deployable by other Juju users across channels.

Can I manage charm library dependencies with charmcraft?

Yes, charmcraft handles charm library management, allowing you to fetch and integrate reusable libraries into your charm. This centralizes dependency resolution and keeps library versions aligned across projects.

How do I run tests for a charm project?

Integrate testing with tox to run linting, unit tests, and integration tests defined in your charm's test suite. Charmcraft works within the Ops framework testing patterns to validate charm behavior before publishing.

Does charmcraft work with Kubernetes and machine charms?

Charmcraft supports both Kubernetes and machine charm profiles. Use charmcraft init --profile=kubernetes or --profile=machine to scaffold the appropriate charm type for your deployment target.