nbox-patch-writes

A skill for changing two specific kinds of NetBox records: an interface description or a device status. NetBox is a system for documenting network equipment and connections.

In plain words
What is it for?
Use it to update an interface's description or set a device's status through NetBox's PATCH API.
Why use it?
It provides a controlled way to make these small updates while previewing the change and requiring confirmation before writing 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/patch-writes
Any agent
npx skills add lance0/nbox --skill patch-writes
Clone the repo
git clone --depth 1 https://github.com/lance0/nbox

Made for: Claude Code, Codex.

Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 662 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.00047 $0.00662
Opus 5 $0.00023 $0.00331
Sonnet 5 $0.00009 $0.00132
Haiku 4.5 $0.00005 $0.00066

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

Security

Grade A, and why

nbox-patch-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/patch-writes/SKILL.md · 60 lines

How it starts

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

nbox PATCH writes

Two update write commands modify specific fields on NetBox objects via minimal PATCH bodies. Both follow the same dry-run / confirm / audit lifecycle (see the safe writes skill).

The two PATCH commands

nbox interface <device> <interface> set description "…"

Set an interface's description.

nbox --no-tui interface edge01 xe-0/0/1 set description "uplink to core" --dry-run --json
nbox --no-tui interface edge01 xe-0/0/1 set description "uplink to core" --allow-writes --confirm --json

Optional: --message. Run nbox interface <device> <interface> set description --help for the full flag set.

nbox device <name> set status <value>

Set a device's status. The status value is validated live against NetBox's OPTIONS choices before any PATCH — a label (e.g. "active") is accepted case-insensitively when it maps unambiguously to one canonical value; an unknown or ambiguous status is a usage error (exit 2) naming the input and listing the allowed values, before any PATCH.

nbox --no-tui device edge01 set status active --dry-run --json
nbox --no-tui device edge01 set status active --allow-writes --confirm --json

Optional: --message. Run nbox device <name> set status --help for the full flag set.

How they work

  • Minimal PATCH. The plan carries only the field being changed — {"description": "…"} or {"status": "active"}. No other fields are sent.
  • A no-op (current value already matches) sends no PATCH — the receipt reports no_op: true.
  • Concurrency. ETag + If-Match on NetBox 4.6+; last_updated + before-hash on pre-4.6. A concurrent writer is caught (412 / hash mismatch) and the write is refused with a "re-run dry-run" message (exit 1).
  • Choice validation (device status only): the allowed values are enumerated live from NetBox via a read-only OPTIONS request, so nbox never sends an invalid status. The normalization mechanism (src/netbox/choices.rs) is reusable for future REST choice fields.

Read the full file on GitHub · 60 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 · 60 lines · 47 tokens per session scan A ec2d1a86d86f

Subscribe to this mod's changes

nbox-patch-writes is a skill published in the GitHub repository lance0/nbox (11 stars, last pushed 20d ago), licensed Apache-2.0. It adds 47 tokens to every session and 662 once invoked, about $0.0002 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.