mcpbeat Sign in

Verify Prevail Agent Skill

> Diagnose eBPF program verification failures from the PREVAIL verifier. Use this skill for linux-compatible eBPF programs verified in the standalone PREVAIL repo (external/ebpf-verifier). For programs using Windows-specific features (bpf2c pipeline, Windows helpers, ebpf-for-windows headers), use the 'verify-bpf' skill instead.

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
3535
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/microsoft/ebpf-for-windows --skill verify-prevail

The instruction itself

11 sections, as written by the author

Diagnose PREVAIL Verification Failures (Linux-Compatible Programs)

Diagnose eBPF program verification failures using the standalone PREVAIL verifier

(external/ebpf-verifier). This skill covers linux-compatible eBPF programs

that can be verified directly with the PREVAIL check or run_yaml tools.

When to Use

  • User shares a PREVAIL verifier error or log and asks why verification failed
  • User asks to diagnose, debug, or explain an eBPF verification failure **in the

PREVAIL repo** (external/ebpf-verifier)

  • User asks to debug PREVAIL YAML test failures or abstract-interpretation issues
  • User is working on verifier internals (abstract domains, widening, transformers)
  • User mentions "verifier", "verification", "PREVAIL", or "abstract interpretation" errors

for linux-compatible BPF programs

When NOT to Use

  • Program uses Windows-specific helpers or headers (e.g., ebpf_helpers.h,

sample_ext_helpers.h, WFP hook types) → use verify-bpf instead

  • User wants to run the bpf2c pipeline (clang → bpf2c → native driver) → use

verify-bpf instead

  • User needs to compile a .c BPF source to .o for ebpf-for-windows → use

verify-bpf instead

Reference Document

Read the full PREVAIL diagnostic reference before diagnosing:

external/ebpf-verifier/docs/llm-context.md

This document contains:

  • How to interpret PREVAIL log output (register state, stack state, invariants)
  • Glossary of log terms, types, type groups, and assertions
  • Common failure patterns with symptoms, causes, and fixes
  • Advanced topics (widening, path-insensitivity, pointer provenance)
  • A step-by-step reasoning protocol for diagnosis

Always read this file first — it is the authoritative reference for PREVAIL diagnostics.

Diagnosis Instructions

Step 1: Read the Reference

Read external/ebpf-verifier/docs/llm-context.md to load the full diagnostic context.

Step 2: Gather the Error

Ask the user to provide (if not already given):

  • The verifier error message (the line with <pc>: <message> (<assertion>))
  • The pre-invariant at the failing instruction
  • The 3–5 instructions leading up to the failure
  • The source code of the eBPF program (or the relevant section)
  • Any map or context definitions (for map/context-related errors)

Step 3: Identify the Failure Pattern

Using the reference document, match the error to one of the common failure patterns:

| Pattern | Key Symptom |

|---------|-------------|

| Uninitialized register | Invalid type (r<N>.type in {...}) |

| Unbounded packet access | Upper bound must be at most packet_size |

| Stack out-of-bounds | Lower bound must be at least r10.stack_offset - EBPF_SUBPROGRAM_STACK_SIZE |

| Null pointer (map lookup) | Possible null access |

| Type mismatch | Only pointers can be dereferenced |

| Pointer arithmetic error | Only numbers can be added to pointers |

| Infinite loop | Loop counter is too large (pc[N] < 100000) |

| Division by zero | Possible division by zero |

| Map key/value mismatch | Illegal map update with a non-numerical value |

| Context bounds violation | Nonzero context offset or context Upper bound error |

| Lost correlation (verifier limitation) | Bounds check present but verifier can't prove safety |

Step 4: Trace the Root Cause

Follow the reasoning protocol from the reference:

  • Check the pre-invariant — what types and constraints do the relevant registers have?
  • Identify missing constraints — what constraint would make the assertion pass?
  • Trace backwards — where was the constraint lost or never established?
  • Check for verifier limitations — is this a code bug or a verifier precision issue?

Step 5: Recommend a Fix

Provide:

  • A clear explanation of why verification failed
  • The specific constraint that is missing or violated
  • A concrete code fix (with before/after examples when possible)
  • If it's a verifier limitation, suggest workarounds (direct pointer comparisons, restructured control flow, etc.)

Important Notes

  • PREVAIL is more conservative than the Linux kernel verifier — code accepted by Linux may be rejected by PREVAIL.
  • PREVAIL is path-insensitive — it uses a single abstract state per program point, so correlated conditions across branches may be lost.
  • Widening at loop headers can destroy constraints — if a loop-related failure occurs, check whether widening eliminated a needed bound.
  • Never assume a register has a type or constraint unless it appears in the pre-invariant.

Other skills for the same job

different authors, same section of the catalogue
Protocolsio Integration
by christophacham
×4

Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.

16k tokens
Tailored Resume Generator
by frostant
×4

Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances

3k tokens
Excalidraw Diagram Generator
by github
vendor ×3

Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.

36k tokens scripts
Expo Dev Client
by openai
vendor ×3

Build and distribute Expo development clients locally or via TestFlight

961 tokens
Executing Plans
by ZhanlinCui
×3

Use when you have a written implementation plan to execute in a separate session with review checkpoints

542 tokens
Anndata
by christophacham
×3

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

16k tokens
Benchling Integration
by christophacham
×3

Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.

14k tokens
Biopython
by christophacham
×3

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

24k tokens

How to use it

Copy the folder

Take microsoft/verify-prevail from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.