Agent skill

Kcli

by karmab in karmab/kcli

Comprehensive guide for kcli usage. An agent skill from karmab/kcli.

Apache-2.0Auto-check: warningsDevOps & Cloud

Install Kcli

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add karmab/kcli --skill kcli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install karmab/kcli kcli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/karmab/kcli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/kcli .claude/skills/kcli && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
kcli
GitHub stars
653
Token cost
~2.6k tokens
SKILL.md length
391 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
Apache-2.0

At a glance

Comprehensive guide for kcli usage. An agent skill from karmab/kcli.

  • Works in 5 steps: Last VM shortcut: Many commands work… → Output formats: Most list commands… → Parameter files: Use kcli_parameters.yml… → …
  • Deploying plans
  • SKILL.md covers Remote Host Optimization, Important Behavior, Quick Reference and Creating VMs, plus 10 more sections
  • Calls ssh

What it does

Kcli is an agent skill from karmab/kcli. Comprehensive guide for kcli usage. Use when creating VMs, deploying plans, managing clusters, or performing any kcli operations. Covers all common user workflows.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Container orchestration. It works with Kubernetes, Amazon Web Services, Google Cloud and Microsoft Azure. The repository describes itself as: Management tool for virtualization and kubernetes platforms. The licence is Apache-2.0.

When your agent uses it

  • Deploying plans
  • Managing clusters
  • Performing any kcli operations

Example prompts

  • “/kcli”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Last VM shortcut: Many commands work without VM name (uses last created)
  2. Output formats: Most list commands support -o yaml or -o json
  3. Parameter files: Use kcli_parameters.yml alongside plans for defaults
  4. Render plans: Preview templated plans before deploying
  5. Export VMs: Create images from running VMs

What it can do on your machine

Read from SKILL.md and the folder at commit 6e1c0b5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • ssh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use ssh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Kcli loads about 2.6k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 391 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • NoteRuns commands with sudoSKILL.md:398
    sudo usermod -aG qemu,libvirt $(id -un)
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:408
    ├── id_rsa          # SSH private key (auto-used)

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from karmab/kcli at commit 6e1c0b5, republished under its Apache-2.0 licence (© karmab). 391 words, ~2,596 tokens.

Download SKILL.mdSave it as .claude/skills/kcli/SKILL.md (or your agent's skills folder).
name
kcli
description
Comprehensive guide for kcli usage. Use when creating VMs, deploying plans, managing clusters, or performing any kcli operations. Covers all common user workflows.

kcli User Guide

kcli is a unified CLI for managing virtual infrastructure across multiple providers (Libvirt/KVM, AWS, GCP, Azure, vSphere, KubeVirt, OpenStack, oVirt, Proxmox, Hetzner, IBM Cloud).

Remote Host Optimization

When the user asks to run a kcli command against a specific host that is not defined as a client in ~/.kcli/config.yml, run the command directly on that host via SSH instead of trying to use -C:

bash
# Host not in config — run via SSH
ssh root@myhost "kcli create vm -i centos9stream myvm"
ssh root@myhost "kcli list vm"
ssh root@myhost "kcli create plan -f plan.yml myplan"

This is both faster (libvirt calls stay local on the host) and avoids needing to add a client entry.

Important Behavior

  • Always run commands directly. When the user asks to create/deploy/manage something, execute the command immediately — don't show it and wait for confirmation.

Quick Reference

bash
# VM Operations
kcli create vm -i <image> <name>      # Create VM
kcli list vm                          # List VMs
kcli ssh <name>                       # SSH into VM
kcli console <name>                   # Graphical console
kcli start/stop/restart vm <name>     # Control VM state
kcli delete vm <name>                 # Delete VM

# Plans (Infrastructure as Code)
kcli create plan -f plan.yml <name>   # Deploy plan
kcli list plan                        # List plans
kcli delete plan <name>               # Delete plan and resources

# Kubernetes Clusters
kcli create kube <type> <name>        # Deploy cluster
kcli list kube                        # List clusters
kcli delete kube <name>               # Delete cluster

# Images
kcli list available-images            # Show downloadable images
kcli download image <name>            # Download cloud image
kcli list image                       # List local images

# Infrastructure
kcli list network / pool / host       # List resources
kcli create network -c <cidr> <name>  # Create network
kcli create pool -p <path> <name>     # Create storage pool

Creating VMs

Basic VM Creation
bash
# From cloud image (downloads if needed)
kcli create vm -i fedora40 myvm

# Create multiple VMs at once
kcli create vm -c 3 myvm             # Creates myvm-0, myvm-1, myvm-2

# Shorthand (kcli remembers last VM)
kcli ssh                              # SSH to last created VM
With Custom Resources
bash
kcli create vm -i centos9stream \
  -P memory=4096 \
  -P numcpus=4 \
  -P disks=[20,50] \
  myvm
Common VM Parameters
ParameterDefaultDescription
numcpus2Number of CPUs
memory512Memory in MB
disks[10]Disk sizes in GB
nets[default]Networks to attach
pooldefaultStorage pool
cloudinittrueEnable cloud-init
starttrueStart VM after creation
keys[]SSH public keys to inject
cmds[]Commands to run at boot
files[]Files to inject
Advanced VM Examples
bash
# With static IP
kcli create vm -i centos9stream \
  -P nets=['{"name":"default","ip":"192.168.122.100"}'] \
  myvm

# With post-boot commands
kcli create vm -i fedora40 \
  -P cmds=['dnf -y install nginx','systemctl enable --now nginx'] \
  webserver

# From profile
kcli create vm -p myprofile myvm

# Multiple disks with options
kcli create vm -i ubuntu2204 \
  -P disks=['{"size":20}','{"size":100,"pool":"data"}'] \
  myvm

VM Management

bash
# List VMs
kcli list vm                          # Table format
kcli list vm -o yaml                  # YAML output
kcli list vm -o json                  # JSON output

# VM Information
kcli info vm myvm                     # Full details
kcli info vm myvm -f ip               # Just IP address

# State Control
kcli start vm myvm
kcli stop vm myvm
kcli restart vm myvm

# Access
kcli ssh myvm                         # SSH as default user
kcli ssh -u root myvm                 # SSH as root
kcli console myvm                     # VNC/SPICE console
kcli console myvm --serial            # Serial console

# Modify
kcli update vm myvm -P memory=8192    # Change memory
kcli update vm myvm -P numcpus=8      # Change CPUs
kcli create disk -s 50 myvm           # Add 50GB disk

# Snapshots
kcli create snapshot myvm snap1
kcli list snapshot myvm
kcli revert snapshot myvm snap1
kcli delete snapshot myvm snap1

# Delete
kcli delete vm myvm                   # With confirmation
kcli delete vm myvm --yes             # Skip confirmation

Plans (Infrastructure as Code)

Plans are YAML files with Jinja2 templating for deploying complete environments.

Basic Plan Structure
yaml
# myplan.yml
parameters:
  base_image: centos9stream
  domain: lab.local

# Network (created first)
labnet:
  type: network
  cidr: 192.168.100.0/24
  dhcp: true

# VM (uses the network)
webserver:
  image: {{ base_image }}
  memory: 2048
  numcpus: 2
  nets:
    - labnet
  cmds:
    - dnf -y install nginx
    - systemctl enable --now nginx
Plan Commands
bash
# Deploy
kcli create plan -f myplan.yml myplan

# Deploy with parameter overrides
kcli create plan -f myplan.yml -P base_image=fedora40 myplan

# List and manage
kcli list plan
kcli info plan myplan
kcli delete plan myplan               # Deletes all resources

# Update existing plan
kcli update plan -f myplan.yml myplan
Multi-VM Plan with Loop
yaml
parameters:
  cluster_name: web
  node_count: 3

{% for i in range(node_count) %}
{{ cluster_name }}-node-{{ i }}:
  image: centos9stream
  memory: 2048
  nets:
    - default
{% endfor %}
Resource Types in Plans
TypeDescription
(none)VM (default if no type specified)
networkVirtual network
poolStorage pool
imageDownload image from URL
profileReusable VM template
containerContainer workload
kubeKubernetes cluster

Kubernetes Clusters

Show full SKILL.md (172 more words)Show less
Supported Types
  • generic / kubeadm - Standard Kubernetes
  • openshift / okd - OpenShift
  • k3s - Lightweight K3s
  • rke2 - Rancher RKE2
  • microshift - Edge MicroShift
  • hypershift - Hosted control planes
  • aks / eks / gke - Cloud managed
Deploy Clusters
bash
# Generic Kubernetes
kcli create kube generic -P ctlplanes=1 -P workers=2 myk8s

# K3s (lightweight)
kcli create kube k3s -P ctlplanes=1 -P workers=2 myk3s

# OpenShift (requires pull secret)
kcli create kube openshift \
  -P pull_secret=~/pull-secret.json \
  -P ctlplanes=3 \
  -P workers=2 \
  myocp
Cluster Management
bash
# List clusters
kcli list kube

# Get kubeconfig
kcli get kubeconfig mycluster
export KUBECONFIG=~/.kcli/clusters/mycluster/kubeconfig

# Scale workers
kcli scale kube generic -P workers=5 mycluster

# Delete
kcli delete kube mycluster

Images

bash
# List available cloud images
kcli list available-images

# Download image
kcli download image fedora40
kcli download image centos9stream
kcli download image ubuntu2204

# List downloaded images
kcli list image

# Delete image
kcli delete image fedora40

Common images: fedora40, centos9stream, ubuntu2204, rhel9, debian12, rocky9, almalinux9

Networks and Storage

Networks
bash
# Create network
kcli create network -c 192.168.100.0/24 mynet
kcli create network -c 10.0.0.0/24 --dhcp --nat privatenet

# List and delete
kcli list network
kcli info network mynet
kcli delete network mynet
Storage Pools
bash
# Create pool
kcli create pool -p /var/lib/libvirt/images default
kcli create pool -p /home/vms myvms

# List and delete
kcli list pool
kcli delete pool myvms

Provider/Client Management

bash
# List configured clients
kcli list client

# Switch default client
kcli switch mykvm

# Use specific client for command
kcli -C aws list vm
kcli -C gcp create vm -i ubuntu2204 myvm

# List VMs from all clients
kcli -C all list vm

# Host information
kcli info host
kcli list host

Profiles

Profiles are reusable VM templates defined in ~/.kcli/profiles.yml:

yaml
# ~/.kcli/profiles.yml
small:
  numcpus: 1
  memory: 1024
  disks:
    - 10

webserver:
  image: centos9stream
  numcpus: 2
  memory: 4096
  cmds:
    - dnf -y install nginx
    - systemctl enable --now nginx

Usage:

bash
kcli create vm -p webserver myweb

Debug and Troubleshooting

bash
# Debug mode (verbose output)
kcli -d create vm -i fedora40 myvm
kcli -d list vm

# Check VM details
kcli info vm myvm

# Check cloud-init logs (after SSH)
kcli ssh myvm
cat /var/log/cloud-init.log

# Verify provider connectivity
kcli list host
kcli info host
Common Issues

No IP address: Check DHCP on network, wait for cloud-init

bash
kcli info network default

SSH fails: Verify key injection worked

bash
kcli ssh -l myvm                      # Show SSH command

Permission denied (libvirt): Add user to groups

bash
sudo usermod -aG qemu,libvirt $(id -un)
newgrp libvirt

Configuration Files

~/.kcli/
├── config.yml      # Client/provider configuration
├── profiles.yml    # VM profiles
├── id_rsa          # SSH private key (auto-used)
└── clusters/       # Cluster state files
Minimal config.yml
yaml
default:
  client: local

local:
  type: kvm
  host: 127.0.0.1
  pool: default

Container Mode

Run kcli without installation:

bash
# With libvirt socket
alias kcli='podman run --rm -it \
  -v ~/.kcli:/root/.kcli:z \
  -v /var/run/libvirt:/var/run/libvirt:z \
  quay.io/karmab/kcli'

# Then use normally
kcli list vm

Useful Tips

  1. Last VM shortcut: Many commands work without VM name (uses last created)

    bash
    kcli ssh                            # SSH to last VM
    kcli console                        # Console of last VM
  2. Output formats: Most list commands support -o yaml or -o json

  3. Parameter files: Use kcli_parameters.yml alongside plans for defaults

  4. Render plans: Preview templated plans before deploying

    bash
    kcli render -f myplan.yml
  5. Export VMs: Create images from running VMs

    bash
    kcli export vm myvm

© karmab, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/kcli of karmab/kcli.

Open the folder on GitHubat commit 6e1c0b5

Compare with similar skills

Kcli next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Kcli compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kcli this skillkarmab/kcli653—~2.6kAutomated safety check: WarnApache-2.0
Provider Bug Reviewmondoohq/mql411—~2.9kAutomated safety check: PassCustom licence
Extend Discovery Typerunwhen-contrib/runwhen-local163—~1.7kAutomated safety check: PassApache-2.0
Azure Arcvinayaklatthe/microsoft-security-skills175—~1.9kAutomated safety check: PassMIT
Provider API Call Dedupmondoohq/mql411—~7.7kAutomated safety check: PassCustom licence
Cloud Devopsdavila7/claude-code-templates32k4 repos~1.4kAutomated safety check: PassMIT

Similar skills

  • Deep static code review of an mql provider for logic errors, nil-handling bugs, pagination truncation, caching/id collisions, and other defects that silently give users wrong data.

    411 GitHub stars~2.9k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Extend Discovery Type

    runwhen-contrib/runwhen-local

    Add or enrich a resource type in an existing RunWhen Local discovery indexer (Azure azureapi, GCP gcpapi, AWS, or Kubernetes).

    163 GitHub stars~1.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Azure Arc

    vinayaklatthe/microsoft-security-skills

    Guidance for Azure Arc — projecting on-premises, multicloud (AWS/GCP), and edge servers, Kubernetes, and data services into Azure Resource Manager for unified governance, security, and management.

    175 GitHub stars~1.9k tokensUpdated 3 mo ago
    DevOps & CloudAuto-check passed
  • A skill your agent uses when a provider scan is slow, times out, or trips rate limits (429, throttling, Retry-After), when the same request URL appears many times in a debug log, when an asset's…

    411 GitHub stars~7.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Cloud Devops

    davila7/claude-code-templates

    Cloud infrastructure and DevOps workflow covering AWS, Azure, GCP, Kubernetes, Terraform, CI/CD, monitoring, and cloud-native development.

    32k GitHub starsUsed in 4 repos~1.4k tokens
    DevOps & CloudAuto-check passed
  • Resource Tagging

    ancoleman/ai-design-components

    Apply and enforce cloud resource tagging strategies across AWS, Azure, GCP, and Kubernetes for cost allocation, ownership tracking, compliance, and automation.

    526 GitHub stars~4k tokensUpdated 10 mo ago
    DevOps & CloudAuto-check passed

More from karmab/kcli

All 8 skills in this repo
  • Guides deployment and management of Kubernetes clusters with kcli.

    653 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Guides creation of kcli plan files for deploying VMs, networks, and infrastructure.

    653 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Guides implementation of new virtualization providers for kcli.

    653 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Guides kcli configuration and provider setup. An agent skill from karmab/kcli.

    653 GitHub stars~1.5k tokensUpdated today
    Auto-check: warnings
  • Kcli Ksushy

    karmab/kcli

    Guides interaction with kcli VMs via ksushy (Redfish emulator).

    653 GitHub stars~1k tokensUpdated today
    Auto-check: warnings
  • Kcli Testing

    karmab/kcli

    Guides testing and code quality for kcli. An agent skill from karmab/kcli.

    653 GitHub stars~1.3k tokensUpdated today
    Auto-check: warnings

Categories

Questions about Kcli

What does Kcli do?

Comprehensive guide for kcli usage. An agent skill from karmab/kcli. Kcli is an agent skill from karmab/kcli. Comprehensive guide for kcli usage.

When should I use Kcli?

Kcli fits situations like: deploying plans; managing clusters; performing any kcli operations.

How do I install Kcli in Claude Code?

Run `npx skills add karmab/kcli --skill kcli -a claude-code`. Or copy the skill folder (skills/kcli in karmab/kcli) into .claude/skills/kcli in your project. Claude Code loads it when a task matches its description.

How do I install Kcli in Codex?

Run `npx skills add karmab/kcli --skill kcli -a codex`. Or copy the skill folder (skills/kcli in karmab/kcli) into .agents/skills/kcli in your project. Codex loads it when a task matches its description.

Can I use Kcli in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add karmab/kcli --skill kcli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kcli, .gemini/skills/kcli, .github/skills/kcli and .opencode/skills/kcli in your project.

What does Kcli need to run?

Going by SKILL.md and its folder, Kcli needs the command-line tools its instructions call (ssh).

Does Kcli access the network?

SKILL.md contains no URLs. Its commands use ssh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Kcli safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Kcli use?

Kcli is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Kcli use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Kcli?

Skills that share tags, products or a category with Kcli: Provider Bug Review (mondoohq/mql, 411 stars), Extend Discovery Type (runwhen-contrib/runwhen-local, 163 stars), Azure Arc (vinayaklatthe/microsoft-security-skills, 175 stars) and Provider API Call Dedup (mondoohq/mql, 411 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kcli?

karmab (a GitHub user) maintains it in karmab/kcli, which has 653 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 7, 2026.

Source: karmab/kcli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.