/homenet-document
Run the full network-documentation pipeline ad-hoc. Pulls live UniFi state, refreshes every HomeNetwork/*.md file in CJClaudin_Mac, regenerates logical and physical network diagrams, and publishes a redacted notebook to NotebookLM.
When to use
- After significant network changes (new device, new SSID, firewall edit, VLAN restructure)
- Before security-sensitive work where current docs matter
- Periodic refresh (monthly is reasonable; the pipeline is idempotent)
- To bootstrap documentation on a fresh install of the project
Usage
/homenet-document [options]
Options
--diagrams-only — skip the specialists, NotebookLM, and security/research analysis. Just re-pull data and re-render the two diagrams. Fast (~60s).
--no-notebooklm — run everything except the NotebookLM publication step. Useful when offline or when you do not want to refresh the notebook.
--threads <comma-list> — override the default research thread IDs (udm-pro-hardening,u7-pro-rf-tuning,zbf-home-iot-segmentation)
What happens
- Phase 1: Data extraction. Architect calls 30+ UniFi MCP tools to capture every reachable category (devices, clients, networks, WLANs, firewall, zones, port forwards, RADIUS, VPN, MAC ACLs, system health, alarms, events, topology, DPI, Protect cameras and NVRs). Output:
~/.claude/state/homenet-snapshots/<timestamp>.json.
- Phase 2: Parallel analysis. Three specialists run simultaneously:
network-tech-writer rewrites every HomeNetwork/ markdown file (README, inventory, topology, investigations, devices/, configurations/) using house style and the tiered client strategy.
network-security-engineer scores risks and writes devices/security-recommendations.md with MCP-actionable fixes only, ranked by Severity − Usability Impact.
network-research runs /deep-research threads and writes cited findings to research/.
- Phase 3: Diagram generation. Architect runs
HomeNetwork/scripts/build_diagrams.py (hand-rolled SVG generator, declarative data tables), then converts to PNG via rsvg-convert. Generates diagrams/logical-network.{svg,png} and diagrams/physical-topology.{svg,png}. (mingrammer/diagrams was replaced 2026-04-19, commit 61d59f1: it silently dropped every node past the gateway and rendered only two generic router icons instead of the full topology.)
- Phase 4: Synthesis. Architect writes the README executive summary, cross-links research into security recommendations, updates the maintenance log.
- Phase 5: Redaction + NotebookLM. Architect runs
~/.claude/scripts/homenet-redact.py to scrub PSKs, PPSK passwords, RADIUS shared secrets, API keys, and bearer tokens from a copy of HomeNetwork/. Creates or updates the "Johnson Home Network" notebook in NotebookLM (uses the unified source_add tool, source_type=text for markdown and source_type=file for diagram PNGs), brand-primes it, and uploads every redacted markdown plus diagram PNGs as sources. Tags the notebook for later retrieval via tag(action=add, notebook_id=..., tags="homenet,unifi,network") so it is findable with tag(action=select, query="home network"). Because the upload spans many sources (inventory, topology, security, configurations, research), it also runs label(action=auto, notebook_id=...) to AI-categorize the sources into thematic groups inside the notebook (notebooklm-mcp-cli 0.7.2+).
- Phase 6: Final report. You get a structured summary with file lists, stats, and suggested next actions.
Prerequisites
- UniFi MCP server (
unifi) configured in ~/.claude.json and reachable
- NotebookLM MCP server (
notebooklm) authenticated (nlm login if expired)
- Python 3 for the diagram rendering script (stdlib only, no packages required)
rsvg-convert for SVG-to-PNG conversion: brew install librsvg
- macOS with
~/.claude/scripts/homenet-*.sh already in place (matches existing /homenet-* skill family)
Output
| Path |
Contents |
~/.claude/state/homenet-snapshots/<ts>.json |
Raw MCP data (contains secrets; outside any git repo) |
~/.claude/state/homenet-redacted/<ts>/ |
Redacted parallel tree of HomeNetwork/ used for NotebookLM upload |
HomeNetwork/README.md |
Updated index, exec summary, maintenance log entry |
HomeNetwork/inventory.md |
Tiered client list (full + transient table) |
HomeNetwork/topology.md |
VLANs/SSIDs/APs + embedded diagrams |
HomeNetwork/investigations.md |
Updated open questions |
HomeNetwork/devices/*.md |
Per-category device profiles incl. new av-media.md and mobile-and-tablets.md |
HomeNetwork/devices/security-recommendations.md |
Ranked findings with MCP commands |
HomeNetwork/configurations/*.md |
Per-config-area docs (networks, wlans, firewall, port-forwards, system-health) |
HomeNetwork/research/*.md |
Cited research findings |
HomeNetwork/diagrams/*.{svg,png} |
Logical and physical topology |
HomeNetwork/.notebooklm-id |
Persisted notebook ID for re-runs (gitignored) |
Implementation
This skill spawns the network-architect orchestrator, which runs all six phases:
Agent(
prompt="Follow the instructions in /Users/chris2ao/GitProjects/CJClaudin_Mac/.claude/agents/network-architect.md.
Project root: /Users/chris2ao/GitProjects/CJClaudin_Mac.
Options: <args from user>.",
subagent_type="general-purpose",
model="opus",
name="network-architect"
)
Relationship to other /homenet-* skills
This skill is read-only against the UniFi MCP. It documents the network and proposes recommendations but never mutates configuration. The mutation skills remain the right tool for actually applying changes:
/homenet-snapshot — quick wlanconf-only backup (use before SSID changes)
/homenet-allow-mac / /homenet-deny-mac — MAC allowlist edits
/homenet-filter — toggle MAC filtering per SSID
/homenet-ppsk-add / /homenet-ppsk-remove — PPSK management
/homenet-review — reconcile MAC allowlist against active + historical clients
/homenet-document is the comprehensive companion: documentation, diagrams, security review, and NotebookLM publication, all in one pass.
Limitations
- Per-flow traffic data is not exposed by the UniFi API on Network 10.2; DPI per-app aggregates are the closest substitute.
- LLDP / physical cable-run topology is not exposed; physical diagram uses switch port indices, not cable labels.
- NotebookLM generation has no guaranteed time; large notebooks take 5+ minutes to ingest sources.
- Cookie auth for NotebookLM expires every 2-4 weeks. If publication fails, run
nlm login and re-invoke with --no-notebooklm first to verify everything else, then re-run with NotebookLM enabled. The MCP's auth_status (0.7.1+) distinguishes stale (re-auth needed) from unverified (transient network error, retry); only stale requires nlm login.
1---2name: homenet-document3description: Generate or refresh comprehensive UniFi network documentation in HomeNetwork/, render logical+physical diagrams, and publish a redacted NotebookLM notebook (read-only against the UniFi MCP)4---56# /homenet-document78Run the full network-documentation pipeline ad-hoc. Pulls live UniFi state, refreshes every `HomeNetwork/*.md` file in CJClaudin_Mac, regenerates logical and physical network diagrams, and publishes a redacted notebook to NotebookLM.910## When to use1112- After significant network changes (new device, new SSID, firewall edit, VLAN restructure)13- Before security-sensitive work where current docs matter14- Periodic refresh (monthly is reasonable; the pipeline is idempotent)15- To bootstrap documentation on a fresh install of the project1617## Usage1819```20/homenet-document [options]21```2223### Options2425- `--diagrams-only` — skip the specialists, NotebookLM, and security/research analysis. Just re-pull data and re-render the two diagrams. Fast (~60s).26- `--no-notebooklm` — run everything except the NotebookLM publication step. Useful when offline or when you do not want to refresh the notebook.27- `--threads <comma-list>` — override the default research thread IDs (`udm-pro-hardening,u7-pro-rf-tuning,zbf-home-iot-segmentation`)2829## What happens30311. **Phase 1: Data extraction.** Architect calls 30+ UniFi MCP tools to capture every reachable category (devices, clients, networks, WLANs, firewall, zones, port forwards, RADIUS, VPN, MAC ACLs, system health, alarms, events, topology, DPI, Protect cameras and NVRs). Output: `~/.claude/state/homenet-snapshots/<timestamp>.json`.322. **Phase 2: Parallel analysis.** Three specialists run simultaneously:33 - `network-tech-writer` rewrites every HomeNetwork/ markdown file (README, inventory, topology, investigations, devices/, configurations/) using house style and the tiered client strategy.34 - `network-security-engineer` scores risks and writes `devices/security-recommendations.md` with MCP-actionable fixes only, ranked by Severity − Usability Impact.35 - `network-research` runs `/deep-research` threads and writes cited findings to `research/`.363. **Phase 3: Diagram generation.** Architect runs `HomeNetwork/scripts/build_diagrams.py` (hand-rolled SVG generator, declarative data tables), then converts to PNG via `rsvg-convert`. Generates `diagrams/logical-network.{svg,png}` and `diagrams/physical-topology.{svg,png}`. (mingrammer/diagrams was replaced 2026-04-19, commit `61d59f1`: it silently dropped every node past the gateway and rendered only two generic router icons instead of the full topology.)374. **Phase 4: Synthesis.** Architect writes the README executive summary, cross-links research into security recommendations, updates the maintenance log.385. **Phase 5: Redaction + NotebookLM.** Architect runs `~/.claude/scripts/homenet-redact.py` to scrub PSKs, PPSK passwords, RADIUS shared secrets, API keys, and bearer tokens from a copy of HomeNetwork/. Creates or updates the "Johnson Home Network" notebook in NotebookLM (uses the unified `source_add` tool, `source_type=text` for markdown and `source_type=file` for diagram PNGs), brand-primes it, and uploads every redacted markdown plus diagram PNGs as sources. Tags the notebook for later retrieval via `tag(action=add, notebook_id=..., tags="homenet,unifi,network")` so it is findable with `tag(action=select, query="home network")`. Because the upload spans many sources (inventory, topology, security, configurations, research), it also runs `label(action=auto, notebook_id=...)` to AI-categorize the sources into thematic groups inside the notebook (notebooklm-mcp-cli 0.7.2+).396. **Phase 6: Final report.** You get a structured summary with file lists, stats, and suggested next actions.4041## Prerequisites4243- UniFi MCP server (`unifi`) configured in `~/.claude.json` and reachable44- NotebookLM MCP server (`notebooklm`) authenticated (`nlm login` if expired)45- Python 3 for the diagram rendering script (stdlib only, no packages required)46- `rsvg-convert` for SVG-to-PNG conversion: `brew install librsvg`47- macOS with `~/.claude/scripts/homenet-*.sh` already in place (matches existing /homenet-* skill family)4849## Output5051| Path | Contents |52|------|----------|53| `~/.claude/state/homenet-snapshots/<ts>.json` | Raw MCP data (contains secrets; outside any git repo) |54| `~/.claude/state/homenet-redacted/<ts>/` | Redacted parallel tree of HomeNetwork/ used for NotebookLM upload |55| `HomeNetwork/README.md` | Updated index, exec summary, maintenance log entry |56| `HomeNetwork/inventory.md` | Tiered client list (full + transient table) |57| `HomeNetwork/topology.md` | VLANs/SSIDs/APs + embedded diagrams |58| `HomeNetwork/investigations.md` | Updated open questions |59| `HomeNetwork/devices/*.md` | Per-category device profiles incl. new av-media.md and mobile-and-tablets.md |60| `HomeNetwork/devices/security-recommendations.md` | Ranked findings with MCP commands |61| `HomeNetwork/configurations/*.md` | Per-config-area docs (networks, wlans, firewall, port-forwards, system-health) |62| `HomeNetwork/research/*.md` | Cited research findings |63| `HomeNetwork/diagrams/*.{svg,png}` | Logical and physical topology |64| `HomeNetwork/.notebooklm-id` | Persisted notebook ID for re-runs (gitignored) |6566## Implementation6768This skill spawns the network-architect orchestrator, which runs all six phases:6970```71Agent(72 prompt="Follow the instructions in /Users/chris2ao/GitProjects/CJClaudin_Mac/.claude/agents/network-architect.md.73 Project root: /Users/chris2ao/GitProjects/CJClaudin_Mac.74 Options: <args from user>.",75 subagent_type="general-purpose",76 model="opus",77 name="network-architect"78)79```8081## Relationship to other /homenet-* skills8283This skill is **read-only** against the UniFi MCP. It documents the network and proposes recommendations but never mutates configuration. The mutation skills remain the right tool for actually applying changes:8485- `/homenet-snapshot` — quick wlanconf-only backup (use before SSID changes)86- `/homenet-allow-mac` / `/homenet-deny-mac` — MAC allowlist edits87- `/homenet-filter` — toggle MAC filtering per SSID88- `/homenet-ppsk-add` / `/homenet-ppsk-remove` — PPSK management89- `/homenet-review` — reconcile MAC allowlist against active + historical clients9091`/homenet-document` is the comprehensive companion: documentation, diagrams, security review, and NotebookLM publication, all in one pass.9293## Limitations9495- Per-flow traffic data is not exposed by the UniFi API on Network 10.2; DPI per-app aggregates are the closest substitute.96- LLDP / physical cable-run topology is not exposed; physical diagram uses switch port indices, not cable labels.97- NotebookLM generation has no guaranteed time; large notebooks take 5+ minutes to ingest sources.98- Cookie auth for NotebookLM expires every 2-4 weeks. If publication fails, run `nlm login` and re-invoke with `--no-notebooklm` first to verify everything else, then re-run with NotebookLM enabled. The MCP's `auth_status` (0.7.1+) distinguishes `stale` (re-auth needed) from `unverified` (transient network error, retry); only `stale` requires `nlm login`.