agentsclimarketplace

Cisco network map

Skill bradmccloskey/claude-cisco-skills/cisco-network-map

Nine Claude Code skills for Cisco network automation: backup, config gen, discovery, QoS testing, security audit.

Install
npx -y skills add bradmccloskey/claude-cisco-skills --skill cisco-network-map

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 16 days oldThe repository was created 16 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Generate Python scripts that discover and map network topology using ping, traceroute, ARP, CDP, LLDP, and routing tables. Use when the user wants to discover devices, map network topology, visualize network diagrams, or build a network inventory from live discovery.

SKILL.md

6.2 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it

Cisco Network Discovery & Mapping Scripts

Write Python scripts that discover and map network topology from live devices. Follow these standards:

Discovery Methods

Ping Sweep

  • ICMP sweep across subnets to find live hosts
  • Use concurrent.futures or asyncio for parallel pings
  • Record response time and TTL (TTL helps identify device type/hop count)
  • Support CIDR input (e.g., 10.0.1.0/24) and ranges
  • Identify likely network devices vs endpoints by TTL values (64=Linux/endpoint, 128=Windows, 255=Cisco)

Traceroute

  • Trace paths between known endpoints to discover intermediate hops
  • Build hop-by-hop path maps
  • Identify asymmetric routing (trace both directions)
  • Detect multiple paths (ECMP) by running repeated traces
  • Record per-hop latency for path quality analysis

ARP Table Collection

  • Pull show ip arp from routers/L3 switches
  • Map IP addresses to MAC addresses
  • Identify MAC vendor (OUI lookup) to determine device manufacturer
  • Detect duplicate IPs or MAC flapping
  • Cross-reference with CAM/MAC address tables for port mapping

CDP (Cisco Discovery Protocol)

  • Pull show cdp neighbors detail from all Cisco devices
  • Extract: device ID, platform, IP, local/remote interface, software version, capabilities
  • Build adjacency graph from CDP data
  • Crawl the network: start at seed device, discover neighbors, SSH to each, repeat
  • Identify device roles from capabilities field (R=Router, S=Switch, T=Trans Bridge, etc.)

LLDP (Link Layer Discovery Protocol)

  • Pull show lldp neighbors detail for multi-vendor environments
  • Extract: system name, system description, management IP, port ID, capabilities
  • Use alongside CDP for complete visibility (non-Cisco devices only speak LLDP)
  • Parse TLVs for additional info (VLAN, power, link aggregation)

Routing Table Analysis

  • Pull show ip route from all L3 devices
  • Map all known subnets and next-hops
  • Build a subnet-level topology (which device owns which subnet)
  • Identify routing domains (OSPF areas, BGP AS numbers, EIGRP AS)
  • Detect default route paths and internet egress points
  • Pull show ip ospf neighbor, show ip bgp summary, show ip eigrp neighbors for protocol-level adjacency

Discovery Workflow

1. Start with seed device(s) or subnet
2. Ping sweep to find live hosts
3. SSH to seed device → collect CDP/LLDP neighbors
4. Crawl: SSH to each discovered neighbor → repeat CDP/LLDP collection
5. Collect ARP tables from all L3 devices found
6. Collect routing tables from all routers found
7. Run traceroutes between key endpoints
8. Correlate all data into unified topology model
9. Output: topology map, device inventory, subnet map

Data Model

# Build a graph-based topology model
# Nodes = devices (router, switch, firewall, endpoint)
# Edges = links (with interface names, speed, subnet)

class Device:
    hostname: str
    ip_addresses: list       # management + interface IPs
    platform: str            # e.g., "Cisco ISR 4451"
    device_type: str         # router, switch, firewall, endpoint
    software: str            # IOS version
    interfaces: list         # name, ip, mac, status, speed, neighbor
    discovered_via: str      # cdp, lldp, arp, ping, routing

class Link:
    source_device: str
    source_interface: str
    target_device: str
    target_interface: str
    subnet: str
    speed: str
    protocol: str            # cdp, lldp, or inferred

Network Crawl Safety

  • Maintain a visited set to avoid loops
  • Set a max hop depth (default: 10) to prevent runaway crawls
  • Allow include/exclude filters by IP range or hostname pattern
  • Respect rate limits (don't hammer devices with rapid SSH connects)
  • Add delay between device connections (configurable, default 1 second)
  • Set SSH timeout and retry limits
  • Support read-only mode (only show commands, never config changes)

Output Formats

Text Report

  • Device inventory table (hostname, IP, platform, IOS version)
  • Interface-to-interface adjacency list
  • Subnet map (which subnets on which devices)
  • Routing summary per device

Structured Data

  • JSON topology export (nodes + edges)
  • CSV device inventory
  • YAML topology for use with cisco-gns3 skill to rebuild in lab

Visual Diagram

  • Use graphviz (dot format) for topology diagrams
  • Use networkx + matplotlib for programmatic graph layout
  • Use draw.io XML export for editable diagrams
  • Label nodes with hostname and IP
  • Label edges with interface names and subnet
  • Color code by device type (routers=blue, switches=green, firewalls=red)
  • Group devices by site/subnet/routing domain

Libraries to Use

  • netmiko for SSH command execution
  • pyats + genie for structured show command parsing (preferred)
  • textfsm / ntc-templates as parsing alternative
  • scapy for custom ping/traceroute if ICMP from script host
  • subprocess for system ping/traceroute commands
  • ipaddress for subnet math
  • netaddr for MAC OUI vendor lookup
  • networkx for graph building and analysis
  • graphviz for diagram generation
  • matplotlib for visualization
  • concurrent.futures for parallel device polling
  • rich for progress bars and formatted console output
  • macvendors or OUI database for MAC-to-vendor resolution

Example Usage Patterns

Quick subnet scan

/cisco-network-map ping-sweep 10.0.0.0/24

Full crawl from seed device

/cisco-network-map crawl 192.168.1.1

Map routing topology

/cisco-network-map routing-topology R1,R2,R3

Generate diagram from collected data

/cisco-network-map diagram topology.json

Security Requirements

  • NEVER hardcode credentials
  • Use environment variables or .env files (gitignored)
  • Read-only operations only (no config commands)
  • Log all devices accessed and commands run
  • Support --dry-run to show what would be discovered without connecting

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 327,069. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.