agentleFS
MicrosoftKnown publishermicrosoft/ebpf-for-windows/.github/copilot-instructions.md

ebpf-for-windows

Copilot instructions3.6k starsChanged 8 months agoMITView on GitHub

This project brings eBPF (extended Berkeley Packet Filter) to Windows, enabling programmable OS kernel extensions for use cases like network filtering and observability. See docs/GettingStarted.md for prerequisites, build options, and detailed setup. See docs/AutomatedTests.md for test categories and descriptions.

Trending

Quiet since July.about the whole repository

Dec 2025: 1 mentionJan 2026: 1 mentionFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 2 mentionsJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/ebpf-for-windows repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/ebpf-for-windows

The biggest 5 of 42 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 42

Talked about on GitHub, Bluesky and Hacker News (42 times).

On GitHub · 32

27 more on GitHub

On Bluesky · 7

2 more on Bluesky

On Hacker News · 3

The file

We split this copilot-instructions.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Types: Use stdint.h fixed-width types (uint32_t, not int)

    line 82

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

eBPF for Windows - Copilot Instructions

This project brings eBPF (extended Berkeley Packet Filter) to Windows, enabling programmable OS kernel extensions for use cases like network filtering and observability.

Quick Reference

TaskCommand
Buildmsbuild /m /p:Configuration=Debug /p:Platform=x64 ebpf-for-windows.sln
Build (native only)msbuild /m /p:Configuration=NativeOnlyDebug /p:Platform=x64 ebpf-for-windows.sln
Format code./scripts/format-code --staged
Run unit testsunit_tests.exe (from x64\Debug)
Run single testunit_tests.exe "test name"
List testsunit_tests.exe -l

See docs/GettingStarted.md for prerequisites, build options, and detailed setup. See docs/AutomatedTests.md for test categories and descriptions.

Architecture Overview

┌─────────────────────────────────────────────────────────────────────┐
│                        User Space                                   │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────────────────┐ │
│  │ bpftool  │  │  netsh   │  │   Apps   │  │  ebpfsvc.exe         │ │
│  └────┬─────┘  └────┬─────┘  └────┬─────┘  │  (JIT/verification)  │ │
│       └─────────────┴─────────────┘        └──────────┬───────────┘ │
│                      │                                │             │
│              ┌───────▼───────┐                        │             │
│              │  ebpfapi.dll  │◄───────────────────────┘             │
│              │  (libbpf API) │                                      │
└──────────────┴───────┬───────┴──────────────────────────────────────┘
                       │ IOCTLs
┌──────────────────────▼──────────────────────────────────────────────┐
│                        Kernel Space                                 │
│  ┌──────────────────────────────────────────────────────────────┐   │
│  │                    ebpfcore.sys                              │   │
│  │              (eBPF execution context)                        │   │
│  │   • Program loading/unloading    • Map management            │   │
│  │   • Interpreter (debug only)     • Native driver execution   │   │
│  └──────────────────────────────────────────────────────────────┘   │
│                              │ NMR (Network Module Registrar)       │
│  ┌───────────────────────────▼──────────────────────────────────┐   │
│  │  Extension Drivers (Hook Providers)                          │   │
│  │  ┌─────────────┐  ┌─────────────┐  ┌───────────────────────┐ │   │
│  │  │netebpfext.sys│ │sample_ext.sys│ │ (custom extensions)  │ │   │
│  │  │ (WFP hooks) │  │  (testing)  │  │                       │ │   │
│  │  └─────────────┘  └─────────────┘  └───────────────────────┘ │   │
│  └──────────────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────────────┘

Key Components

ComponentLocationPurpose
ebpfcore.syslibs/execution_context/, ebpfcore/Kernel execution context for eBPF programs
ebpfapi.dlllibs/api/, ebpfapi/User-mode library exposing libbpf-compatible APIs
ebpfsvc.exelibs/service/, ebpfsvc/Service handling JIT compilation and verification
netebpfext.sysnetebpfext/Network extension providing WFP hooks
bpf2ctools/bpf2c/Converts eBPF bytecode to C for native compilation

External Dependencies (in external/)

  • ebpf-verifier (PREVAIL): Validates eBPF program safety
  • ubpf: JIT compiler and interpreter
  • usersim: User-mode simulation of kernel APIs for testing
  • Catch2: Test framework

Program Execution Modes

  1. Native (preferred): eBPF → bpf2c → C → Windows driver (.sys)
  2. JIT: eBPF bytecode → native code at runtime via ubpf
  3. Interpreter: Direct bytecode execution (debug builds only)

Code Conventions

See docs/DevelopmentGuide.md for full details. Key points:

  • Naming: lower_snake_case for functions/variables, UPPER_SNAKE_CASE for macros, ebpf_ prefix for global names
  • Structs: typedef struct _ebpf_widget { ... } ebpf_widget_t;
  • Types: Use stdint.h fixed-width types (uint32_t, not int)
  • Headers: #pragma once, local includes before system includes, alphabetized
  • Formatting: clang-format 18.1.8, 120-char limit, braces required on single-line blocks
  • License header (required):
    // Copyright (c) eBPF for Windows contributors
    // SPDX-License-Identifier: MIT

Extension Development

eBPF extensions are kernel drivers providing hooks/helpers via NMR. See docs/eBpfExtensions.md.

Crash Dump Debugging

See docs/CrashDumpDebugging.md for instructions on downloading and analyzing crash dumps from CI failures. Use the debug-crash-dump skill for agent-assisted dump analysis.

Tracing

See "Using tracing" section in docs/GettingStarted.md. Quick reference:

tracelog -start MyTrace -guid ebpf-printk.guid -rt
tracefmt -rt MyTrace -displayonly -jsonMeta 0

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.