workspace/skills/clab-lab-management/SKILL.md
ContainerLab network lab lifecycle management — authenticate, list, deploy, inspect, execute commands on, and destroy containerized network labs via the ContainerLab API. Use when deploying containerized network labs, spinning up SR Linux or cEOS topologies, running commands on lab nodes, or tearing down test environments.
npx skillsauth add automateyournetwork/netclaw clab-lab-managementInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
python3 -u $CLAB_MCP_SCRIPT (stdio transport)CLAB_API_SERVER_URL, CLAB_API_USERNAME, CLAB_API_PASSWORD environment variablesauthenticate call neededpython3 $MCP_CALL "python3 -u $CLAB_MCP_SCRIPT" <tool_name> '<args_json>'
| Tool | Parameters | What It Does |
|------|-----------|-------------|
| authenticate | apiServerURL, username, password | Manual auth override (optional — auto-auth handles normal usage) |
| listLabs | none | List all labs on the ContainerLab server |
| deployLab | topologyContent (JSON object), reconfigure (bool) | Deploy a new lab topology |
| inspectLab | labName, details (bool) | Get lab details, node status, management IPs |
| execCommand | labName, command, nodeName (optional) | Execute a command on one or all nodes |
| destroyLab | labName, cleanup (bool), graceful (bool) | Destroy a lab and clean up resources |
When a user wants to create a containerized network lab:
listLabs — check what's already running, avoid name conflictsdeployLab with a topology JSON objectinspectLab with details: true — verify success, get management IPsexecCommand — run show commands to verify connectivity# List existing labs
python3 $MCP_CALL "python3 -u $CLAB_MCP_SCRIPT" listLabs '{}'
# Deploy
python3 $MCP_CALL "python3 -u $CLAB_MCP_SCRIPT" deployLab '{"topologyContent":{"name":"srlinux-demo","topology":{"nodes":{"srl1":{"kind":"nokia_srlinux","image":"ghcr.io/nokia/srlinux:latest","type":"ixrd2l"},"srl2":{"kind":"nokia_srlinux","image":"ghcr.io/nokia/srlinux:latest","type":"ixrd2l"}},"links":[{"endpoints":["srl1:e1-1","srl2:e1-1"]},{"endpoints":["srl1:e1-2","srl2:e1-2"]}]}}}'
# Inspect
python3 $MCP_CALL "python3 -u $CLAB_MCP_SCRIPT" inspectLab '{"labName":"srlinux-demo","details":true}'
# Execute command
python3 $MCP_CALL "python3 -u $CLAB_MCP_SCRIPT" execCommand '{"labName":"srlinux-demo","nodeName":"srl1","command":"show version"}'
When a user is done with a lab:
destroyLab with graceful: true and cleanup: truepython3 $MCP_CALL "python3 -u $CLAB_MCP_SCRIPT" destroyLab '{"labName":"srlinux-demo","cleanup":true,"graceful":true}'
ContainerLab topologies define nodes and links in a structured JSON format.
ContainerLab supports a wide range of network operating systems:
| Kind | Platform | Example Image |
|------|----------|---------------|
| cisco_iosxr | Cisco IOS XR | ios-xr/xrd-control-plane:latest |
| cisco_iosxe | Cisco IOS XE (Cat8000v) | c8000v:latest |
| cisco_nxos | Cisco NX-OS (Nexus 9000v) | n9kv:latest |
| cisco_ftdv | Cisco Firepower FTDv | ftdv:latest |
| nokia_srlinux | Nokia SR Linux | ghcr.io/nokia/srlinux:latest |
| ceos | Arista cEOS | ceos:latest |
| juniper_crpd | Juniper cRPD | crpd:latest |
| frr | FRRouting | frrouting/frr:latest |
| linux | Generic Linux | alpine:latest |
For the full list, see the ContainerLab documentation.
{
"name": "lab-name",
"topology": {
"nodes": {
"node1": {
"kind": "nokia_srlinux",
"image": "ghcr.io/nokia/srlinux:latest"
},
"node2": {
"kind": "nokia_srlinux",
"image": "ghcr.io/nokia/srlinux:latest"
}
},
"links": [
{"endpoints": ["node1:e1-1", "node2:e1-1"]}
]
}
}
Multi-vendor lab:
"Deploy a 4-node lab:
- 2 x SR Linux switches (leaf1, leaf2)
- 1 x FRR router (spine1)
- 1 x Linux host (client1)
- leaf1 and leaf2 connected to spine1
- client1 connected to leaf1"
Spine-leaf fabric:
"Build a 2-spine, 4-leaf SR Linux fabric:
- Full mesh between spines and leaves
- iBGP between all nodes"
graceful: true when destroying labs for clean node shutdownCLAB_API_SERVER_URL, CLAB_API_USERNAME, CLAB_API_PASSWORD in ~/.openclaw/.env. If the API server runs in Docker, restart the container after creating the Linux userkind and image fields. Use listLabs to check for name conflictsinspectLab. Check node name is correctlistLabs. If graceful shutdown times out, retry without graceful: trueCLAB_API_SERVER_URL — ContainerLab API server URL (e.g., http://localhost:8080)CLAB_API_USERNAME — API username (default: netclaw)CLAB_API_PASSWORD — API passwordCLAB_MCP_SCRIPT — Path to the Python MCP server script (set by install.sh)MCP_CALL — Path to mcp-call.py wrapper (set by install.sh)testing
Human-in-the-loop escalation via HumanRail — route low-confidence agent decisions, pre-destructive operation approvals, and ambiguous incident tickets to real human engineers. Human answers are verified and returned as structured output. Workers are paid via Lightning Network. Use when the agent is uncertain, when a destructive change needs explicit human sign-off beyond a ServiceNow CR, or when an ambiguous ticket requires human triage before automated handling.
testing
Manage EVE-NG node lifecycle. Use when listing nodes, checking runtime state, creating or deleting nodes, starting or stopping nodes or whole labs, verifying node details, or wiping node NVRAM back to factory defaults.
development
Manage EVE-NG labs and platform inventory. Use when listing labs, checking lab metadata, creating or deleting labs, importing or exporting lab archives, checking EVE-NG health or auth, or verifying available node images before build work.
tools
Execute live CLI commands on running EVE-NG nodes over telnet console. Use when running show commands, making live config changes, verifying protocol state, testing connectivity, checking console readiness, or interacting with IOS, Junos, VPCS, EOS, or NX-OS nodes.