adding-actions

Define and manage Juju actions within charms for operator-triggered tasks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Juju actions are operator-triggered tasks — like "backup the database", "rotate credentials", or "dump debug info" — that run on demand and return structured results.

Core Features & Use Cases

  • Declarative action definitions: Define actions and parameters in charmcraft.yaml and implement corresponding Python handlers.
  • Operational workflow support: Manage long-running actions with progress updates and leader-only guards.
  • Testing and validation: Include scenario tests and deterministic behavior to ensure reliability across units and models.

Quick Start

Describe your workload and run the defined actions using Juju on your charm.

Frequently Asked Questions about adding-actions

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

FAQPage Schema
How do I add operator-triggered actions to Juju charms?

To add Juju actions, you define the actions and parameters declaratively in charmcraft.yaml and implement the corresponding Python handlers. This enables operator-triggered tasks like backups or diagnostics to run on demand and return structured results.

What are Juju actions used for in charm operations?

Juju actions are used for on-demand operational tasks such as database backups, credential rotation, and dumping debug info. They provide a mechanism for operators to trigger specific tasks across units and receive structured results.

Can I run long-running actions in Juju charms with progress updates?

Yes, long-running actions are supported with progress updates. The implementation includes operational workflow support, allowing you to manage extended tasks safely using leader-only guards and action handler wiring.

How do I test Juju actions to ensure reliable behavior across units?

You test Juju actions by including scenario tests that validate deterministic behavior. This testing pattern ensures the operator-triggered tasks execute reliably across different units and models before deployment.

Do I need leader-only guards for Juju actions running across multiple units?

Leader-only guards are required when an action must execute exclusively on the leader unit. The implementation supports safe execution guards to manage operational workflows and prevent conflicting task execution across units.