Skip to content

feat(agentic): Add Claude skills for local dev and testing - #491

Open
rgildein wants to merge 2 commits into
mainfrom
feat/agentic-skills
Open

feat(agentic): Add Claude skills for local dev and testing#491
rgildein wants to merge 2 commits into
mainfrom
feat/agentic-skills

Conversation

@rgildein

Copy link
Copy Markdown
Contributor

Add 3 skills for local dev and testing:

  1. netop-check: run lint, unit and gnmic tests with summary output
    • capable to reformat code if needed
  2. netop-setup: configure VM with all tools, k8s cluster and Nokia device with summary output
    • using colima to create VM, but can use another tools like multipass, ...
    • can be run without creating VM, for direct use on Linux machine
    • can omit creating device in containerlab if user provided connection to existing one
  3. netop-test: to run manual test
    • deploy custom CRDs and verify that configuration was properly set via gnmic

These three Claude Code skills provide a guided, repeatable developer workflow for testing the network-operator against real or simulated network devices — without needing to memorise the full toolchain commands.

Example usage:

❯ /netop-setup cisco device accessible on 127.0.0.1:57400 with user admin and password admin
...
⏺ Step 4: Check Cisco device reachability from VM — 127.0.0.1 inside the VM points to the VM itself, not the Mac host. Need the host gateway IP.

⏺ Bash(colima exec -p network-operator -- bash -c "
      HOST_IP=\$(ip route | awk '/default/ {print \$3}')…)
  ⎿  Mac host IP from VM: 192.168.5.2
     192.168.64.1
     bash: line 4: nc: command not found
     device NOT reachable

⏺ Bash(colima exec -p network-operator -- bash -c "
      HOST_IP=\$(ip route | awk '/default/ {print \$3; exit}')…)
  ⎿  Mac host IP from VM: 192.168.5.2
     debconf: delaying package configuration, since apt-utils is not installed
     Selecting previously unselected package netcat-openbsd.
     … +12 lines (ctrl+o to expand)

⏺ All done. Here's the summary:

  - Colima VM network-operator — arm64, 4 CPU, 8 GB, 60 GB, running
  - Kind cluster network-operator — Kubernetes v1.36.1, node Ready
  - cert-manager v1.18.2 — all deployments available
  - Cisco device — reachable from VM at 192.168.5.2:57400 (Mac host IP as seen from VM — use this instead of 127.0.0.1)

  Next step: run /netop-test with GNMI_TARGET=192.168.5.2:57400.

  Add 3 skills for local dev and testing:
  1. netop-check: run lint, unit and gnmic tests with summary output
     - capable to reformat code if needed
  2. netop-setup: configure VM with all tools, k8s cluster and Nokia device with summary output
     - using colima to create VM, but can use another tools like multipass, ...
     - can be run without creating VM, for direct use on Linux machine
     - can omit creating device in containerlab if user provided connection to existing one
  3. netop-test: to run manual test
     - deploy custom CRDs and verify that configuration was properly set via gnmic

Signed-off-by: Robert Gildein <rgildein@users.noreply.github.com>
@rgildein rgildein self-assigned this Aug 11, 2026
@rgildein rgildein mentioned this pull request Aug 11, 2026
@rgildein
rgildein marked this pull request as ready for review August 18, 2026 10:44
@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Aug 21, 2026
@hardikdr hardikdr added this to Roadmap Aug 21, 2026
which go || sudo snap install go --classic
which kubectl || sudo snap install kubectl --classic
which k || sudo snap alias kubectl k
which gnmic || bash -c "$(curl -sL https://get-gnmic.openconfig.net)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add Tilt according to https://docs.tilt.dev/install.html

Suggested change
which gnmic || bash -c "$(curl -sL https://get-gnmic.openconfig.net)"
which gnmic || bash -c "$(curl -sL https://get-gnmic.openconfig.net)"
curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.sh | bash

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some/most of these checks are already part of the AGENTS.md in

**After editing any `*.go` files:**
```bash
make fmt # Format code
make lint # Lint code style
make test # Run unit tests (uses envtest: real K8s API + etcd)
```
Tests use **Ginkgo + Gomega** (BDD style) for controller and webhook tests — check `suite_test.go` in each package for setup.
All other packages use the **standard library `testing` package** with table-driven tests where appropriate.
- Keep test files focused — only necessary cases, no exhaustive permutations
- Test helpers stay in the same file as their tests
**All of `make fmt lint test` must pass before work is considered complete.**
Shall we maybe extend the AGENTS.md to also contain reference to the gnmi tests?

@@ -0,0 +1,249 @@
---
name: netop-setup
description: One-time setup of the network-operator test environment. Provisions a colima VM, creates a kind cluster with cert-manager, and deploys a containerlab network device. Use this before the first test session or after a full teardown. Say "no vm" or "skip vm" to skip the VM provisioning step.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm quite hesitant to recommend a VM-based setup for development. Our current development setup is based on Tilt in https://github.com/ironcore-dev/network-operator/blob/main/Tiltfile and I would rather leave it up to the contributor on where/how to run this. Not everyone is on Mac, so people might just run containerlab locally or through their preferred means.

Comment on lines +105 to +125
```bash
make kind
make kind-create
```

Wait for node ready:
```bash
kubectl wait --for=condition=Ready node --all --timeout=120s
```

Install cert-manager:
```bash
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.18.2/cert-manager.yaml
kubectl wait --for=condition=Available deployment --all -n cert-manager --timeout=120s
```

Verify:
```bash
kubectl get nodes
kubectl get pods -n cert-manager
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this is done through make tilt-up automatically.

@@ -0,0 +1,279 @@
---
name: netop-test
description: Build and deploy the network-operator, apply custom resources, and validate configuration via gnmic. Use after /netop-setup to run the dev/test loop against a real containerlab device. Also handles kind cluster and VM cleanup. Say "no vm" or "local" to run commands on the host machine instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, isn't this the Development Workflow already described in the AGENTS.md?

## Development Workflow
Always run against a dedicated development cluster (e.g. Kind, minikube), never a real dev/prod cluster. Always pass `--context` explicitly to kubectl commands.
```bash
# Build the controller image
make docker-build IMG=controller:latest
# Make the image available to the cluster (if using kind)
kind load docker-image controller:latest --name network-operator
# Deploy the controller
make deploy IMG=controller:latest KUBECTL="kubectl --context <context>"
# Apply sample resources
kubectl --context <context> apply -f config/samples/<resource>
# Inspect controller logs
kubectl --context <context> logs -n network-operator-system deployment/network-operator-controller-manager -c manager -f
```

Comment thread README.md

## Claude Code Skills

This project includes [Claude Code](https://claude.ai/code) skills for interactive development workflows. Skills are located in `.claude/skills/` and invoked via slash commands.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we rather target the universal .agents patterns (while symlinking for claude code compatability)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/switch-automation Automation processes for network switch management and operations. size/XL

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants