- Extract 9 skill files from command knowledge: - mcp-tools-reference.md: Complete NetBox MCP tools reference - system-discovery.md: Bash commands for system info gathering - device-registration.md: Device registration workflow - sync-workflow.md: Machine sync process - audit-workflow.md: Data quality audit checks - ip-management.md: IP/prefix management and conflict detection - topology-generation.md: Mermaid diagram generation - change-audit.md: NetBox change audit workflow - visual-header.md: Standard visual header pattern - Slim all 11 commands to under 60 lines: - cmdb-sync.md: 348 -> 57 lines - cmdb-register.md: 334 -> 51 lines - ip-conflicts.md: 238 -> 58 lines - cmdb-audit.md: 207 -> 58 lines - cmdb-topology.md: 194 -> 54 lines - initial-setup.md: 176 -> 74 lines - change-audit.md: 175 -> 57 lines - cmdb-site.md: 68 -> 50 lines - cmdb-ip.md: 65 -> 52 lines - cmdb-device.md: 64 -> 55 lines - cmdb-search.md: 46 lines (unchanged) - Update agent to reference skills for best practices - Preserve existing netbox-patterns skill Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
58 lines
1.3 KiB
Markdown
58 lines
1.3 KiB
Markdown
---
|
|
description: Synchronize current machine state with existing NetBox record
|
|
---
|
|
|
|
# CMDB Machine Sync
|
|
|
|
Update an existing NetBox device record with the current machine state.
|
|
|
|
## Skills to Load
|
|
|
|
- `skills/visual-header.md`
|
|
- `skills/sync-workflow.md`
|
|
- `skills/system-discovery.md`
|
|
- `skills/mcp-tools-reference.md`
|
|
|
|
## Usage
|
|
|
|
```
|
|
/cmdb-sync [--full] [--dry-run]
|
|
```
|
|
|
|
**Options:**
|
|
- `--full`: Force refresh all fields, even unchanged ones
|
|
- `--dry-run`: Show what would change without applying updates
|
|
|
|
## Instructions
|
|
|
|
Execute `skills/visual-header.md` with context "Machine Sync".
|
|
|
|
Execute `skills/sync-workflow.md` which covers:
|
|
1. Device lookup via MCP
|
|
2. Current state discovery via Bash
|
|
3. Comparison of NetBox vs local state
|
|
4. Diff report generation
|
|
5. User confirmation (unless dry-run)
|
|
6. Apply updates via MCP
|
|
7. Journal entry creation
|
|
|
|
## Modes
|
|
|
|
| Mode | Behavior |
|
|
|------|----------|
|
|
| Default | Show diff, ask confirmation, apply changes |
|
|
| `--dry-run` | Show diff only, no changes applied |
|
|
| `--full` | Skip confirmation, update all fields |
|
|
|
|
## Error Handling
|
|
|
|
| Error | Action |
|
|
|-------|--------|
|
|
| Device not found | Suggest `/cmdb-register` |
|
|
| Permission denied | Note which failed, continue others |
|
|
| Cluster not found | Offer to create or skip container sync |
|
|
|
|
## User Request
|
|
|
|
$ARGUMENTS
|