Token导航 LogoToken导航TokenDH.com
前端设计external-servicegithub未标认证来源可访问许可证需确认审计通过

subnet-calculator子网计算器

Agent Skill

subnet-calculator 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

256

周安装

11

GitHub Stars

462

下载量

90
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:subnet-calculator(子网计算器)
来源仓库:https://github.com/automateyournetwork/netclaw
仓库路径:skills/subnet-calculator
安装命令:
npx skills add https://github.com/automateyournetwork/netclaw --skill subnet-calculator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/automateyournetwork/netclaw --skill subnet-calculator

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。

  • 可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 当前顶部介绍:subnet-calculator 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。
  • 当前底部简介为空,暂无补充说明。

SKILL.md

Subnet Calculator (IPv4 + IPv6)

Available Tools

1. subnet_calculator — IPv4 Subnet Details

python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator '{"cidr":"192.168.1.0/24"}'

Parameters:

  • cidr (required): IPv4 CIDR notation, e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.1.0/24

Returns:

  • Network address, broadcast address, netmask, wildcard mask
  • Prefix length, host bits
  • Number of total and usable addresses
  • First and last usable host addresses
  • Usable hosts preview (up to 10)
  • Previous and next subnets (same size)
  • Address classification: private, global, link-local, multicast, loopback, reserved
  • Human-readable summary

2. subnet_calculator_v6 — IPv6 Subnet Details

python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator_v6 '{"cidr":"2001:db8::/48"}'

Parameters:

  • cidr (required): IPv6 CIDR notation, e.g., 2001:db8::/32, fd00::/64, fe80::/10

Returns:

  • Network address (compressed and exploded forms)
  • Last address in range
  • Prefix length, host bits
  • Number of addresses (exact for /64+, exponential notation for larger)
  • Number of /64 subnets contained
  • Previous and next subnets
  • Address classification: ULA, global unicast, link-local, multicast
  • Standard allocation annotation (e.g., "/64 = SLAAC capable", "/48 = site allocation")
  • Human-readable summary

3. subnet_calculator_auto — Auto-Detect IPv4/IPv6

python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator_auto '{"cidr":"10.0.0.0/24"}'
python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator_auto '{"cidr":"2001:db8:abcd::/48"}'

Automatically detects IP version and calls the appropriate calculator.

When to Use

  • Interface addressing: Calculate the correct subnet for a new interface
  • VLSM planning: Break a large block into appropriately sized subnets
  • ACL wildcard masks: Get the wildcard mask for access-list entries
  • Routing verification: Confirm that route entries match expected subnets
  • IPv6 migration planning: Understand IPv6 allocation standards (/48, /64, /128)
  • Network design: Validate addressing schemes before deployment
  • Troubleshooting: Verify if two IPs are in the same subnet

Common Network Engineering Scenarios

Scenario 1: Point-to-Point Link Addressing

IPv4 /30 link:

python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator '{"cidr":"10.1.1.0/30"}'

Result: 4 addresses, 2 usable (10.1.1.1 and 10.1.1.2). Standard for router-to-router links.

IPv4 /31 link (RFC 3021):

python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator '{"cidr":"10.1.1.0/31"}'

Result: 2 addresses (10.1.1.0 and 10.1.1.1). No broadcast waste.

IPv6 /127 link (RFC 6164):

python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator_v6 '{"cidr":"2001:db8:1::/127"}'

Result: 2 addresses. Recommended for IPv6 point-to-point links.

Scenario 2: VLSM Subnet Planning

Break 10.10.0.0/16 into subnets for different departments:

# Engineering: 500 hosts needed → /23 (510 usable)
python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator '{"cidr":"10.10.0.0/23"}'

# Sales: 100 hosts needed → /25 (126 usable)
python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator '{"cidr":"10.10.2.0/25"}'

# Management: 10 hosts needed → /28 (14 usable)
python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator '{"cidr":"10.10.2.128/28"}'

# Server VLAN: 30 hosts needed → /27 (30 usable)
python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator '{"cidr":"10.10.2.192/27"}'

Produce an addressing plan:

Subnet Plan — 10.10.0.0/16
┌────────────┬─────────────────┬────────┬───────────┬───────────────┐
│ Department │ Subnet          │ Prefix │ Usable    │ Gateway       │
├────────────┼─────────────────┼────────┼───────────┼───────────────┤
│ Engineering│ 10.10.0.0/23    │ /23    │ 510 hosts │ 10.10.0.1     │
│ Sales      │ 10.10.2.0/25    │ /25    │ 126 hosts │ 10.10.2.1     │
│ Management │ 10.10.2.128/28  │ /28    │ 14 hosts  │ 10.10.2.129   │
│ Servers    │ 10.10.2.192/27  │ /27    │ 30 hosts  │ 10.10.2.193   │
│ P2P Links  │ 10.10.3.0/24    │ /30 ea │ 2 per link│ varies        │
└────────────┴─────────────────┴────────┴───────────┴───────────────┘

Scenario 3: IPv6 Site Allocation

Plan a /48 allocation for a campus:

# Site allocation
python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator_v6 '{"cidr":"2001:db8:abcd::/48"}'

# Building 1 — first /56 from the /48
python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator_v6 '{"cidr":"2001:db8:abcd::/56"}'

# Floor 1, Building 1 — first /64 from the /56
python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator_v6 '{"cidr":"2001:db8:abcd::/64"}'

# Loopback /128
python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator_v6 '{"cidr":"2001:db8:abcd::1/128"}'

# Point-to-point /127
python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator_v6 '{"cidr":"2001:db8:abcd:ffff::/127"}'
IPv6 Allocation — 2001:db8:abcd::/48
┌──────────────┬──────────────────────────┬────────┬──────────────────────┐
│ Purpose      │ Prefix                   │ Size   │ Note                 │
├──────────────┼──────────────────────────┼────────┼──────────────────────┤
│ Site         │ 2001:db8:abcd::/48       │ /48    │ 65,536 /64 subnets   │
│ Building 1   │ 2001:db8:abcd::/56       │ /56    │ 256 /64 subnets      │
│ Floor 1/B1   │ 2001:db8:abcd::/64       │ /64    │ SLAAC capable        │
│ Loopback     │ 2001:db8:abcd::1/128     │ /128   │ Single host          │
│ P2P Link     │ 2001:db8:abcd:ffff::/127 │ /127   │ RFC 6164             │
└──────────────┴──────────────────────────┴────────┴──────────────────────┘

Scenario 4: ACL Wildcard Mask Reference

# What's the wildcard for a /22?
python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator '{"cidr":"10.0.0.0/22"}'

Use the wildcard_mask field directly in ACL configuration:

ip access-list extended EXAMPLE
  permit ip 10.0.0.0 0.0.3.255 any

Scenario 5: Dual-Stack Verification

Verify both IPv4 and IPv6 assignments on an interface:

# IPv4 side
python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator '{"cidr":"10.1.1.1/30"}'

# IPv6 side
python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator_v6 '{"cidr":"2001:db8:1::1/127"}'

Quick Reference: Common Prefix Sizes

IPv4

PrefixHostsUsableUse Case
/3042Point-to-point link
/2986Small DMZ
/281614Management VLAN
/273230Server VLAN
/266462Small department
/25128126Medium department
/24256254Standard subnet
/23512510Large subnet
/2210241022Campus building
/166553665534Campus site

IPv6

PrefixSubnets (/64)Use Case
/1280Single host (loopback)
/1270Point-to-point link (RFC 6164)
/641Standard subnet (SLAAC)
/56256Building or floor
/4865,536Site allocation
/3216,777,216ISP allocation

Integration with Network Config

After calculating subnets, use pyats-config-mgmt to apply:

# Calculate the subnet first
python3 $MCP_CALL "python3 -u $SUBNET_MCP_SCRIPT" subnet_calculator '{"cidr":"10.1.1.0/30"}'

# Then configure the interface
PYATS_TESTBED_PATH=$PYATS_TESTBED_PATH python3 $MCP_CALL "python3 -u $PYATS_MCP_SCRIPT" pyats_configure_device '{"device_name":"R1","config_commands":["interface GigabitEthernet2","ip address 10.1.1.1 255.255.255.252","no shutdown"]}'

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.97%
按下载量换算33

Claude

27.37%
按下载量换算25

Cursor

18.53%
按下载量换算17

Gemini CLI

9.45%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills