Agent skill
proxmox-management
Manage Proxmox VMs and USB passthrough using bundled helper scripts (status/inspect/start/stop/resume, USB discovery, USB mapping attach, and backup-restore moves).
Install this agent skill to your Project
npx add-skill https://github.com/rcarmo/piclaw/tree/main/skel/.pi/skills/proxmox-management
SKILL.md
Proxmox Management
Use this skill for routine Proxmox VM operations and USB passthrough tasks.
Scope
This skill is focused on:
- VM inspect/status/start/stop/resume (
qemu) - USB discovery on a node
- Cluster USB mapping create/update
- USB mapping attach to a VM slot (
usb0..usb4) - VM move via backup+restore when direct migration is blocked by storage-type constraints
Setup
Set Proxmox API environment variables first.
Keep examples sanitized in prompts/logs. Use placeholders in documentation and avoid sharing real secrets.
TOKEN_JSON="$(piclaw keychain get proxmox/piclaw-management-token)"
export PVE_BASE="https://proxmox.example.com:8006/api2/json"
export PVE_TOKEN_USER="$(printf '%s' "$TOKEN_JSON" | jq -r '.username')"
export PVE_TOKEN_SECRET="$(printf '%s' "$TOKEN_JSON" | jq -r '.secret')"
If PVE_TOKEN_USER / PVE_TOKEN_SECRET are omitted, scripts try keychain entry proxmox/piclaw-management-token.
Scripts
This skill now uses the packaged helper at runtime/scripts/proxmox.ts for the
core VM lifecycle actions. The thin wrappers in this skill directory delegate to
that helper so node discovery, task polling, and keychain resolution stay
centralized.
Wrappers in this skill directory:
proxmox-vm-status.ts(delegates tovm inspect)proxmox-start-vm.tsproxmox-stop-vm.tsproxmox-resume-vm.tsproxmox-list-usb.tsproxmox-upsert-usb-mapping.tsproxmox-attach-usb-mapping-to-vm.tsproxmox-move-vm-via-backup-restore.ts
Packaged helper commands:
bun run runtime/scripts/proxmox.ts vm status --vmid <id>bun run runtime/scripts/proxmox.ts vm inspect --vmid <id>bun run runtime/scripts/proxmox.ts vm start --vmid <id>bun run runtime/scripts/proxmox.ts vm stop --vmid <id>bun run runtime/scripts/proxmox.ts vm resume --vmid <id>bun run runtime/scripts/proxmox.ts vm restart --vmid <id>bun run runtime/scripts/proxmox.ts vm ip --vmid <id>
Common workflows
1) Check VM status/config
export PVE_VMID="<vmid>"
bun ./proxmox-vm-status.ts
2) Start/stop/resume VM
export PVE_VMID="<vmid>"
bun ./proxmox-start-vm.ts
# or
bun ./proxmox-stop-vm.ts
# or
bun ./proxmox-resume-vm.ts
3) Find Bluetooth USB dongles on a node
export PVE_NODE="<node>"
export PVE_USB_BLUETOOTH_ONLY=1
bun ./proxmox-list-usb.ts
Optional filters:
PVE_USB_VENDORID(e.g.0a12)PVE_USB_PRODID(e.g.0001)PVE_USB_CLASS(e.g.224ore0)
4) Upsert USB mapping + attach to VM
Prefer mapping-based attach with API tokens.
# Create/update mapping
export PVE_MAPPING_ID="vm117-bt"
export PVE_MAPPING_MAP="node=<node>,id=<vendorid>:<prodid>"
bun ./proxmox-upsert-usb-mapping.ts
# Attach mapping to VM usb0
export PVE_NODE="<node>"
export PVE_VMID="<vmid>"
export PVE_USB_MAPPING_ID="vm117-bt"
export PVE_USB_SLOT="usb0"
bun ./proxmox-attach-usb-mapping-to-vm.ts
5) Move VM across nodes/storage via backup+restore
Use when direct migration fails due to incompatible storage types.
export PVE_SOURCE_NODE="<source-node>"
export PVE_VMID="<vmid>"
export PVE_TARGET_NODE="<target-node>"
export PVE_TARGET_STORAGE="<target-storage>"
# optional
export PVE_BACKUP_STORAGE="backup"
export PVE_BACKUP_MODE="stop"
export PVE_DELETE_SOURCE="0" # set to 1 to remove source after backup
bun ./proxmox-move-vm-via-backup-restore.ts
Notes and limitations
- With token auth, direct
usbX=host=VID:PIDmay be rejected by Proxmox ACL checks. - Mapping path (
usbX=mapping=<id>) is the safe default for token-based automation. - If guest-level confirmation is needed, use QEMU guest agent endpoints after attach.
- The packaged helper auto-discovers the VM node from cluster resources for VM lifecycle actions, so
PVE_NODEis no longer required for the basic status/start/stop/resume wrappers.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
autoresearch-create
Set up and run an autonomous experiment loop for any optimization target. Gathers what to optimize, then starts the loop immediately. Use when asked to "run autoresearch", "optimize X in a loop", "set up autoresearch for X", or "start experiments".
portainer-container-compare-chart
Compare two containers using native portainer tool data collection and render SVG/CSV outputs.
proxmox-guest-compare-chart
Compare two Proxmox guests using native proxmox tool data collection and render SVG/CSV outputs.
schedule
Schedule a task to run later or on a recurring basis. Prefer the schedule_task tool; fallback to IPC only if needed.
reload
Reinstall piclaw from workspace source and force-restart the running process. Use after making code changes to piclaw.
send-message
Send a message to the chat immediately without waiting for the current task to finish. Useful for acknowledging requests or sending progress updates while working.
Didn't find tool you were looking for?