automateyournetwork/netclaw/cml-packet-capture

Claude Code and agent skill by automateyournetwork/netclaw

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

CML packet capture — start, stop, download pcaps from CML lab links, integrate with Packet Buddy for analysis. Use when capturing packets in a CML lab, troubleshooting BGP or OSPF with packet analysis, or downloading pcap files for Wireshark review.

Install

npx vskill@latest install automateyournetwork/netclaw/cml-packet-capture

SKILL.md

The same SKILL.md was published earlier as automateyournetwork/netclaw/cml-packet-capture.

CML Packet Capture

MCP Server

  • Command: cml-mcp (pip-installed, stdio transport)
  • Requires: CML_URL, CML_USERNAME, CML_PASSWORD environment variables

Available Tools

Packet Capture Operations
ToolParametersWhat It Does
start_capturelab_id/lab_title, link_id, max_packets?, pcap_filter?Start capturing packets on a link
stop_capturelab_id/lab_title, link_idStop an active capture
get_capture_statuslab_id/lab_title, link_idCheck capture status (running, packet count)
download_capturelab_id/lab_title, link_id, file_path?Download the captured pcap file
list_captureslab_id/lab_titleList all active and completed captures in a lab

Workflow: Capture and Analyze (Full Pipeline)

When a user says "capture traffic between R1 and R2 and analyze it":

  1. Find the link: Use get_links (from cml-topology-builder) to find the link ID between R1 and R2
  2. Start capture: start_capture with optional filter (e.g., "icmp", "tcp port 179")
  3. Generate traffic: Tell the user to generate traffic (or use execute_command to ping)
  4. Stop capture: stop_capture after sufficient traffic is collected
  5. Download pcap: download_capture to save the pcap file locally
  6. Analyze with Packet Buddy: Hand off to the packet-analysis skill:
  • pcap_summary — overview
  • pcap_protocol_hierarchy — protocol breakdown
  • pcap_conversations — who talked to whom
  • pcap_expert_info — errors, retransmissions
  • pcap_filter — drill into specific traffic
  1. Report findings: Summarize the analysis in plain English

Workflow: Targeted Protocol Capture

When troubleshooting a specific protocol:

BGP Troubleshooting
1. start_capture with pcap_filter="tcp port 179"
2. Wait for BGP events (or trigger with clear ip bgp)
3. stop_capture
4. download_capture
5. Analyze: Look for OPEN, KEEPALIVE, UPDATE, NOTIFICATION messages
6. Check for: hold timer expiry, capability mismatch, prefix limit exceeded
OSPF Troubleshooting
1. start_capture with pcap_filter="ospf"
2. Wait for OSPF events (or trigger with clear ip ospf process)
3. stop_capture
4. download_capture
5. Analyze: Look for Hello, DBD, LSR, LSU, LSAck packets
6. Check for: area mismatch, auth failure, MTU mismatch, dead timer expiry
ICMP / Connectivity
1. start_capture (no filter, or pcap_filter="icmp")
2. execute_command on source node: "ping {destination}"
3. stop_capture
4. download_capture
5. Analyze: Look for echo request/reply, unreachable, TTL exceeded
6. Check for: asymmetric routing, ACL drops, MTU issues
Spanning Tree
1. start_capture with pcap_filter="stp"
2. Wait for STP convergence or trigger topology change
3. stop_capture
4. download_capture
5. Analyze: BPDUs, topology change notifications, root bridge elections

Capture Filters

CML uses BPF (Berkeley Packet Filter) syntax for capture filters:

FilterCaptures
icmpICMP (ping) traffic
tcp port 179BGP traffic
ospfOSPF traffic
tcp port 22SSH traffic
udp port 53DNS traffic
arpARP requests/replies
stpSpanning Tree BPDUs
tcp port 80 or tcp port 443HTTP/HTTPS traffic
host 10.0.0.1Traffic to/from specific host
net 10.0.0.0/24Traffic to/from specific subnet
vlan 100Traffic on VLAN 100

Workflow: Compare Before/After

When verifying a configuration change:

  1. Capture before: Start capture, collect baseline traffic
  2. Stop and download: Save as before.pcap
  3. Make the change: Apply configuration via cml-node-operations
  4. Capture after: Start new capture, collect post-change traffic
  5. Stop and download: Save as after.pcap
  6. Compare: Analyze both pcaps with Packet Buddy
  7. Report: Document the differences (e.g., "BGP converged in 3s after route-map change")

Integration with Packet Buddy

After downloading a pcap from CML, use these Packet Buddy tools for analysis:

StepPacket Buddy ToolPurpose
1pcap_summaryBig picture: packet count, duration, size
2pcap_protocol_hierarchyWhat protocols are present
3pcap_conversationsWho is talking to whom
4pcap_expert_infoErrors, warnings, retransmissions
5pcap_filterFocus on specific traffic
6pcap_packet_detailDeep dive into a single packet
7pcap_dns_queriesDNS resolution analysis
8pcap_http_requestsHTTP traffic analysis

Important Rules

  • Lab must be running — captures only work on links in a started lab
  • One capture per link — stop an existing capture before starting a new one
  • Use filters for busy links — unfiltered captures on high-traffic links can be large
  • Set max_packets — prevent runaway captures; 10000 packets is usually enough
  • Download before stopping — some CML versions clear the capture buffer on link state change
  • File naming: Save pcaps with descriptive names like r1-r2-bgp-capture.pcap
  • Record in GAIT — log captures and findings for audit trail

Failure Behavior

  • On a tool error (timeout, unreachable host, malformed response), report the failure and its error message directly to the user rather than fabricating or guessing at results.
  • For a confirmed read-only call, check connectivity and retry once if appropriate. For any call that changes state or sends a message, a timeout does not prove the action failed: inspect current state or delivery status before retrying, preserve the required approval/change gates, and do not repeat an action whose outcome is unknown.

Security

  • Security scanPassed, 82 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
674
Repository forks
189
7-day trend score
33

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/automateyournetwork/netclaw/cml-packet-capture/badge)](https://verified-skill.com/skills/automateyournetwork/netclaw/cml-packet-capture)

Something wrong with this skill or its page? Tell us.