dfinity avatar

Cycles Management

This handles the unglamorous but critical work of keeping canisters funded and alive on Internet Computer. It covers checking cycle balances, accepting and sending cycles between canisters, setting freezing thresholds, and creating new canisters programmatically through the management canister. The code examples show both Motoko and Rust patterns for accepting payment cycles and topping up other canisters. One thing worth knowing: the skill assumes you're using icp-cli with the cycles ledger, not the legacy wallet system. The examples are practical, like how to avoid silently running out of cycles or accidentally sending them to the wrong canister with no way to get them back. If you're building anything that needs to manage its own funding or spawn child canisters, you'll need these patterns.

skills.sh installs
307
GitHub stars
39
last updated
Aug 21, 2026

Install

$ npx -y skills add dfinity/icskills --skill cycles-management --agent claude-code

Installs into .claude/skills of the current project.

Files

Cycles & Canister Management

What This Is

Cycles are the computation fuel for canisters on Internet Computer. Every canister operation (execution, storage, messaging) burns cycles. When a canister runs out of cycles, it freezes and is eventually uninstalled -- its code and data are deleted, but its metadata (canister ID, controllers, settings) survives. 1 trillion cycles (1T) costs approximately 1 USD equivalent in ICP (the exact rate is set by the NNS and fluctuates with ICP price via the CMC).

Note: icp-cli uses the cycles ledger (um5iw-rqaaa-aaaaq-qaaba-cai) by default. The cycles ledger is a single canister that tracks cycle balances for all principals, similar to a token ledger. Commands like icp cycles balance, icp cycles mint, and icp canister top-up go through the cycles ledger. There is no legacy wallet concept in icp-cli. The programmatic patterns below (accepting cycles, creating canisters via management canister) remain the same regardless of which funding mechanism is used.

Prerequisites

  • For Motoko: mops package manager, core = "2.0.0" in mops.toml
  • For Rust: ic-cdk >= 0.19

Canister IDs

Sponsors

Details

Repository
github.com/dfinity/icskills
Categories
Marketing & SEO, Web3 & Blockchain
First seen
Jun 3, 2026

More from dfinity/icskills

All 16
1incept5 avatareve-read-eve-docsincept5/eve-skillpacksLoad first. State-today index of distilled Eve Horizon system docs with task-based routing for CLI/API usage, manifests, pipelines, jobs, secrets, agents, build305skills.sh installs
2jezweb avatartinacmsjezweb/claude-skillsBuild content-heavy sites with Git-backed TinaCMS. Provides visual editing for blogs, documentation, and marketing sites. Supports Next.js, Vite+React, and Astr304skills.sh installs
3dkyazzentwatwa avatarimage-enhancement-suitedkyazzentwatwa/chatgpt-skillsProcess images for cleanup, conversion, metadata, comparison, icons, palettes, collages, and sprite sheets. Use for single-image or batch image workflows.303skills.sh installs
4onewave-ai avatarregex-visual-debuggeronewave-ai/claude-skillsDebug regex patterns with visual breakdowns, plain English explanations, test case generation, and flavor conversion. Use when user needs help with regular expr302skills.sh installs
5coleam00 avatarpptx-generatorcoleam00/second-brain-skillsGenerate and edit presentation slides as PPTX files. Also create LinkedIn carousels and manage reusable slide layouts. TRIGGERS - Use this skill when user says:301skills.sh installs
6nexu-io avatarweb-prototypenexu-io/open-designGeneral-purpose desktop web prototype. Single self-contained HTML file built by copying the seed `assets/template.html` and pasting section layouts from `refere301skills.sh installs