ebpf

ebpf is a skill for Claude Code, Codex from mohitmishra786/low-level-dev-skills. It costs 102 tokens per session (2,756 once invoked), scanned A, original, MIT.

A guide to eBPF, a way to run restricted programs for observing and controlling parts of Linux without changing the kernel itself. It covers tracing, data maps, verifier errors, XDP packet processing, and portability across kernel versions.

In plain words
What is it for?
Use it to trace system calls and kernel events, inspect loaded eBPF programs and maps, build XDP packet filters, and write portable eBPF programs with libbpf or bpftrace.
Why use it?
It helps diagnose why an eBPF program is rejected and choose the right tool for tracing, inspection, or high-speed packet handling. It also explains how kernel-side code shares data with normal user programs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to trace system calls and kernel events, inspect loaded eBPF programs and maps, build XDP packet filters, and write portable eBPF programs with libbpf or bpftrace.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mohitmishra786/low-level-dev-skills/ebpf
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mohitmishra786/low-level-dev-skills --skill ebpf
Clone the repo
git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ebpf

README.md
[![agentmods](https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/ebpf/github.svg)](https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/ebpf)
Your own site
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/ebpf"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/ebpf/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ebpf

Your own site · 80×15
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/ebpf"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/ebpf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,756 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 15 Sept 2026
  • Snyk pass 15 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00102 $0.02756
Opus 5.5 $0.00041 $0.01102
Sonnet 5.5 $0.00020 $0.00551
Haiku 4.5 $0.00010 $0.00276

Measured 14d ago against content hash 07e2c5b06a45, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ebpf scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 14d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/observability/ebpf/SKILL.md · 309 lines

How it starts

The opening of the file, as written. The whole thing — 309 lines — stays where its author put it; the contents beside it link to each section on GitHub.

eBPF

Purpose

Guide agents through writing, loading, and debugging eBPF programs using libbpf, bpftrace, and bpftool. Covers map types, program types, verifier errors, XDP networking, and CO-RE portability.

Triggers

  • "How do I write an eBPF program to trace system calls?"
  • "My eBPF program fails with a verifier error"
  • "How do I use bpftrace to trace kernel events?"
  • "How do I share data between kernel eBPF and userspace?"
  • "How do I write an XDP program for packet filtering?"
  • "How do I make my eBPF program portable across kernel versions (CO-RE)?"

Workflow

1. Choose the right tool

Goal?
├── One-liner kernel tracing / scripting → bpftrace
├── Production eBPF program with userspace → libbpf (C) or aya (Rust)
├── Inspect loaded programs and maps → bpftool
└── High-performance packet processing → XDP + libbpf

2. bpftrace — quick kernel tracing

# Trace all execve calls with comm and args
bpftrace -e 'tracepoint:syscalls:sys_enter_execve { printf("%s %s\n", comm, str(args->filename)); }'

# Count syscalls by process
bpftrace -e 'tracepoint:raw_syscalls:sys_enter { @[comm] = count(); }'

# Latency histogram for read() syscall
bpftrace -e '
  tracepoint:syscalls:sys_enter_read { @start[tid] = nsecs; }
  tracepoint:syscalls:sys_exit_read  { @us = hist((nsecs - @start[tid]) / 1000); delete(@start[tid]); }'

# List available tracepoints
bpftrace -l 'tracepoint:syscalls:*'
bpftrace -l 'kprobe:tcp_*'

3. libbpf skeleton — minimal C program

// counter.bpf.c — kernel-side
#include <vmlinux.h>
#include <bpf/bpf_helpers.h>

struct {
    __uint(type, BPF_MAP_TYPE_HASH);
    __type(key, u32);
    __type(value, u64);
    __uint(max_entries, 1024);
} call_count SEC(".maps");

SEC("tracepoint/syscalls/sys_enter_read")
int trace_read(struct trace_event_raw_sys_enter *ctx)
{
    u32 pid = bpf_get_current_pid_tgid() >> 32;
    u64 *cnt = bpf_map_lookup_elem(&call_count, &pid);
    if (cnt)
        (*cnt)++;
    else {
        u64 one = 1;
        bpf_map_update_elem(&call_count, &pid, &one, BPF_ANY);
    }
    return 0;
}

char LICENSE[] SEC("license") = "GPL";

Read the full file on GitHub · 309 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 14d ago Changed · +1 lines 07e2c5b06a45
  2. 3mo ago First seen · 308 lines · 102 tokens per session scan A 4e5fc7080401

Subscribe to this mod's changes

ebpf is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (310 stars, last pushed 14d ago), licensed MIT. It adds 102 tokens to every session and 2,756 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

ebpf compared with skills from other repositories

ebpf next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ebpfmohitmishra786/low-level-dev-skillsSkill31014d agoMITA102Claude Code, Codex
push-notification-testerteam-telnyx/aiSkill232yesterdayMITA55Claude Code
log-analyzermoonlight-lupin/agent-skillsSkill1375d agoMITA52Claude Code, Codex
debugmoonlight-lupin/agent-skillsSkill1375d agoMITA104Claude Code, Codex
organic-traffic-drop-diagnosiscoupler-io/skillsSkill452d agoMITA187Claude Code
tiktok-ads-conversion-tracking-and-pixel-auditcoupler-io/skillsSkill452d agoMITA107Claude Code
error-handlerEliasOulkadi/shokuninSkill1122mo agoMITA125Claude Code