Agent skill

Kcli Testing

by karmab in karmab/kcli

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

Apache-2.0Auto-check: warningsDevelopment

Install Kcli Testing

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

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

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

GitHub CLI
$ gh skill install karmab/kcli kcli-testing --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-testing .claude/skills/kcli-testing && 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-testing
GitHub stars
653
Token cost
~1.3k tokens
SKILL.md length
217 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
Apache-2.0

At a glance

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

  • Works in 3 steps: Lint - pycodestyle + codespell → Test - Integration tests with libvirt → Release (main branch only)
  • Running linting
  • SKILL.md covers Development Setup, Linting, Running Tests and Test Structure, plus 5 more sections
  • Calls python, pip and python3

What it does

Kcli Testing is an agent skill from karmab/kcli. Guides testing and code quality for kcli. Use when writing tests, running linting, or validating changes before committing.

Its SKILL.md is about 1.3k 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 Development, covering Linting and formatting and Code quality. The repository describes itself as: Management tool for virtualization and kubernetes platforms. The licence is Apache-2.0.

When your agent uses it

  • Running linting
  • Validating changes before committing

Example prompts

  • “Use the kcli-testing skill to guide testing and code quality for kcli. An agent skill from karmab/kcli”
  • “/kcli-testing”

Requirements

  • Python 3

Workflow steps

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

  1. Lint - pycodestyle + codespell
  2. Test - Integration tests with libvirt
  3. Release (main branch only)

What it can do on your machine

Read from SKILL.md and the folder at commit 30a28e3. 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:

    • python
    • pip
    • python3

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

  • Network

    No URLs in SKILL.md. Its commands use pip, 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 Testing loads about 1.3k tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 217 words of instructions outside code blocks.

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

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:68
    sudo mkdir -p /var/lib/libvirt/images
  • NoteRuns commands with sudoSKILL.md:69
    sudo setfacl -m u:$(id -un):rwx /var/lib/libvirt/images
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:71
    ssh-keygen -t rsa -N '' -f ~/.kcli/id_rsa

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 30a28e3, republished under its Apache-2.0 licence (© karmab). 217 words, ~1,277 tokens.

Download SKILL.mdSave it as .claude/skills/kcli-testing/SKILL.md (or your agent's skills folder).
name
kcli-testing
description
Guides testing and code quality for kcli. Use when writing tests, running linting, or validating changes before committing.

kcli Testing and Code Quality

Development Setup

bash
# Create virtual environment
python3 -m venv venv
. venv/bin/activate

# Install in development mode
pip install -e .

# Install with all provider dependencies
pip install -e ".[all]"

Linting

pycodestyle (PEP8)
bash
# Lint all Python files
pycodestyle --ignore=E402,W504,E721,E722,E741 --max-line-length=120 kvirt/

# Lint specific file
pycodestyle --ignore=E402,W504,E721,E722,E741 --max-line-length=120 kvirt/config.py

Ignored codes:

  • E402: Module level import not at top of file
  • W504: Line break after binary operator
  • E721: Do not compare types, use isinstance()
  • E722: Do not use bare except
  • E741: Ambiguous variable name

Max line length: 120 characters

codespell (Spelling)
bash
# Check spelling
codespell kvirt/ -L "aks"

# The -L flag ignores specific words (aks is Azure Kubernetes Service)
Combined Linting (CI Script)
bash
# Run the same linting as CI
.github/linting.sh

Note: The linting script excludes kvirt/bottle.py (vendored web framework) from checks.

Running Tests

Prerequisites

Tests require:

  • libvirt running locally
  • Default storage pool configured
  • SSH keypair in ~/.kcli/
bash
# Setup for testing
sudo mkdir -p /var/lib/libvirt/images
sudo setfacl -m u:$(id -un):rwx /var/lib/libvirt/images
mkdir -p ~/.kcli
ssh-keygen -t rsa -N '' -f ~/.kcli/id_rsa
kcli create pool -p /var/lib/libvirt/images default
pytest Commands
bash
# Run all tests
python -m pytest tests/test_kvirt.py -v

# Run specific test class
python -m pytest tests/test_kvirt.py::TestK -v

# Run specific test method
python -m pytest tests/test_kvirt.py::TestK::test_create_vm -v

# Run with output capture disabled
python -m pytest tests/test_kvirt.py -v -s
Integration Test Script
bash
# Full integration test (used in CI)
.github/testing.sh

Test Structure

Tests are in tests/test_kvirt.py:

python
class TestK:
    @classmethod
    def setup_class(self):
        # Initialize Kconfig and provider
        self.config = Kconfig()
        self.k = self.config.k
        
    def test_list(self):
        result = self.k.list()
        assert result is not None
        
    def test_create_vm(self):
        result = self.config.create_vm(...)
        assert result["result"] == "success"
        
    @classmethod
    def teardown_class(self):
        # Cleanup resources
        self.k.delete_network(...)
        self.k.delete_pool(...)

Test Plan Example

The CI uses .github/test_plan.yml for integration testing:

yaml
parameters:
  pool: default
  image: cirros
  network: mynetwork
  profile: myprofile

{{ image }}:
  type: image
  pool: {{ pool }}

{{ network }}:
  type: network
  cidr: 192.168.125.0/24
  dhcp: true

{{ profile }}:
  type: profile
  image: {{ image }}
  memory: 2048
  numcpus: 2

myvm:
  profile: {{ profile }}
  pool: {{ pool }}

Run it:

bash
kcli create plan -f .github/test_plan.yml test_plan
kcli list plan | grep test_plan
kcli delete plan --yes test_plan

Validating Changes

Before Committing
bash
# 1. Run linting
pycodestyle --ignore=E402,W504,E721,E722,E741 --max-line-length=120 kvirt/

# 2. Check spelling
codespell kvirt/ -L "aks"

# 3. Run tests (if libvirt available)
python -m pytest tests/test_kvirt.py -v

# 4. Test your specific change manually
kcli <your-command>
Manual Testing Patterns

Testing Provider Changes:

bash
# Test with debug output
kcli -d list vm
kcli -d create vm -i cirros testvm
kcli -d delete vm --yes testvm

Testing Plan Changes:

bash
# Create minimal test plan
cat > /tmp/test.yml << 'EOF'
testvm:
  image: cirros
  memory: 512
EOF

kcli create plan -f /tmp/test.yml mytest
kcli info plan mytest
kcli delete plan --yes mytest

CI/CD Pipeline

The GitHub Actions workflow (.github/workflows/ci.yml) runs:

  1. Lint - pycodestyle + codespell
  2. Test - Integration tests with libvirt
  3. Release (main branch only):
    • RPM via Copr
    • DEB via Cloudsmith
    • PyPI package
    • Container image to Quay.io

Flake8 Configuration

Project uses .flake8:

ini
[flake8]
max-line-length = 120
ignore = E722,E402,E741,W504,E721,E501

Note: Flake8 config also ignores E501 (line too long) which is stricter than the CI linting script. The CI script uses pycodestyle directly without E501 ignore.

Writing New Tests

When adding tests:

  1. Use the TestK class pattern
  2. Return {'result': 'success'} or {'result': 'failure', 'reason': ...}
  3. Clean up resources in teardown_class
  4. Use unique names to avoid conflicts
python
def test_new_feature(self):
    # Setup
    result = self.k.create_something(name="test-unique-name")
    
    # Assert
    assert result["result"] == "success"
    
    # Cleanup (or use teardown_class)
    self.k.delete_something("test-unique-name")

© 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-testing of karmab/kcli.

Open the folder on GitHubat commit 30a28e3

Compare with similar skills

Kcli Testing 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 Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kcli Testing this skillkarmab/kcli653—~1.3kAutomated safety check: WarnApache-2.0
Install Anti-Slop Oxlint Rulesdmmulroy/anti-slop5.2k—~2.2kAutomated safety check: PassMIT
Add Opik Code Quality Hookcomet-ml/opik22k—~2.3kAutomated safety check: PassApache-2.0
LobeHub Alint Rule Set Maintenancelobehub/lobehub83k—~1.9kAutomated safety check: PassCustom licence
Code Quality Gatefengshao1227/ccg-workflow5.9k—~593Automated safety check: NotesMIT
Experiment Iterative CoderEvoScientist/EvoSkills4743 repos~2.5kAutomated safety check: PassApache-2.0

Similar skills

  • Installs, updates or migrates the vendored anti-slop Oxlint plugin in a repository, keeping local rule changes and the plugin's license and provenance files.

    5.2k GitHub stars~2.2k tokensUpdated 27 days ago
    DevelopmentAuto-check passed
  • Checklist for wiring a new linter into Opik's Code Quality pipeline: the four files to edit, the silent-failure gotchas and the pass/fail verification loop.

    22k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Maintains LobeHub's model-backed alint rule set: writing rules, removing false positives against real code, deciding warn versus error and tracking token cost.

    83k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Code Quality Gate

    fengshao1227/ccg-workflow

    Scans code for complexity, long functions, duplicated blocks, naming problems and code smells with a Node script, then reports and suggests refactors.

    5.9k GitHub stars~593 tokensUpdated 22 days ago
    DevelopmentAuto-check: notes
  • Experiment Iterative Coder

    EvoScientist/EvoSkills

    Iterative code refinement through plan → code → evaluate → refine cycles.

    474 GitHub starsUsed in 3 repos~2.5k tokens
    DevelopmentAuto-check passed
  • Code Quality

    redis/RedisInsight

    Official

    Code-quality standards for RedisInsight: TypeScript strictness, naming conventions (camelCase, PascalCase, UPPERSNAKECASE), linting rules, no any without reason, no !important in styles, and…

    8.9k GitHub stars~1.2k tokensUpdated 3 days ago
    DevelopmentAuto-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 yesterday
    Auto-check passed
  • Kcli

    karmab/kcli

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

    653 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check: warnings
  • Guides creation of kcli plan files for deploying VMs, networks, and infrastructure.

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

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

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

    karmab/kcli

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

    653 GitHub stars~1k tokensUpdated yesterday
    Auto-check: warnings

Questions about Kcli Testing

What does Kcli Testing do?

Guides testing and code quality for kcli. An agent skill from karmab/kcli. Kcli Testing is an agent skill from karmab/kcli. Guides testing and code quality for kcli.

When should I use Kcli Testing?

Kcli Testing fits situations like: running linting; validating changes before committing.

How do I install Kcli Testing in Claude Code?

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

How do I install Kcli Testing in Codex?

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

Can I use Kcli Testing 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-testing -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-testing, .gemini/skills/kcli-testing, .github/skills/kcli-testing and .opencode/skills/kcli-testing in your project.

What does Kcli Testing need to run?

Going by SKILL.md and its folder, Kcli Testing needs the command-line tools its instructions call (python, pip and python3). Our summary lists: Python 3.

Does Kcli Testing access the network?

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

Is Kcli Testing 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 Testing use?

Kcli Testing 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 Testing use?

About 1.3k tokens (SKILL.md is roughly 5.1k 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 Testing?

Skills that share tags, products or a category with Kcli Testing: Install Anti-Slop Oxlint Rules (dmmulroy/anti-slop, 5.2k stars), Add Opik Code Quality Hook (comet-ml/opik, 22k stars), LobeHub Alint Rule Set Maintenance (lobehub/lobehub, 83k stars) and Code Quality Gate (fengshao1227/ccg-workflow, 5.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kcli Testing?

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 6, 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.