refactor(cmdb-assistant): extract skills and slim commands
- 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>
This commit is contained in:
@@ -1,19 +1,13 @@
|
||||
# CMDB IP Management
|
||||
|
||||
## Visual Output
|
||||
|
||||
When executing this command, display the plugin header:
|
||||
|
||||
```
|
||||
┌──────────────────────────────────────────────────────────────────┐
|
||||
│ 🖥️ CMDB-ASSISTANT · IP Management │
|
||||
└──────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
Then proceed with the operation.
|
||||
|
||||
Manage IP addresses and prefixes in NetBox.
|
||||
|
||||
## Skills to Load
|
||||
|
||||
- `skills/visual-header.md`
|
||||
- `skills/ip-management.md`
|
||||
- `skills/mcp-tools-reference.md`
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
@@ -22,43 +16,36 @@ Manage IP addresses and prefixes in NetBox.
|
||||
|
||||
## Instructions
|
||||
|
||||
You are an IP address management (IPAM) assistant with access to NetBox.
|
||||
Execute `skills/visual-header.md` with context "IP Management".
|
||||
|
||||
Execute operations from `skills/ip-management.md`.
|
||||
|
||||
### Actions
|
||||
|
||||
**Prefixes:**
|
||||
- `prefixes` - List all prefixes using `ipam_list_prefixes`
|
||||
- `prefix <cidr>` - Get prefix details or find prefix containing address
|
||||
- `available in <prefix>` - Show available IPs in a prefix using `ipam_list_available_ips`
|
||||
- `create prefix <cidr>` - Create new prefix using `ipam_create_prefix`
|
||||
- `prefixes` - List all prefixes
|
||||
- `prefix <cidr>` - Get prefix details
|
||||
- `available in <prefix>` - Show available IPs
|
||||
- `create prefix <cidr>` - Create new prefix
|
||||
|
||||
**IP Addresses:**
|
||||
- `list` - List all IP addresses using `ipam_list_ip_addresses`
|
||||
- `list` - List all IP addresses
|
||||
- `show <address>` - Get IP details
|
||||
- `allocate from <prefix>` - Auto-allocate next available IP using `ipam_create_available_ip`
|
||||
- `create <address>` - Create specific IP using `ipam_create_ip_address`
|
||||
- `assign <ip> to <device>` - Assign IP to device interface
|
||||
- `allocate from <prefix>` - Auto-allocate next available
|
||||
- `create <address>` - Create specific IP
|
||||
- `assign <ip> to <device> <interface>` - Assign IP to interface
|
||||
|
||||
**VLANs:**
|
||||
- `vlans` - List VLANs using `ipam_list_vlans`
|
||||
**VLANs and VRFs:**
|
||||
- `vlans` - List VLANs
|
||||
- `vlan <id>` - Get VLAN details
|
||||
|
||||
**VRFs:**
|
||||
- `vrfs` - List VRFs using `ipam_list_vrfs`
|
||||
|
||||
### Workflow Examples
|
||||
|
||||
**Allocate IP to new server:**
|
||||
1. Find available IPs in target prefix
|
||||
2. Create the IP address
|
||||
3. Assign to device interface
|
||||
- `vrfs` - List VRFs
|
||||
|
||||
## Examples
|
||||
|
||||
- `/cmdb-ip prefixes` - List all prefixes
|
||||
- `/cmdb-ip available in 10.0.1.0/24` - Show available IPs
|
||||
- `/cmdb-ip allocate from 10.0.1.0/24` - Get next available IP
|
||||
- `/cmdb-ip assign 10.0.1.50/24 to web-server-01 eth0` - Assign IP to interface
|
||||
- `/cmdb-ip prefixes`
|
||||
- `/cmdb-ip available in 10.0.1.0/24`
|
||||
- `/cmdb-ip allocate from 10.0.1.0/24`
|
||||
- `/cmdb-ip assign 10.0.1.50/24 to web-server-01 eth0`
|
||||
|
||||
## User Request
|
||||
|
||||
|
||||
Reference in New Issue
Block a user