feat(agentic): Add Claude skills for local dev and testing - #491
feat(agentic): Add Claude skills for local dev and testing#491rgildein wants to merge 4 commits into
Conversation
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>
| 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)" |
There was a problem hiding this comment.
Please add Tilt according to https://docs.tilt.dev/install.html
| 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 |
There was a problem hiding this comment.
After discussion I removed usage of VM and all commands are run locally, only containerlab is run in VM. So all installation is done locally by Makefile.
There was a problem hiding this comment.
Some/most of these checks are already part of the AGENTS.md in
Lines 37 to 51 in c5f5b87
There was a problem hiding this comment.
True, but here you can ask agent to do it for you and provide summary results.
| @@ -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. | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
That's why they can go with no-vm option. I'm not using tilt, because for me it's not intuitive and it's UX and I want to run command and check result via terminal.
| ```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 | ||
| ``` |
There was a problem hiding this comment.
All of this is done through make tilt-up automatically.
There was a problem hiding this comment.
Not really, because if you want to custom device outside of your docker it's not possible (at least I did not found it) + the tilt is doing some automation, but I want to be able to validate against the device that is was really properly configured not only check if resource is green.
| @@ -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. | |||
There was a problem hiding this comment.
Again, isn't this the Development Workflow already described in the AGENTS.md?
Lines 59 to 78 in c5f5b87
|
|
||
| ## 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. |
There was a problem hiding this comment.
Should we rather target the universal .agents patterns (while symlinking for claude code compatability)?
There was a problem hiding this comment.
You are right I did not know about this, and it's better for Claude.
a1f3c49 to
9543633
Compare
One skills used for setting containerlab envirenment and another for running all local tests + test against real device. Signed-off-by: Robert Gildein <rgildein@users.noreply.github.com>
eb16c5f to
58863bb
Compare
Skills
containerlab- skill to configure containerlab test env.netop- skill to test current changesContainerlab skill
This skill is used to configure test device with containerlab, either on colima VM or on remote VM (the example below).
Claude responses
Manual Validation:
Netop skill
Netop check (Phase 1)
Claude responses
Netop test (Phase 2)
This skill is used to validate any changes in code by running local tests with proper summary from it or test against real device (example below).
Claude responses
Manual validations after tests.