[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79PJ0CKSR8RX9ECH4SQHSR6":3,"skill-same:01M79PJ0CKSR8RX9ECH4SQHSR6":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":14,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M79PJ0CKSR8RX9ECH4SQHSR6","network-config-validation",null,"Pre-deployment checks for router and switch configuration, including dangerous commands, duplicate addresses, subnet overlaps, stale references, management-plane risk, and IOS-style security hygiene. Use when reviewing a router or switch configuration before deployment.","JunMystery\u002FAgent-Guidance","JunMystery","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F161468934?v=4","01M79MTMV8F0BY8NK1A92RA8A0","Jun","01M79MTMWCFBKPHN5B25E6V20B",0,"MIT","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fnetwork-config-validation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: network-config-validation\ndescription: Pre-deployment checks for router and switch configuration, including dangerous commands, duplicate addresses, subnet overlaps, stale references, management-plane risk, and IOS-style security hygiene. Use when reviewing a router or switch configuration before deployment.\nmetadata:\n  origin: community\n---\n\n# Network Config Validation\n\nUse this skill to review network configuration before a change window or before\nan automation run touches production devices.\n\n## When to Use\n\n- Reviewing Cisco IOS or IOS-XE style snippets before deployment.\n- Auditing generated config from scripts or templates.\n- Looking for dangerous commands, duplicate IP addresses, or subnet overlaps.\n- Checking whether ACLs, route-maps, prefix-lists, or line policies are referenced\n  but not defined.\n- Building lightweight pre-flight scripts for network automation.\n\n## How It Works\n\nTreat config validation as layered evidence, not as a complete parser. Regex\nchecks are useful for pre-flight warnings, but final approval still needs a\nnetwork engineer to review intent, platform syntax, and rollback steps.\n\nValidate in this order:\n\n1. Destructive commands.\n2. Credential and management-plane exposure.\n3. Duplicate addresses and overlapping subnets.\n4. Stale references to ACLs, route-maps, prefix-lists, and interfaces.\n5. Operational hygiene such as NTP, timestamps, remote logging, and banners.\n\n## Dangerous Command Detection\n\n```python\nimport re\n\nDANGEROUS_PATTERNS: list[tuple[re.Pattern[str], str]] = [\n    (re.compile(r\"\\breload\\b\", re.I), \"reload causes downtime\"),\n    (re.compile(r\"\\berase\\s+(startup|nvram|flash)\", re.I), \"erases persistent storage\"),\n    (re.compile(r\"\\bformat\\b\", re.I), \"formats a device filesystem\"),\n    (re.compile(r\"\\bno\\s+router\\s+(bgp|ospf|eigrp)\\b\", re.I), \"removes a routing process\"),\n    (re.compile(r\"\\bno\\s+interface\\s+\\S+\", re.I), \"removes interface configuration\"),\n    (re.compile(r\"\\baaa\\s+new-model\\b\", re.I), \"changes authentication behavior\"),\n    (re.compile(r\"\\bcrypto\\s+key\\s+(zeroize|generate)\\b\", re.I), \"changes device SSH keys\"),\n]\n\ndef find_dangerous_commands(lines: list[str]) -> list[dict[str, str | int]]:\n    findings = []\n    for line_number, line in enumerate(lines, start=1):\n        stripped = line.strip()\n        for pattern, reason in DANGEROUS_PATTERNS:\n            if pattern.search(stripped):\n                findings.append({\n                    \"line\": line_number,\n                    \"command\": stripped,\n                    \"reason\": reason,\n                })\n    return findings\n```\n\n## Duplicate IPs And Subnet Overlaps\n\n```python\nimport ipaddress\nimport re\nfrom collections import Counter\n\nIP_ADDRESS_RE = re.compile(\n    r\"^\\s*ip address\\s+\"\n    r\"(?P\u003Cip>\\d{1,3}(?:\\.\\d{1,3}){3})\\s+\"\n    r\"(?P\u003Cmask>\\d{1,3}(?:\\.\\d{1,3}){3})\\b\",\n    re.I | re.M,\n)\n\ndef extract_interfaces(config: str) -> list[dict[str, str]]:\n    results = []\n    current = None\n    for line in config.splitlines():\n        if line.startswith(\"interface \"):\n            current = line.split(maxsplit=1)[1]\n            continue\n        match = IP_ADDRESS_RE.match(line)\n        if current and match:\n            ip = match.group(\"ip\")\n            mask = match.group(\"mask\")\n            network = ipaddress.ip_interface(f\"{ip}\u002F{mask}\").network\n            results.append({\"interface\": current, \"ip\": ip, \"network\": str(network)})\n    return results\n\ndef find_duplicate_ips(config: str) -> list[str]:\n    ips = [entry[\"ip\"] for entry in extract_interfaces(config)]\n    counts = Counter(ips)\n    return sorted(ip for ip, count in counts.items() if count > 1)\n\ndef find_subnet_overlaps(config: str) -> list[tuple[str, str]]:\n    networks = [ipaddress.ip_network(entry[\"network\"]) for entry in extract_interfaces(config)]\n    overlaps = []\n    for index, left in enumerate(networks):\n        for right in networks[index + 1:]:\n            if left.overlaps(right):\n                overlaps.append((str(left), str(right)))\n    return overlaps\n```\n\n## Management-Plane Checks\n\nParse VTY blocks by section so access-class checks do not spill across unrelated\nlines.\n\n```python\nimport re\n\ndef iter_blocks(config: str, starts_with: str) -> list[str]:\n    blocks = []\n    current: list[str] = []\n    for line in config.splitlines():\n        if line.startswith(starts_with):\n            if current:\n                blocks.append(\"\\n\".join(current))\n            current = [line]\n            continue\n        if current:\n            if line and not line.startswith(\" \"):\n                blocks.append(\"\\n\".join(current))\n                current = []\n            else:\n                current.append(line)\n    if current:\n        blocks.append(\"\\n\".join(current))\n    return blocks\n\ndef check_vty_blocks(config: str) -> list[str]:\n    issues = []\n    for block in iter_blocks(config, \"line vty\"):\n        if re.search(r\"transport\\s+input\\s+.*telnet\", block, re.I):\n            issues.append(\"VTY allows Telnet; require SSH only.\")\n        if not re.search(r\"\\baccess-class\\s+\\S+\\s+in\\b\", block, re.I):\n            issues.append(\"VTY block has no inbound access-class source restriction.\")\n        if not re.search(r\"\\bexec-timeout\\s+\\d+\\s+\\d+\\b\", block, re.I):\n            issues.append(\"VTY block has no explicit exec-timeout.\")\n    return issues\n```\n\n## Security Hygiene Checks\n\n```python\nSECURITY_PATTERNS = [\n    (re.compile(r\"\\bsnmp-server community\\s+(public|private)\\b\", re.I),\n     \"default SNMP community configured\"),\n    (re.compile(r\"\\bsnmp-server community\\s+\\S+\", re.I),\n     \"SNMPv2 community string configured; prefer SNMPv3 authPriv\"),\n    (re.compile(r\"\\bip ssh version 1\\b\", re.I),\n     \"SSH version 1 enabled\"),\n    (re.compile(r\"\\benable password\\b\", re.I),\n     \"enable password is present; use enable secret\"),\n    (re.compile(r\"\\busername\\s+\\S+\\s+password\\b\", re.I),\n     \"local username uses password instead of secret\"),\n]\n\nBEST_PRACTICE_PATTERNS = [\n    (re.compile(r\"\\bntp server\\b\", re.I), \"NTP server\"),\n    (re.compile(r\"\\bservice timestamps\\b\", re.I), \"log timestamps\"),\n    (re.compile(r\"\\blogging\\s+\\S+\", re.I), \"logging destination or buffer\"),\n    (re.compile(r\"\\bsnmp-server group\\s+\\S+\\s+v3\\s+priv\\b\", re.I), \"SNMPv3 authPriv group\"),\n    (re.compile(r\"\\bbanner\\s+(login|motd)\\b\", re.I), \"login banner\"),\n]\n\ndef check_security(config: str) -> list[str]:\n    return [message for pattern, message in SECURITY_PATTERNS if pattern.search(config)]\n\ndef check_missing_hygiene(config: str) -> list[str]:\n    return [\n        f\"Missing {description}\"\n        for pattern, description in BEST_PRACTICE_PATTERNS\n        if not pattern.search(config)\n    ]\n```\n\n## Examples\n\n### Change-Window Preflight\n\n1. Run dangerous-command checks on the exact snippet to be pasted.\n2. Run duplicate IP and subnet overlap checks against the full candidate config.\n3. Confirm every referenced ACL, route-map, and prefix-list exists.\n4. Confirm rollback commands and out-of-band access before any management-plane\n   change.\n\n### Automation Preflight\n\nUse validation as a blocking gate before Netmiko, NAPALM, Ansible, or vendor API\nautomation pushes a generated config. Fail closed on dangerous commands and\ncredentials. Warn on best-practice gaps that are outside the change scope.\n\n## Anti-Patterns\n\n- Treating regex validation as a device parser.\n- Applying generated config without a dry-run diff.\n- Recommending SNMPv2 community strings as a monitoring requirement.\n- Checking VTY blocks with regex that can accidentally span unrelated sections.\n- Testing firewall behavior by disabling ACLs instead of reading counters\u002Flogs.\n\n## See Also\n\n- Agent: `network-config-reviewer`\n- Agent: `network-troubleshooter`\n- Skill: `network-interface-health`\n","# Network Config Validation\n\nUse this skill to review network configuration before a change window or before\nan automation run touches production devices.\n\n## When to Use\n\n- Reviewing Cisco IOS or IOS-XE style snippets before deployment.\n- Auditing generated config from scripts or templates.\n- Looking for dangerous commands, duplicate IP addresses, or subnet overlaps.\n- Checking whether ACLs, route-maps, prefix-lists, or line policies are referenced\n  but not defined.\n- Building lightweight pre-flight scripts for network automation.\n\n## How It Works\n\nTreat config validation as layered evidence, not as a complete parser. Regex\nchecks are useful for pre-flight warnings, but final approval still needs a\nnetwork engineer to review intent, platform syntax, and rollback steps.\n\nValidate in this order:\n\n1. Destructive commands.\n2. Credential and management-plane exposure.\n3. Duplicate addresses and overlapping subnets.\n4. Stale references to ACLs, route-maps, prefix-lists, and interfaces.\n5. Operational hygiene such as NTP, timestamps, remote logging, and banners.\n\n## Dangerous Command Detection\n\n```python\nimport re\n\nDANGEROUS_PATTERNS: list[tuple[re.Pattern[str], str]] = [\n    (re.compile(r\"\\breload\\b\", re.I), \"reload causes downtime\"),\n    (re.compile(r\"\\berase\\s+(startup|nvram|flash)\", re.I), \"erases persistent storage\"),\n    (re.compile(r\"\\bformat\\b\", re.I), \"formats a device filesystem\"),\n    (re.compile(r\"\\bno\\s+router\\s+(bgp|ospf|eigrp)\\b\", re.I), \"removes a routing process\"),\n    (re.compile(r\"\\bno\\s+interface\\s+\\S+\", re.I), \"removes interface configuration\"),\n    (re.compile(r\"\\baaa\\s+new-model\\b\", re.I), \"changes authentication behavior\"),\n    (re.compile(r\"\\bcrypto\\s+key\\s+(zeroize|generate)\\b\", re.I), \"changes device SSH keys\"),\n]\n\ndef find_dangerous_commands(lines: list[str]) -> list[dict[str, str | int]]:\n    findings = []\n    for line_number, line in enumerate(lines, start=1):\n        stripped = line.strip()\n        for pattern, reason in DANGEROUS_PATTERNS:\n            if pattern.search(stripped):\n                findings.append({\n                    \"line\": line_number,\n                    \"command\": stripped,\n                    \"reason\": reason,\n                })\n    return findings\n```\n\n## Duplicate IPs And Subnet Overlaps\n\n```python\nimport ipaddress\nimport re\nfrom collections import Counter\n\nIP_ADDRESS_RE = re.compile(\n    r\"^\\s*ip address\\s+\"\n    r\"(?P\u003Cip>\\d{1,3}(?:\\.\\d{1,3}){3})\\s+\"\n    r\"(?P\u003Cmask>\\d{1,3}(?:\\.\\d{1,3}){3})\\b\",\n    re.I | re.M,\n)\n\ndef extract_interfaces(config: str) -> list[dict[str, str]]:\n    results = []\n    current = None\n    for line in config.splitlines():\n        if line.startswith(\"interface \"):\n            current = line.split(maxsplit=1)[1]\n            continue\n        match = IP_ADDRESS_RE.match(line)\n        if current and match:\n            ip = match.group(\"ip\")\n            mask = match.group(\"mask\")\n            network = ipaddress.ip_interface(f\"{ip}\u002F{mask}\").network\n            results.append({\"interface\": current, \"ip\": ip, \"network\": str(network)})\n    return results\n\ndef find_duplicate_ips(config: str) -> list[str]:\n    ips = [entry[\"ip\"] for entry in extract_interfaces(config)]\n    counts = Counter(ips)\n    return sorted(ip for ip, count in counts.items() if count > 1)\n\ndef find_subnet_overlaps(config: str) -> list[tuple[str, str]]:\n    networks = [ipaddress.ip_network(entry[\"network\"]) for entry in extract_interfaces(config)]\n    overlaps = []\n    for index, left in enumerate(networks):\n        for right in networks[index + 1:]:\n            if left.overlaps(right):\n                overlaps.append((str(left), str(right)))\n    return overlaps\n```\n\n## Management-Plane Checks\n\nParse VTY blocks by section so access-class checks do not spill across unrelated\nlines.\n\n```python\nimport re\n\ndef iter_blocks(config: str, starts_with: str) -> list[str]:\n    blocks = []\n    current: list[str] = []\n    for line in config.splitlines():\n        if line.startswith(starts_with):\n            if current:\n                blocks.append(\"\\n\".join(current))\n            current = [line]\n            continue\n        if current:\n            if line and not line.startswith(\" \"):\n                blocks.append(\"\\n\".join(current))\n                current = []\n            else:\n                current.append(line)\n    if current:\n        blocks.append(\"\\n\".join(current))\n    return blocks\n\ndef check_vty_blocks(config: str) -> list[str]:\n    issues = []\n    for block in iter_blocks(config, \"line vty\"):\n        if re.search(r\"transport\\s+input\\s+.*telnet\", block, re.I):\n            issues.append(\"VTY allows Telnet; require SSH only.\")\n        if not re.search(r\"\\baccess-class\\s+\\S+\\s+in\\b\", block, re.I):\n            issues.append(\"VTY block has no inbound access-class source restriction.\")\n        if not re.search(r\"\\bexec-timeout\\s+\\d+\\s+\\d+\\b\", block, re.I):\n            issues.append(\"VTY block has no explicit exec-timeout.\")\n    return issues\n```\n\n## Security Hygiene Checks\n\n```python\nSECURITY_PATTERNS = [\n    (re.compile(r\"\\bsnmp-server community\\s+(public|private)\\b\", re.I),\n     \"default SNMP community configured\"),\n    (re.compile(r\"\\bsnmp-server community\\s+\\S+\", re.I),\n     \"SNMPv2 community string configured; prefer SNMPv3 authPriv\"),\n    (re.compile(r\"\\bip ssh version 1\\b\", re.I),\n     \"SSH version 1 enabled\"),\n    (re.compile(r\"\\benable password\\b\", re.I),\n     \"enable password is present; use enable secret\"),\n    (re.compile(r\"\\busername\\s+\\S+\\s+password\\b\", re.I),\n     \"local username uses password instead of secret\"),\n]\n\nBEST_PRACTICE_PATTERNS = [\n    (re.compile(r\"\\bntp server\\b\", re.I), \"NTP server\"),\n    (re.compile(r\"\\bservice timestamps\\b\", re.I), \"log timestamps\"),\n    (re.compile(r\"\\blogging\\s+\\S+\", re.I), \"logging destination or buffer\"),\n    (re.compile(r\"\\bsnmp-server group\\s+\\S+\\s+v3\\s+priv\\b\", re.I), \"SNMPv3 authPriv group\"),\n    (re.compile(r\"\\bbanner\\s+(login|motd)\\b\", re.I), \"login banner\"),\n]\n\ndef check_security(config: str) -> list[str]:\n    return [message for pattern, message in SECURITY_PATTERNS if pattern.search(config)]\n\ndef check_missing_hygiene(config: str) -> list[str]:\n    return [\n        f\"Missing {description}\"\n        for pattern, description in BEST_PRACTICE_PATTERNS\n        if not pattern.search(config)\n    ]\n```\n\n## Examples\n\n### Change-Window Preflight\n\n1. Run dangerous-command checks on the exact snippet to be pasted.\n2. Run duplicate IP and subnet overlap checks against the full candidate config.\n3. Confirm every referenced ACL, route-map, and prefix-list exists.\n4. Confirm rollback commands and out-of-band access before any management-plane\n   change.\n\n### Automation Preflight\n\nUse validation as a blocking gate before Netmiko, NAPALM, Ansible, or vendor API\nautomation pushes a generated config. Fail closed on dangerous commands and\ncredentials. Warn on best-practice gaps that are outside the change scope.\n\n## Anti-Patterns\n\n- Treating regex validation as a device parser.\n- Applying generated config without a dry-run diff.\n- Recommending SNMPv2 community strings as a monitoring requirement.\n- Checking VTY blocks with regex that can accidentally span unrelated sections.\n- Testing firewall behavior by disabling ACLs instead of reading counters\u002Flogs.\n\n## See Also\n\n- Agent: `network-config-reviewer`\n- Agent: `network-troubleshooter`\n- Skill: `network-interface-health`\n",{"name":5,"metadata":24,"description":7},{"origin":25},"community","main","5d0a87185c0e172c3901e2a6e5916b6d544b8b94","skills\u002Fnetwork-config-validation","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance","https:\u002F\u002Fgithub.com\u002FJunMystery","AI is the typist, I am the architect. Building efficient, secure, and user-centric products through disciplined AI prompt engineering.","2026-11-13 17:41:25",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add JunMystery\u002FAgent-Guidance --skill network-config-validation",{"tool":39,"command":40},"bunx","bunx skills add JunMystery\u002FAgent-Guidance --skill network-config-validation",{"tool":42,"command":43},"pnpm","pnpm dlx skills add JunMystery\u002FAgent-Guidance --skill network-config-validation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fnetwork-config-validation\u002FSKILL.md",true,[],[48,54,60,66,72,78],{"skillNo":49,"name":50,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M79QR1E309VJ6CTQKB32AWWA","zero-trust-architecture-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-architecture-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M79QQV7GHYR02DYGN41S23WN","xss-filter-evasion-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxss-filter-evasion-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M79QQNSN7YB8XB61FFSCS3WH","xs-leaks-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxs-leaks-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M79QQHZZJKFDY9132G5A65C2","xpath-injection-prevention-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxpath-injection-prevention-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M79QQB9ZSD3DJG8658EHQXR1","xml-security-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxml-security-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M79QQ60WKV7PFMXWT9CW8PM6","xml-external-entity-prevention-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxml-external-entity-prevention-cheat-sheet\u002FSKILL.md",[],[]]