Agent skill

Kaniop Development

by pando85 in pando85/kaniop

Kaniop architecture, Rust controller conventions, commands, testing, and repository workflows.

AGPL-3.0Auto-check passedTesting & QA

Install Kaniop Development

skills CLI
$ npx skills add pando85/kaniop --skill kaniop-development -a claude-code

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

GitHub CLI
$ gh skill install pando85/kaniop kaniop-development --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/pando85/kaniop.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.opencode/skills/kaniop-development .claude/skills/kaniop-development && 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
kaniop-development
GitHub stars
130
Token cost
~3.1k tokens
SKILL.md length
1,181 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Kaniop architecture, Rust controller conventions, commands, testing, and repository workflows.

  • Works in 3 steps: CRD (crd.rs): Defines the Kubernetes… → Controller (controller.rs): Sets up the… → Reconciler (reconcile.rs): Implements…
  • Changing Kaniop source code
  • SKILL.md covers Project Overview, Essential Commands, Architecture and Development Practices, plus 4 more sections
  • Calls make, kubectl and cargo

What it does

Kaniop Development is an agent skill from pando85/kaniop. Kaniop architecture, Rust controller conventions, commands, testing, and repository workflows. Use when changing Kaniop source code, tests, CRDs, configuration, or documentation.

Its SKILL.md is about 3.1k 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 Testing & QA, covering Container orchestration and End-to-end testing. It works with Rust and Kubernetes. The repository describes itself as: Kubernetes operator for managing Kanidm. The licence is AGPL-3.0.

When your agent uses it

  • Changing Kaniop source code
  • Tasks that involve Container orchestration
  • Tasks that involve End-to-end testing

Example prompts

  • “/kaniop-development”

Workflow steps

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

  1. CRD (crd.rs): Defines the Kubernetes Custom Resource
  2. Controller (controller.rs): Sets up the kube-rs controller with watchers and reconciler
  3. Reconciler (reconcile.rs): Implements the reconciliation logic using Kanidm client SDK

What it can do on your machine

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

    • make
    • kubectl
    • cargo
    • helm
    • gh

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

  • Network

    No URLs in SKILL.md. Its commands use kubectl, helm and gh, 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

Kaniop Development loads about 3.1k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 1,181 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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 pando85/kaniop at commit 768ac0b, republished under its AGPL-3.0 licence (© pando85). 1,181 words, ~3,107 tokens.

Download SKILL.mdSave it as .claude/skills/kaniop-development/SKILL.md (or your agent's skills folder).
name
kaniop-development
description
Kaniop architecture, Rust controller conventions, commands, testing, and repository workflows. Use when changing Kaniop source code, tests, CRDs, configuration, or documentation.

Kaniop development

Detailed project guidance for agents working with code in this repository.

Project Overview

Kaniop is a Kubernetes operator for managing Kanidm identity services. It provides declarative management of Kanidm clusters and identity resources (persons, groups, OAuth2 clients, service accounts) through Kubernetes Custom Resources.

Tech Stack: Rust (edition 2024), Cargo workspace, Kubernetes controller-runtime (kube-rs), Kanidm client SDK, Helm charts, Kind for e2e testing.

Essential Commands

Development Workflow
bash
# Lint and format check (must pass with zero warnings)
make lint

# Run unit tests (includes lint)
make test

# Build debug binaries (kaniop and kaniop-webhook)
make build

# Build optimized release binaries
make release

# Regenerate CRDs after any CRD spec changes (REQUIRED)
make crdgen

# Regenerate example YAML files (do not hand-edit examples/)
make examples

# Update version across workspace and Helm chart
make update-version
Testing
bash
# Integration tests (requires Tempo tracing container)
make integration-test

# Create Kind cluster, build images, install operator
make e2e

# Run e2e tests (requires Kind cluster from `make e2e`)
make e2e-test

# Rapid iteration: rebuild operator and reload into Kind cluster
make update-e2e-kaniop

# Clean e2e resources but keep cluster
make clean-e2e

# Delete Kind cluster completely
make delete-kind
Test a Single e2e Test
bash
# After `make e2e` has created the cluster:
RUST_TEST_THREADS=16 cargo test -p kaniop-e2e-tests --features e2e-test <test_name>
Run One e2e Shard Locally
bash
# After `make e2e` has created the cluster:
make e2e-test-shard SHARD=kanidm-core

# Verify shard filters still cover every test (run after adding/removing tests):
make check-e2e-shards

Valid shards: kanidm-core, kanidm-ha, kanidm-backup, kanidm-restore, kanidm-restore-hardening, oauth2, resources, misc. Shard filters are defined in the Makefile (E2E_SHARD_FILTER_* / E2E_SHARD_SKIP_*) and consumed by the CI e2e job matrix in .github/workflows/rust.yml.

Build and Push Images
bash
# Build single-arch local images
make images

# Build and push multi-arch images (amd64, arm64)
make push-images

Architecture

Workspace Structure

Binaries (cmd/):

  • cmd/operator: Main operator binary with multiple controllers
  • cmd/webhook: Validating admission webhook
  • cmd/crdgen: CRD generator (outputs to charts/kaniop/crds/crds.yaml)
  • cmd/examples: Example YAML generator (outputs to examples/)

Libraries (libs/):

  • libs/operator: Core operator framework (controller runner, metrics, telemetry, Kanidm cluster CRD)
  • libs/person: KanidmPersonAccount controller and reconciler
  • libs/group: KanidmGroup controller and reconciler
  • libs/oauth2: KanidmOAuth2 controller and reconciler
  • libs/service-account: KanidmServiceAccount controller and reconciler
  • libs/k8s-util: Kubernetes client utilities, error types, patch helpers

Tests (tests/):

  • tests/e2e/: End-to-end tests with feature flag e2e-test
  • tests/integration/: Integration tests with feature flag integration-test

Important: Never use both feature flags together.

Controller Pattern

Each identity resource follows the same pattern:

  1. CRD (crd.rs): Defines the Kubernetes Custom Resource
  2. Controller (controller.rs): Sets up the kube-rs controller with watchers and reconciler
  3. Reconciler (reconcile.rs): Implements the reconciliation logic using Kanidm client SDK

All controllers:

  • Use exponential backoff on errors via backoff_reconciler! macro
  • Share a common Context trait pattern with IdmClientContext and BackoffContext
  • Access Kanidm via KanidmClient cached per-cluster
  • Report metrics via Prometheus client
Key Components

libs/operator/src/controller.rs: Core controller infrastructure

  • State: Shared state across all controllers (metrics registry, Kanidm client cache)
  • Context trait: Provides access to k8s client, metrics, Kanidm client
  • create_subscriber(): Sets up controller with retry backoff

libs/operator/src/kanidm/: Kanidm cluster management

  • controller.rs: Reconciles Kanidm StatefulSet, Services, PVCs
  • crd.rs: Kanidm cluster CRD definition
  • reconcile/: Stateful set, service, secret management logic

libs/k8s-util/src/error.rs: Centralized error handling

  • Error enum for all controller errors
  • Result<T> type alias used throughout
Reconciliation Flow
  1. Kubernetes watch event triggers reconciler
  2. Reconciler retrieves Kanidm client from shared cache (via Context::get_idm_client())
  3. Reconciler performs idempotent operations against Kanidm API
  4. Controller tracks backoff state on errors, retries with exponential backoff
  5. Status updates written back to CR
e2e Testing
  • Cluster: Kind cluster named chart-testing (context: kind-chart-testing)
  • Namespace: kaniop
  • Test execution: Runs in serial per-resource (RUST_TEST_THREADS=16 for parallel tests, override via E2E_TEST_THREADS)
  • Diagnostics: On failure, operator logs dumped automatically
  • Image tagging: Uses git SHA as version tag
e2e Iteration Workflow

When iterating on code changes with e2e tests:

  1. Initial setup (once per session):

    bash
    make e2e  # Creates Kind cluster, builds images, installs operator
  2. Rapid iteration cycle:

    bash
    # After code changes, rebuild and reload operator into cluster
    make update-e2e-kaniop
    
    # Run a specific test
    RUST_TEST_THREADS=16 cargo test -p kaniop-e2e-tests --features e2e-test <test_name>
    
    # Or run all e2e tests
    make e2e-test
  3. Cleanup between test runs (if tests fail with "already exists" errors):

    bash
    # Clean up leftover test resources but keep cluster running
    make clean-e2e
    
    # Then re-run tests
    make e2e-test
  4. Delete specific leftover resources (for targeted cleanup):

    bash
    kubectl delete kanidmgroup <name> -n default --ignore-not-found=true
    kubectl delete kanidmpersonaccount <name> -n default --ignore-not-found=true
    kubectl delete kanidmoauth2client <name> -n default --ignore-not-found=true
    kubectl delete kanidmserviceaccount <name> -n default --ignore-not-found=true
    kubectl delete kanidm <name> -n default --ignore-not-found=true
  5. Full reset (when cluster is in bad state):

    bash
    make delete-kind && make e2e

Common e2e test failure patterns:

  • "already exists" errors → Run make clean-e2e to remove leftover resources
  • "admission webhook denied" with duplicate message → Previous test didn't clean up; delete the specific resource
  • Tests pass individually but fail in batch → Resource name collision; ensure test names are unique

Development Practices

Code Style
  • Imports: Always at top-level, grouped: std → external crates → internal crates → crate-local
  • Never inline imports within functions or impl blocks
  • Async: Never block Tokio runtime; use retry/backoff for transient failures
  • Performance: Avoid unnecessary clone, prefer references and iterators
  • Error handling: Use anyhow::Context for error wrapping, domain-specific error enums
Helm Chart Changes Workflow
  1. Modify charts/kaniop/values.yaml — add value with YAML doc comments
  2. Update charts/kaniop/values.schema.json — add matching JSON schema entry
  3. Update relevant template(s) in charts/kaniop/templates/
  4. Add unit tests in charts/kaniop/tests/ — test both default and custom values
  5. Run helm unittest charts/kaniop to verify
Operator Configuration Pattern

When adding a new operator config via env var:

  1. Add clap arg with #[arg(long, default_value = "...", env)] in cmd/operator/src/main.rs
  2. Add global OnceLock getter/setter in libs/operator/src/controller/mod.rs
  3. Call setter in main() after args parsing
  4. Import and use in reconcilers via crate::controller::function_name
Show full SKILL.md (514 more words)Show less
CRD Changes Workflow
  1. Modify CRD in libs/*/src/crd.rs
  2. Run make crdgen to regenerate charts/kaniop/crds/crds.yaml
  3. If version bump needed, run make update-version
  4. Never hand-edit generated CRD files
Examples
  • cmd/examples should always include values for the CRD fields they demonstrate.
  • Prefer using real, representative values or explicit defaults (when known) instead of leaving fields empty, null, or omitted.
  • When introducing new optional fields, update the example generator so users can see the default/expected shape immediately.
  • Never add explanatory comments in example code (cmd/examples/src/*.rs). Comments in Rust code are NOT rendered in the generated YAML output.
  • All field documentation must be in CRD definitions (libs/*/src/crd.rs). CRD doc comments (///) are extracted by the schema generator and rendered in YAML.
  • Set new fields to Some(...) with concrete values, not None, so they appear in generated YAML documentation.
  • Run make examples after modifying example code or CRD definitions.
Dependencies
  • Add shared dependencies to [workspace.dependencies] in root Cargo.toml
  • Minimize new dependencies; only add if no internal equivalent exists
  • Use specific versions for reproducibility
Testing Strategy
  • Unit tests: Test individual functions and modules
  • Integration tests: Test with external services (e.g., Tempo tracing)
  • e2e tests: Primary testing method; full operator behavior in Kind cluster
Feature Requirements
  • All new features must include e2e tests in tests/e2e/
  • All new features must be documented with examples in cmd/examples/
  • Run make examples to regenerate example YAML files after adding/modifying examples
Robustness Requirements

Handle these scenarios gracefully:

  • Empty CR lists
  • Deletion during reconciliation
  • Transient 5xx errors and timeouts from Kanidm/K8s APIs
  • Context cancellation
  • Idempotent operations (repeated reconcile should be safe)
  • Upgrade version skew

Common Pitfalls

  • Forgetting make crdgen after CRD changes → version mismatch errors
  • Hand-editing generated files in examples/ or charts/kaniop/crds/
  • Running e2e tests without Kind context → wrong cluster targeted
  • Mixing test feature flags (integration-test + e2e-test → compilation error)
  • Blocking calls in async code → runtime stalls
  • Not checking make lint before committing → CI failure

CI/CD

  • Linting: make lint must pass with zero clippy warnings
  • Testing: All tests run via make test
  • Commit format: Conventional Commits (feat, fix, docs, chore, etc.)
  • Pre-commit hooks: Configured via .pre-commit-config.yaml
  • Auto-updates: Renovate handles dependency updates
PR Workflow
  1. Run make lint and make test locally before pushing.
  2. Do not run e2e locally; push the PR and let CI run e2e.
  3. Wait for CI: gh pr checks <pr> --watch.
  4. If an e2e CI job fails, reproduce it locally (make e2e && make e2e-test-shard SHARD=<failing-shard>), fix, push, and repeat until CI is green.

Profiles

  • release: Full optimization (LTO fat, opt-level 3, stripped symbols)
  • release-e2e: Fast release for e2e (LTO thin, 32 codegen units)
  • e2e: Debug with thin LTO for faster e2e builds

Environment Variables

  • VERSION: Image tag version (default: git SHA)
  • CARGO_TARGET: Cross-compilation target (default: x86_64-unknown-linux-gnu)
  • CARGO_RELEASE_PROFILE: Cargo profile for release builds (default: release)
  • E2E_LOGGING_LEVEL: Log filter for e2e tests (default: info,kaniop=debug,kaniop_webhook=debug)
  • E2E_TEST_THREADS: Parallel e2e test threads for make e2e-test (default: 16)
  • E2E_WAIT_TIMEOUT_SECONDS: Timeout for e2e wait conditions (default: 180)
  • E2E_EVENT_TIMEOUT_SECONDS: Timeout for waiting on Kubernetes events (default: 10)
  • E2E_EVENT_POLL_INTERVAL_MILLISECONDS: Poll interval for event checks (default: 1000)
  • KANIDM_DEV_YOLO=1: Required for e2e tests to prevent Kanidm client silent exit with dev profiles

© pando85, AGPL-3.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 .opencode/skills/kaniop-development of pando85/kaniop.

Open the folder on GitHubat commit 768ac0b

Compare with similar skills

Kaniop Development 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.

Kaniop Development compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kaniop Development this skillpando85/kaniop130—~3.1kAutomated safety check: PassAGPL-3.0
Must Gather Investigationscylladb/scylla-operator401—~2.4kAutomated safety check: PassApache-2.0
Run E2E Testkubernetes-sigs/cloud-provider-azure294—~3.8kAutomated safety check: PassApache-2.0
Debug E2E Pipelinekubernetes-sigs/cloud-provider-azure294—~3.4kAutomated safety check: PassApache-2.0
Unblock Dependabot PRkubernetes-sigs/cloud-provider-azure294—~1.5kAutomated safety check: PassApache-2.0
Kopiur Designhome-operations/kopiur113—~2.4kAutomated safety check: PassAGPL-3.0

Similar skills

  • Must Gather Investigation

    scylladb/scylla-operator

    Investigate failed e2e tests from Ginkgo JSON reports and must-gather artifacts, systematically analyzing logs, events, and resource states to identify root causes.

    401 GitHub stars~2.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Run E2E Test

    kubernetes-sigs/cloud-provider-azure

    Official

    Parse a Go e2e test from tests/e2e/, translate each step to kubectl and az CLI commands, and interactively replay the test against a live cluster.

    294 GitHub stars~3.8k tokensUpdated today
    Testing & QAAuto-check passed
  • Debug E2E Pipeline

    kubernetes-sigs/cloud-provider-azure

    Official

    Fetch and analyze Prow e2e pipeline failures for cloud-provider-azure.

    294 GitHub stars~3.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Unblock Dependabot PR

    kubernetes-sigs/cloud-provider-azure

    Official

    Diagnose and unblock failed Dependabot pull requests in cloud-provider-azure by closing Kubernetes minor-version dependency bumps, classifying CI failures, syncing Go modules, retesting quota-flaked…

    294 GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Kopiur Design

    home-operations/kopiur

    Design norms and locked decisions for the Kopiur Kopia-native Kubernetes backup operator (Rust/kube-rs).

    113 GitHub stars~2.4k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Tokf Run

    mpecan/tokf

    Compress verbose CLI output with tokf before returning results.

    199 GitHub stars~571 tokensUpdated today
    DevOps & CloudAuto-check passed

More from pando85/kaniop

  • Document Learnings

    pando85/kaniop

    Guidelines for documenting reusable patterns discovered during work.

    130 GitHub stars~501 tokensUpdated today
    Auto-check passed
  • Helm Chart

    pando85/kaniop

    Guidelines for modifying the Helm chart. An agent skill from pando85/kaniop.

    130 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Release

    pando85/kaniop

    Prepare and publish a new release. An agent skill from pando85/kaniop.

    130 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Grafana Dashboard

    pando85/kaniop

    Improve and validate the Kaniop Grafana dashboard against repository metrics and the grigri live cluster.

    130 GitHub stars~987 tokensUpdated today
    Auto-check passed

Works with

Questions about Kaniop Development

What does Kaniop Development do?

Kaniop architecture, Rust controller conventions, commands, testing, and repository workflows. Kaniop Development is an agent skill from pando85/kaniop. Kaniop architecture, Rust controller conventions, commands, testing, and repository workflows.

When should I use Kaniop Development?

Kaniop Development fits situations like: changing Kaniop source code; tasks that involve Container orchestration; tasks that involve End-to-end testing.

How do I install Kaniop Development in Claude Code?

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

How do I install Kaniop Development in Codex?

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

Can I use Kaniop Development 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 pando85/kaniop --skill kaniop-development -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kaniop-development, .gemini/skills/kaniop-development, .github/skills/kaniop-development and .opencode/skills/kaniop-development in your project.

What does Kaniop Development need to run?

Going by SKILL.md and its folder, Kaniop Development needs the command-line tools its instructions call (make, kubectl, cargo, helm and gh).

Does Kaniop Development access the network?

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

Is Kaniop Development safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Kaniop Development use?

Kaniop Development is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Kaniop Development use?

About 3.1k tokens (SKILL.md is roughly 12k 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 Kaniop Development?

Skills that share tags, products or a category with Kaniop Development: Must Gather Investigation (scylladb/scylla-operator, 401 stars), Run E2E Test (kubernetes-sigs/cloud-provider-azure, 294 stars), Debug E2E Pipeline (kubernetes-sigs/cloud-provider-azure, 294 stars) and Unblock Dependabot PR (kubernetes-sigs/cloud-provider-azure, 294 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kaniop Development?

pando85 (a GitHub user) maintains it in pando85/kaniop, which has 130 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 7, 2026.

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