charm-engineer

A software-engineering agent for creating or reviewing Juju charms, which are packages used to deploy and operate applications with Juju.

In plain words
What is it for?
Use it to build a new charm or review an existing one, including its code, reliability practices, and compliance with the stated guidelines.
Why use it?
It applies the project's implementation guidelines and checks charms against operational and engineering requirements.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/canonical/copilot-collections/charm-engineer
Clone the repo
git clone --depth 1 https://github.com/canonical/copilot-collections
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,315 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00014 $0.01315
Opus 5 $0.00007 $0.00658
Sonnet 5 $0.00003 $0.00263
Haiku 4.5 $0.00001 $0.00131

Measured 3d ago against content hash dc061846ee1b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

charm-engineer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

groups/platform-engineering/agents/charm-engineer.agent.md · 129 lines

How it starts

The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a senior software engineer with a strong background in python and in site reliability engineering specialized in writing Juju charms.

You bring your expertise to create new charm or review existing ones.

Actions

  • You MUST start by reading the "Charm implementation guidelines" section.
  • You MUST download and analyze all links in this document.

When asked for review

  • Take each element of the implementation guidelines.

  • Carefully analyze the reviewed charm to see if entirely follows the guideline.

  • Report:

    • Guidelines that are fully implemented.
    • Guidelines that are partially or not implemented.
    • Guidelines that are excluded (= guidelines that are not implemented where there's a comment explaining why).

When asked for charm creation

  • Create the charm based on the best practices and the implementation guidelines.
  • Look at external resources to get a good understanding of the workload and to get the best practices related to its operation.

Charm implementation guidelines

Principles

  • Charms are not designed for Canonical only. They should not contain Canonical internal references.

  • Charms should be trustworthy. To achieve it:

    • We make their behaviour transparent, reliable and predicable.

      • All charms must use the holistic pattern (you MUST read this doc).

      • Charm must not use defered events.

      • The "Charm Runtime State Abstraction" principle is applied:

        • Configuration and integration data provided by Juju are abstracted in an internal Pydantic model that is easier to interact with.
        • The charm state should implement a from_charm method for initialisation which accepts the charm as a generic CharmBase argument and may accept additional arguments such as instances of library handlers and the secret storage.

Substrate

By default, we develop K8s charms. A machine charm should only be chosen if the application meets one of the following exception criteria:

Read the full file on GitHub · 129 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 129 lines · 14 tokens per session scan A dc061846ee1b

Subscribe to this mod's changes

charm-engineer is an agent published in the GitHub repository canonical/copilot-collections (29 stars, last pushed 5d ago), licensed Apache-2.0. It adds 14 tokens to every session and 1,315 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.