Agent skill

Subnet Calculator

by automateyournetwork in automateyournetwork/netclaw

IPv4 and IPv6 subnet calculator - CIDR breakdown, usable hosts, previous/next subnets, address classification, VLSM planning, and dual-stack analysis.

Apache-2.0Auto-check passed

Install Subnet Calculator

skills CLI
$ npx skills add automateyournetwork/netclaw --skill subnet-calculator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install automateyournetwork/netclaw subnet-calculator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/automateyournetwork/netclaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/workspace/skills/subnet-calculator .claude/skills/subnet-calculator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
subnet-calculator
GitHub stars
676
Token cost
~2.3k tokens
SKILL.md length
539 words
Files
1
Skills in repo
120
Repo updated
First seen
Licence
Apache-2.0

At a glance

IPv4 and IPv6 subnet calculator - CIDR breakdown, usable hosts, previous/next subnets, address classification, VLSM planning, and dual-stack analysis.

  • Works in 3 steps: subnet_calculator — IPv4 Subnet Details → subnet_calculator_v6 — IPv6 Subnet Details → subnet_calculator_auto — Auto-Detect…
  • Calculating subnets
  • SKILL.md covers Available Tools, When to Use, Common Network Engineering… and Quick Reference: Common Prefix…, plus 2 more sections
  • Calls python3

What it does

Subnet Calculator is an agent skill from automateyournetwork/netclaw. IPv4 and IPv6 subnet calculator - CIDR breakdown, usable hosts, previous/next subnets, address classification, VLSM planning, and dual-stack analysis. Use when calculating subnets, figuring out how many hosts fit in a prefix, planning IP addressing, getting wildcard masks for ACLs, or checking if two IPs are in the same subnet.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: An AI agent that claws through your network. The licence is Apache-2.0.

When your agent uses it

  • Calculating subnets
  • Figuring out how many hosts fit in a prefix
  • Planning IP addressing
  • Getting wildcard masks for ACLs

Example prompts

  • “/subnet-calculator”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. subnet_calculator — IPv4 Subnet Details
  2. subnet_calculator_v6 — IPv6 Subnet Details
  3. subnet_calculator_auto — Auto-Detect IPv4/IPv6

What it can do on your machine

Read from SKILL.md and the folder at commit aa90e7d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Subnet Calculator loads about 2.3k tokens when it runs. Until then it costs about 87 tokens; SKILL.md has 539 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from automateyournetwork/netclaw at commit aa90e7d, republished under its Apache-2.0 licence (© automateyournetwork). 539 words, ~2,270 tokens.

Download SKILL.mdSave it as .claude/skills/subnet-calculator/SKILL.md (or your agent's skills folder).
name
subnet-calculator
description
IPv4 and IPv6 subnet calculator - CIDR breakdown, usable hosts, previous/next subnets, address classification, VLSM planning, and dual-stack analysis. Use when calculating subnets, figuring out how many hosts fit in a prefix, planning IP addressing, getting wildcard masks for ACLs, or checking if two IPs are in the same subnet.
license
Apache-2.0
user-invocable
true

Subnet Calculator (IPv4 + IPv6)

Available Tools

1. subnet_calculator — IPv4 Subnet Details
bash
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
bash
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
bash
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

IPv4 /30 link:

bash
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):

bash
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):

bash
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:

bash
# 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:

bash
# 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
bash
# 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:

bash
# 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"}'
Show full SKILL.md (216 more words)Show less

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:

bash
# 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 "${PYATS_PYTHON:-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"]}'

Failure Behavior

  • If a tool call fails with an authentication or connection error, check that MCP_CALL, PYATS_MCP_SCRIPT, SUBNET_MCP_SCRIPT are set and valid before assuming a data or device problem.
  • 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.

© automateyournetwork, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in workspace/skills/subnet-calculator of automateyournetwork/netclaw.

Open the folder on GitHubat commit aa90e7d

Compare with similar skills

Subnet Calculator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Subnet Calculator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Subnet Calculator this skillautomateyournetwork/netclaw676—~2.3kAutomated safety check: PassApache-2.0
Breakdown Testgithub/awesome-copilot40k1 repos~3.7kAutomated safety check: PassMIT
Escaping Containers To Hostmukul975/Anthropic-Cybersecurity-Skills34k—~3.4kAutomated safety check: PassApache-2.0
Cross Host Federationruvnet/ruflo74k—~1.1kAutomated safety check: PassMIT
Host Patternnukeop/nuclear19k—~1.3kAutomated safety check: PassAGPL-3.0
Testing For Host Header Injectionmukul975/Anthropic-Cybersecurity-Skills34k—~2.2kAutomated safety check: WarnApache-2.0

Similar skills

  • Breakdown Test

    github/awesome-copilot

    Official

    Test Planning and Quality Assurance prompt that generates comprehensive test strategies, task breakdowns, and quality validation plans for GitHub projects.

    40k GitHub starsUsed in 1 repo~3.7k tokens
    Testing & QAAuto-check passed
  • Escaping Containers To Host

    mukul975/Anthropic-Cybersecurity-Skills

    Exploits privileged pods, host mounts, runC CVEs, and exposed Docker sockets to break out of a container and reach the underlying host during an authorized container-security assessment.

    34k GitHub stars~3.4k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Join and operate a signed cross-host agentbbs federation, and coordinate work claims across nodes.

    74k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Host Pattern

    nukeop/nuclear

    A skill your agent uses when adding a new domain to Nuclear's plugin system, or implementing a host.

    19k GitHub stars~1.3k tokensUpdated 4 days ago
    Auto-check passed
  • Testing For Host Header Injection

    mukul975/Anthropic-Cybersecurity-Skills

    Test web applications for HTTP Host header injection vulnerabilities to identify password reset poisoning, web cache poisoning, SSRF, and virtual host routing manipulation risks.

    34k GitHub stars~2.2k tokensUpdated 1 mo ago
    SecurityAuto-check: warnings
  • Eol Resistor Calculator

    sickn33/agentic-awesome-skills

    Calculates and validates end-of-line (EOL, SEOL, DEOL, TEOL) resistor loops for intrusion alarm panels (Honeywell, DSC, Paradox, Bosch) with wire gauge drop and state tables.

    47k GitHub starsUsed in 1 repo~3.5k tokens
    Auto-check passed

More from automateyournetwork/netclaw

All 120 skills in this repo
  • EVE-NG Lab Topology Design

    automateyournetwork/netclaw

    Entry point for designing EVE-NG network labs: classifies the request, gathers missing requirements, proposes options and validates the resulting topology.

    676 GitHub stars~612 tokensUpdated today
    Auto-check passed
  • ACI Policy Change Deployment

    automateyournetwork/netclaw

    Deploys Cisco ACI policy changes only behind an approved ServiceNow Change Request, capturing pre and post-change fault baselines and rolling back automatically on a fault delta.

    676 GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Cisco ACI Fabric Health Audit

    automateyournetwork/netclaw

    Runs a phased health audit of a Cisco ACI fabric through MCP tools: node status, links, tenant and policy review, faults and endpoint learning.

    676 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Anta Validation

    automateyournetwork/netclaw

    Validate Arista EOS network state against ANTA's pre-built 208-test catalogue, with structured pass/fail verdicts.

    676 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Arista Cvp

    automateyournetwork/netclaw

    Arista CloudVision Portal (CVP) automation via REST API — device inventory, events, connectivity monitoring, tag management (4 tools).

    676 GitHub stars~2.2k tokensUpdated today
    Auto-check: notes
  • AWS Cloud Monitoring

    automateyournetwork/netclaw

    AWS CloudWatch monitoring — metrics, alarms, log queries, VPC flow log analysis, network performance.

    676 GitHub stars~1k tokensUpdated today
    Auto-check passed

Questions about Subnet Calculator

What does Subnet Calculator do?

IPv4 and IPv6 subnet calculator - CIDR breakdown, usable hosts, previous/next subnets, address classification, VLSM planning, and dual-stack analysis. Subnet Calculator is an agent skill from automateyournetwork/netclaw. IPv4 and IPv6 subnet calculator - CIDR breakdown, usable hosts, previous/next subnets, address classification, VLSM planning, and dual-stack analysis.

When should I use Subnet Calculator?

Subnet Calculator fits situations like: calculating subnets; figuring out how many hosts fit in a prefix; planning IP addressing; getting wildcard masks for ACLs.

How do I install Subnet Calculator in Claude Code?

Run `npx skills add automateyournetwork/netclaw --skill subnet-calculator -a claude-code`. Or copy the skill folder (workspace/skills/subnet-calculator in automateyournetwork/netclaw) into .claude/skills/subnet-calculator in your project. Claude Code loads it when a task matches its description.

How do I install Subnet Calculator in Codex?

Run `npx skills add automateyournetwork/netclaw --skill subnet-calculator -a codex`. Or copy the skill folder (workspace/skills/subnet-calculator in automateyournetwork/netclaw) into .agents/skills/subnet-calculator in your project. Codex loads it when a task matches its description.

Can I use Subnet Calculator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add automateyournetwork/netclaw --skill subnet-calculator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/subnet-calculator, .gemini/skills/subnet-calculator, .github/skills/subnet-calculator and .opencode/skills/subnet-calculator in your project.

What does Subnet Calculator need to run?

Going by SKILL.md and its folder, Subnet Calculator needs the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Subnet Calculator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Subnet Calculator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Subnet Calculator use?

Subnet Calculator is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Subnet Calculator use?

About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Subnet Calculator?

Skills that share tags, products or a category with Subnet Calculator: Breakdown Test (github/awesome-copilot, 40k stars), Escaping Containers To Host (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Cross Host Federation (ruvnet/ruflo, 74k stars) and Host Pattern (nukeop/nuclear, 19k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Subnet Calculator?

automateyournetwork (a GitHub user) maintains it in automateyournetwork/netclaw, which has 676 GitHub stars. The repository holds 120 skills in this directory. The repository was last updated on October 9, 2026.

Source: automateyournetwork/netclaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.