Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Vm Snapshot List

ASecurity

List virtual machine snapshots across namespaces with status, age, and recovery information. Use when: - "List snapshots for VM [name]" - "Show snapshots in namespace [name]" - "What snapshots exist for [vm]?" Read-only operation - no user confirmation required. NOT for creating/deleting snapshots (use vm-snapshot-create/delete instead).

36 stars
0 votes
0 copies
0 views
Added 9/22/2026
devopskubernetesgitapidatabasesecuritydocumentation

Works with

claude codeapimcp

Security Analysis

A100/100

Scanned 9/22/2026

Install to Claude Code

$npx -y skills add NVlabs/Skill2Env --skill vm-snapshot-list --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Vm Snapshot List?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Vm Snapshot List
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nvlabs-vm-snapshot-list/badge)](https://www.skillsdirectory.com/skills/nvlabs-vm-snapshot-list)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: vm-snapshot-list
description: |
  List virtual machine snapshots across namespaces with status, age, and recovery information.

  Use when:
  - "List snapshots for VM [name]"
  - "Show snapshots in namespace [name]"
  - "What snapshots exist for [vm]?"

  Read-only operation - no user confirmation required.

  NOT for creating/deleting snapshots (use vm-snapshot-create/delete instead).

license: Apache-2.0
model: inherit
color: cyan
allowed-tools: resources_list resources_get
---

# /vm-snapshot-list Skill

List virtual machine snapshots in OpenShift Virtualization. This read-only skill displays snapshot information including status, age, size, and recovery options.

## Prerequisites

**Required MCP Server**: `openshift-virtualization` ([OpenShift MCP Server](https://github.com/openshift/openshift-mcp-server))

**Required MCP Tools**:
- `resources_list` (from openshift-virtualization) - List VirtualMachineSnapshot resources
- `resources_get` (from openshift-virtualization) - Get snapshot details

**Required Environment Variables**:
- `KUBECONFIG` - Path to Kubernetes configuration file with cluster access

**Required Cluster Setup**:
- OpenShift cluster (>= 4.19)
- OpenShift Virtualization operator installed
- ServiceAccount with RBAC permissions to list VirtualMachineSnapshot resources

### Prerequisite Verification

**Before executing, verify MCP server availability:**

1. **Check MCP Server Configuration**
   - Verify `openshift-virtualization` exists in `mcps.json`
   - If missing → Report to user with setup instructions

2. **Check Environment Variables**
   - Verify `KUBECONFIG` is set (check presence only, never expose value)
   - If missing → Report to user

**Human Notification Protocol:**

When prerequisites fail:

```
❌ Cannot execute vm-snapshot-list: MCP server 'openshift-virtualization' is not available

📋 Setup Instructions:
1. Add openshift-virtualization to mcps.json
2. Set KUBECONFIG environment variable
3. Restart Claude Code to reload MCP servers

🔗 Documentation: https://github.com/openshift/openshift-mcp-server
```

## When to Use This Skill

**Trigger this skill when:**
- User wants to list available snapshots for recovery
- User wants to see snapshot status and age
- User wants to verify snapshot existence before restore
- User wants to identify old snapshots for deletion

**User phrases that trigger this skill:**
- "List all snapshots for web-server VM"
- "Show snapshots in namespace production"
- "What snapshots exist?"
- "Display VM snapshots"

**Do NOT use this skill when:**
- User wants to create a snapshot → Use `vm-snapshot-create` skill
- User wants to restore from snapshot → Use `vm-snapshot-restore` skill
- User wants to delete snapshots → Use `vm-snapshot-delete` skill

## Workflow

### Step 1: Gather Information

**Required Information from User:**
1. **Namespace** - Namespace to list snapshots from
2. **VM Name** (Optional) - Filter snapshots by specific VM

If user doesn't provide namespace, ask for it.

### Step 2: List Snapshots

**MCP Tool**: `resources_list` (from openshift-virtualization)

**Parameters** (with VM filter using label selector):
```json
{
  "apiVersion": "snapshot.kubevirt.io/v1beta1",
  "kind": "VirtualMachineSnapshot",
  "namespace": "<namespace>",
  "labelSelector": "vm.kubevirt.io/name=<vm-name>"
}
```

**Parameters** (all snapshots in namespace):
```json
{
  "apiVersion": "snapshot.kubevirt.io/v1beta1",
  "kind": "VirtualMachineSnapshot",
  "namespace": "<namespace>"
}
```

**Note**: The label selector `vm.kubevirt.io/name=<vm-name>` may not always exist. If no results are returned, fall back to listing all snapshots and filtering by checking `spec.source.name` field in the results.

**Expected Output**: List of VirtualMachineSnapshot resources

**Parse each snapshot to extract**:
- `metadata.name` - Snapshot name
- `metadata.namespace` - Namespace
- `metadata.creationTimestamp` - Creation time
- `spec.source.name` - VM name
- `status.phase` - Status (InProgress, Succeeded, Failed)
- `status.readyToUse` - Ready for restore (true/false)

**Error Handling**:
- If namespace not found → Report error
- If permission denied → Report RBAC error
- If no snapshots found → Report "No snapshots found"

### Step 3: Report Snapshot List

**If snapshots found:**

```markdown
## VM Snapshots

**Namespace**: `<namespace>`
<if vm_name provided>
**VM**: `<vm-name>`
</if>

### Available Snapshots

| Snapshot Name | VM Name | Status | Created | Age | ReadyToUse |
|---------------|---------|--------|---------|-----|------------|
| `pre-upgrade-snapshot` | `database-01` | Succeeded ✓ | 2024-01-15 10:30 | 2 days | true |
| `backup-snapshot` | `database-01` | Succeeded ✓ | 2024-01-10 08:00 | 7 days | true |
| `test-snapshot` | `web-server` | Succeeded ✓ | 2024-01-14 14:20 | 3 days | true |

**Total Snapshots**: 3

---

### Snapshot Details

**Snapshot: `pre-upgrade-snapshot`**
- **VM**: `database-01`
- **Status**: Succeeded ✓
- **Created**: 2024-01-15 10:30:00 UTC
- **Age**: 2 days
- **Ready to Use**: true

**Snapshot: `backup-snapshot`**
- **VM**: `database-01`
- **Status**: Succeeded ✓
- **Created**: 2024-01-10 08:00:00 UTC
- **Age**: 7 days
- **Ready to Use**: true

**Snapshot: `test-snapshot`**
- **VM**: `web-server`
- **Status**: Succeeded ✓
- **Created**: 2024-01-14 14:20:00 UTC
- **Age**: 3 days
- **Ready to Use**: true

---

### Actions

**To restore from a snapshot:**
```
"Restore VM <vm-name> from snapshot <snapshot-name>"
```

**To delete a snapshot:**
```
"Delete snapshot <snapshot-name>"
```

**To create a new snapshot:**
```
"Create snapshot of VM <vm-name>"
```
```

**If no snapshots found:**

```markdown
## VM Snapshots

**Namespace**: `<namespace>`
<if vm_name provided>
**VM**: `<vm-name>`
</if>

**No snapshots found.**

<if vm_name provided>
No snapshots exist for VM `<vm-name>` in namespace `<namespace>`.
</if>
<else>
No snapshots exist in namespace `<namespace>`.
</else>

**To create a snapshot:**
```
"Create snapshot of VM <vm-name>"
```
```

## Common Issues

### Issue 1: Permission Denied

**Error**: "Forbidden: User lacks permissions to list virtualmachinesnapshots"

**Cause**: Missing RBAC permissions for listing snapshots.

**Solution:**
1. Check permissions: `oc auth can-i list virtualmachinesnapshots -n <namespace>`
2. Contact cluster admin to grant list/get permissions for virtualmachinesnapshots
3. Try listing in a different namespace where you have permissions

### Issue 2: No Snapshots Found

**Error**: "No snapshots exist in namespace `<namespace>`"

**Cause**: Namespace has no snapshots, or wrong namespace.

**Solution:**
1. Verify correct namespace name
2. List snapshots without VM filter to see all snapshots
3. Check other namespaces: Use `namespaces_list` to see available namespaces
4. Check if snapshots were recently deleted: Use `events_list` in namespace

### Issue 3: Snapshot Shows Failed Status

**Error**: Snapshot listed but `status.phase: Failed` or `readyToUse: false`

**Cause**: Snapshot creation failed due to storage issues, hot-plugged volumes, or missing VolumeSnapshotClass.

**Solution:**
1. Get snapshot details: Use `resources_get` to check `status.conditions` for error messages
2. Check cluster events: Use `events_list` for snapshot-related errors
3. Common fixes:
   - VolumeSnapshotClass missing: Contact cluster admin
   - Hot-plugged volumes: Stop VM, persist volumes, recreate snapshot
   - Failed permanently: Delete and recreate snapshot

## Dependencies

### Required MCP Servers
- `openshift-virtualization` - OpenShift MCP server with kubevirt toolset

### Required MCP Tools
- `resources_list` (from openshift-virtualization) - List Kubernetes resources by type
  - Used for: Listing VirtualMachineSnapshot resources
  - Parameters: apiVersion, kind, namespace, labelSelector (optional)
  - Source: https://github.com/openshift/openshift-mcp-server

### Related Skills
- `vm-snapshot-create` - Create VM snapshots
- `vm-snapshot-restore` - Restore VMs from snapshots
- `vm-snapshot-delete` - Delete VM snapshots
- `vm-inventory` - List VMs before creating snapshots

### Reference Documentation
- [OpenShift Virtualization Snapshots](https://docs.redhat.com/en/documentation/openshift_container_platform/4.21/html-single/virtualization/index#virt-managing-vm-snapshots)
- [KubeVirt VM Snapshots](https://kubevirt.io/user-guide/operations/snapshot_restore_api/)

## Security Considerations

- **RBAC Enforcement**: Requires list permissions for VirtualMachineSnapshot resources
- **Namespace Isolation**: Only lists snapshots within specified namespace
- **Read-Only Operation**: No modifications or destructive actions
- **KUBECONFIG Security**: Credentials never exposed in output

## Example Usage

### Example 1: List Snapshots for Specific VM

```
User: "List all snapshots for database-01"

Agent: "Which namespace is database-01 in?"

User: "production"

Agent: [Invokes vm-snapshot-list skill]
       [Lists snapshots with VM filter]

## VM Snapshots

**Namespace**: `production`
**VM**: `database-01`

### Available Snapshots

| Snapshot Name | VM Name | Status | Created | Age | ReadyToUse |
|---------------|---------|--------|---------|-----|------------|
| `database-01-pre-upgrade` | `database-01` | Succeeded ✓ | 2024-01-15 10:30 | 2 hours | true |
| `database-01-daily-backup` | `database-01` | Succeeded ✓ | 2024-01-14 02:00 | 1 day | true |

**Total Snapshots**: 2

---

### Snapshot Details

**Snapshot: `database-01-pre-upgrade`**
- **VM**: `database-01`
- **Status**: Succeeded ✓
- **Created**: 2024-01-15 10:30:00 UTC
- **Age**: 2 hours
- **Ready to Use**: true

**Snapshot: `database-01-daily-backup`**
- **VM**: `database-01`
- **Status**: Succeeded ✓
- **Created**: 2024-01-14 02:00:00 UTC
- **Age**: 1 day
- **Ready to Use**: true

---

### Actions

**To restore from a snapshot:**
"Restore VM database-01 from snapshot <snapshot-name>"

**To delete a snapshot:**
"Delete snapshot <snapshot-name>"

**To create a new snapshot:**
"Create snapshot of VM database-01"
```

### Example 2: List All Snapshots in Namespace

```
User: "Show me all snapshots in namespace production"

Agent: [Invokes vm-snapshot-list skill]
       [Lists all snapshots without VM filter]

## VM Snapshots

**Namespace**: `production`

### Available Snapshots

| Snapshot Name | VM Name | Status | Created | Age | ReadyToUse |
|---------------|---------|--------|---------|-----|------------|
| `database-01-pre-upgrade` | `database-01` | Succeeded ✓ | 2024-01-15 10:30 | 2 hours | true |
| `database-01-daily-backup` | `database-01` | Succeeded ✓ | 2024-01-14 02:00 | 1 day | true |
| `web-server-backup` | `web-server` | Succeeded ✓ | 2024-01-13 03:00 | 2 days | true |

**Total Snapshots**: 3

VMs with snapshots: `database-01` (2), `web-server` (1)
```

### Example 3: No Snapshots Found

```
User: "List snapshots for test-vm"

Agent: "Which namespace is test-vm in?"

User: "dev"

Agent: [Invokes vm-snapshot-list skill]
       [Lists snapshots - none found]

## VM Snapshots

**Namespace**: `dev`
**VM**: `test-vm`

**No snapshots found.**

No snapshots exist for VM `test-vm` in namespace `dev`.

**To create a snapshot:**
"Create snapshot of VM test-vm"
```

Attribution

NVlabsNVlabs
View sourceMore from NVlabs →
SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Related Skills

Terraform Module Library

Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.

397921 votes

sematext-otel

Wire a service's OpenTelemetry output to Sematext Cloud. Walks through region, App-type, instrumentation flow (managed OTLP endpoint vs Sematext Agent), and signal selection (traces/metrics/logs), then produces the exact env-var block and points at a runnable reference example in this repo. Invoke when instrumenting a new app for Sematext.

01 votes

Deployment Patterns

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up deployment infrastructure or planning releases.

2648130 votes

Babysit

Watch a pull request or review cycle until it is ready to merge. Use when asked to babysit, monitor, or keep checking PR comments, reviews, and CI until all actionable issues are resolved.

945230 votes

V7 Roster

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

813270 votes
View all in devops →