Cisco netauto
Generate Python scripts for Cisco network automation using RESTCONF, NETCONF, DNA Center, or Meraki APIs. Use when the user wants to automate Cisco devices using APIs and SDN controllers rather than CLI/SSH.From its SKILL.md
npx -y skills add bradmccloskey/claude-cisco-skills --skill cisco-netautoAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 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.
SKILL.md
3.1 KB, 700 tokens by cl100k_base, as published. Nobody here has run it
Cisco Network Automation (API/SDN) Scripts
Write Python scripts for API-driven Cisco network automation. Follow these standards:
Supported APIs
RESTCONF (IOS-XE)
- Base URL:
https://{device}/restconf/data/ - YANG models:
Cisco-IOS-XE-native,ietf-interfaces,ietf-routing - Use for: interface config, routing, ACLs, system settings
- Content-Type:
application/yang-data+json
NETCONF (IOS-XE / NX-OS)
- Port 830, SSH subsystem
- Use
ncclientlibrary - Operations:
get,get-config,edit-config,commit - Filter with XPATH or subtree XML
DNA Center
- Token auth:
POST /dna/system/api/v1/auth/token - Device inventory:
GET /dna/intent/api/v1/network-device - Command runner:
POST /dna/intent/api/v1/network-device-poller/cli/read-request - Template deployment, path trace, client health
Meraki Dashboard API
- Base URL:
https://api.meraki.com/api/v1/ - API key via header:
X-Cisco-Meraki-API-Key - Organizations, networks, devices, SSIDs, VLANs
Libraries to Use
requestsfor REST APIs (RESTCONF, DNA Center, Meraki)ncclientfor NETCONFxmltodictfor XML parsingmeraki(official SDK) for Merakidnacentersdkfor DNA Centeryang-suitereferences for YANG model explorationurllib3(disable warnings for lab self-signed certs)
Script Patterns
RESTCONF Example Structure
import requests
import urllib3
urllib3.disable_warnings()
BASE_URL = "https://{host}/restconf/data"
HEADERS = {
"Accept": "application/yang-data+json",
"Content-Type": "application/yang-data+json"
}
def get_interfaces(host, auth):
url = f"https://{host}/restconf/data/ietf-interfaces:interfaces"
resp = requests.get(url, headers=HEADERS, auth=auth, verify=False)
resp.raise_for_status()
return resp.json()
NETCONF Example Structure
from ncclient import manager
def get_running_config(host, username, password):
with manager.connect(
host=host, port=830,
username=username, password=password,
hostkey_verify=False
) as m:
config = m.get_config(source="running")
return config.xml
Best Practices
- Always handle rate limiting (especially Meraki: 10 req/sec)
- Use session objects for connection reuse
- Implement retry logic with exponential backoff
- Verify API call success with status codes
- Support
--dry-runflag that shows payload without sending - For lab environments, disable TLS verification with
verify=Falsebut log a warning - For production, use proper certificate validation
Security Requirements
- NEVER hardcode API keys, tokens, or passwords
- Use environment variables or
.envfiles (gitignored) - Rotate tokens appropriately (DNA Center tokens expire)
- Log API calls but mask credentials in output
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.