Clab Lab Management logo

Clab Lab Management

Community
automateyournetwork
clab-lab-management

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.

Overview

Publisherautomateyournetwork
Repositorynetclaw
Skill nameclab-lab-management
Stars
680
Forks
189
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by automateyournetwork on GitHub. Read the source before you install it.

Installation

Install the Clab Lab Management AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/automateyournetwork/netclaw/tree/main/workspace/skills/clab-lab-management
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/automateyournetwork/netclaw.git /tmp/netclaw
mkdir -p .claude/skills
cp -r /tmp/netclaw/workspace/skills/clab-lab-management .claude/skills/clab-lab-management
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Clab Lab Management in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Clab Lab Management on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Clab Lab Management is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

ContainerLab Lab Management

MCP Server

  • Command: python3 -u $CLAB_MCP_SCRIPT (stdio transport)
  • Requires: CLAB_API_SERVER_URL, CLAB_API_USERNAME, CLAB_API_PASSWORD environment variables
  • Auto-authentication: Every tool call auto-authenticates — no explicit authenticate call needed

How to Call Tools

bash
python3 $MCP_CALL "python3 -u $CLAB_MCP_SCRIPT" <tool_name> '<args_json>'

Available Tools

ToolParametersWhat It Does
authenticateapiServerURL, username, passwordManual auth override (optional — auto-auth handles normal usage)
listLabsnoneList all labs on the ContainerLab server
deployLabtopologyContent (JSON object), reconfigure (bool)Deploy a new lab topology
inspectLablabName, details (bool)Get lab details, node status, management IPs
execCommandlabName, command, nodeName (optional)Execute a command on one or all nodes
destroyLablabName, cleanup (bool), graceful (bool)Destroy a lab and clean up resources

Workflow: Deploy a New Lab

When a user wants to create a containerized network lab:

  1. List existing labs: listLabs — check what's already running, avoid name conflicts
  2. Deploy topology: deployLab with a topology JSON object
  3. Inspect lab: inspectLab with details: true — verify success, get management IPs
  4. Execute commands: execCommand — run show commands to verify connectivity
  5. Report back: Tell the user the lab is ready with node names and management IPs

Example: 2-Node SR Linux Lab

bash
# 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"}'

Workflow: Lab Cleanup

When a user is done with a lab:

  1. Confirm with user: Ask before destroying
  2. Destroy lab: destroyLab with graceful: true and cleanup: true
  3. Record in GAIT: Log the destruction for audit trail
bash
python3 $MCP_CALL "python3 -u $CLAB_MCP_SCRIPT" destroyLab '{"labName":"srlinux-demo","cleanup":true,"graceful":true}'

Topology Design Guidance

ContainerLab topologies define nodes and links in a structured JSON format.

Supported Node Kinds

ContainerLab supports a wide range of network operating systems:

KindPlatformExample Image
cisco_iosxrCisco IOS XRios-xr/xrd-control-plane:latest
cisco_iosxeCisco IOS XE (Cat8000v)c8000v:latest
cisco_nxosCisco NX-OS (Nexus 9000v)n9kv:latest
cisco_ftdvCisco Firepower FTDvftdv:latest
nokia_srlinuxNokia SR Linuxghcr.io/nokia/srlinux:latest
ceosArista cEOSceos:latest
juniper_crpdJuniper cRPDcrpd:latest
frrFRRoutingfrrouting/frr:latest
linuxGeneric Linuxalpine:latest

For the full list, see the ContainerLab documentation.

Basic Topology Structure

json
{
  "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"]}
    ]
  }
}

Common Lab Patterns

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"

Integration with Other Skills

  • Use gait-session-tracking to record all lab operations in the audit trail
  • Use markmap-viz to visualize lab topologies as interactive mind maps
  • Use drawio-diagram for lab network diagrams

Important Rules

  • Lab-only operations — ContainerLab operations are lab-only. No ServiceNow CR gating required
  • GAIT audit mandatory — Record all lab operations in the GAIT audit trail
  • List before deploy — Always list existing labs before deploying to avoid name conflicts
  • Inspect after deploy — Always inspect after deployment to verify success and get management IPs
  • Graceful shutdown — Use graceful: true when destroying labs for clean node shutdown
  • Docker restart — If the ContainerLab API server runs in Docker and auth fails, the container may need a restart to pick up new Linux users

Error Handling

  • Auth fails (401): Check CLAB_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 user
  • Deploy fails: Check topology syntax — nodes must have valid kind and image fields. Use listLabs to check for name conflicts
  • Exec fails: Verify the lab is deployed via inspectLab. Check node name is correct
  • Destroy fails: Verify lab name via listLabs. If graceful shutdown times out, retry without graceful: true

Environment Variables

  • CLAB_API_SERVER_URL — ContainerLab API server URL (e.g., http://localhost:8080)
  • CLAB_API_USERNAME — API username (default: netclaw)
  • CLAB_API_PASSWORD — API password
  • CLAB_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)

Frequently asked questions

What does the Clab Lab Management AI skill do?

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.

Why use Clab Lab Management on TypingMind?

Because you install it once and use it with any model. Clab Lab Management is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Clab Lab Management in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/automateyournetwork/netclaw/tree/main/workspace/skills/clab-lab-management. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Clab Lab Management?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Clab Lab Management?

As many as you like. As long as a model supports skills, you can use Clab Lab Management with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Clab Lab Management AI skill free?

Yes. It is published on GitHub by automateyournetwork under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇