nbox-writes

A guide for safely changing NetBox, a system for recording network devices, interfaces, IP addresses, and related data. It defines a plan-first process with a dry run, explicit confirmation, and an audit receipt before changes are applied.

In plain words
What is it for?
Use it to update interface descriptions or device status, reserve IP addresses and prefixes, and add or remove tags in NetBox.
Why use it?
It reduces accidental network-data changes by showing the proposed before-and-after result and requiring write permission plus confirmation. It also checks whether editable data changed before updating it.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lance0/nbox/writes
Any agent
npx skills add lance0/nbox --skill writes
Clone the repo
git clone --depth 1 https://github.com/lance0/nbox

Made for: Claude Code, Codex.

Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,123 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00071 $0.01123
Opus 5 $0.00036 $0.00562
Sonnet 5 $0.00014 $0.00225
Haiku 4.5 $0.00007 $0.00112

Measured 2d ago against content hash 222668d5def6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

nbox-writes scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/writes/SKILL.md · 85 lines

How it starts

The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.

nbox safe writes

nbox can modify NetBox through seven safe-write commands, all on the same plan-first lifecycle (ADR-0001). Reads stay the default — a write never happens without explicit opt-in.

The universal lifecycle (all seven commands)

Every write follows the same path, so an agent can learn it once:

  1. Dry-run (--dry-run) — builds a MutationPlan, shows the before/after diff, performs no mutation. Needs neither --allow-writes nor --confirm. With --json, returns the stable MutationPlan JSON (schema_version 1).

  2. Apply (--allow-writes --confirm) — builds the same plan and applies it. PATCH writes check the precondition (ETag/If-Match on 4.6+, last_updated on pre-4.6); allocate POSTs are server-authoritative and carry no client precondition. With --json, returns a MutationReceipt (schema_version 1).

  3. Refusal--confirm without --allow-writes is a usage error (exit 2, empty stdout). Non-TTY / --json / --no-tui never prompts.

The seven write commands

Command Operation What it does
nbox interface <device> <iface> set description "…" update (PATCH) Set an interface's description
nbox device <name> set status <value> update (PATCH) Set a device's status (validated live)
nbox ip reserve <prefix> allocate (POST) Reserve the next available IP
nbox prefix reserve <cidr> allocate (POST) Reserve the next available child prefix
nbox ip-range reserve <start|id> allocate (POST) Reserve the next available IP from an IP range
nbox tag add <type> <name> <tag> update (PATCH) Add a tag to any object
nbox tag remove <type> <name> <tag> update (PATCH) Remove a tag from any object

For the exact flags of each command, run nbox <cmd> --help. This skill is flag-free by design — it points at --help so it can't silently drift as the CLI evolves.

Agent usage pattern

The recommended agent pattern is a two-step dry-run-then-apply:

Read the full file on GitHub · 85 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 85 lines · 71 tokens per session scan A 222668d5def6

Subscribe to this mod's changes

nbox-writes is a skill published in the GitHub repository lance0/nbox (11 stars, last pushed 20d ago), licensed Apache-2.0. It adds 71 tokens to every session and 1,123 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.