ebpf-rust

ebpf-rust is a skill for Codex from OutlineDriven/outline-driven-development. It costs 54 tokens per session (2,242 once invoked), scanned B, original, Apache-2.0.

A Rust toolkit guide for writing eBPF programs with Aya. eBPF lets small programs run inside the Linux kernel to observe or handle events, while Rust is used for the program and its user-space loader.

In plain words
What is it for?
Use it when building or debugging Rust eBPF programs, kernel maps, Aya loaders, or attachments such as tracepoints, probes, XDP, TC, or LSM.
Why use it?
It addresses the specialised setup needed to share kernel data with a user-space program, emit logs, and diagnose loading failures.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it when building or debugging Rust eBPF programs, kernel maps, Aya loaders, or attachments such as tracepoints, probes, XDP, TC, or LSM.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/outlinedriven/outline-driven-development/ebpf-rust
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 OutlineDriven/outline-driven-development --skill ebpf-rust
Clone the repo
git clone --depth 1 https://github.com/OutlineDriven/outline-driven-development

Made for: 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-rust

README.md
[![agentmods](https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/ebpf-rust/github.svg)](https://agentmods.dev/skills/outlinedriven/outline-driven-development/ebpf-rust)
Your own site
<a href="https://agentmods.dev/skills/outlinedriven/outline-driven-development/ebpf-rust"><img src="https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/ebpf-rust/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-rust

Your own site · 80×15
<a href="https://agentmods.dev/skills/outlinedriven/outline-driven-development/ebpf-rust"><img src="https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/ebpf-rust.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,242 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Privilege Escalation · line 173
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
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.00054 $0.02242
Opus 5 $0.00027 $0.01121
Sonnet 5 $0.00011 $0.00448
Haiku 4.5 $0.00005 $0.00224

Measured 3d ago against content hash 794ae01a8e29, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

ebpf-rust scanned grade B with 1 finding 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 3d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| `Permission denied` | No `CAP_BPF` or `CAP_SYS_ADMIN` | Run as root or grant the capability |
.devin/skills/ebpf-rust/SKILL.md · 191 lines

How it starts

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

eBPF in Rust with Aya

Contract

Field Bound contract
Trigger An eBPF program is being written in Rust, a kernel-side map must be read from user space, log lines must come out of a BPF program, or an Aya program fails to load.
Authority Reversible local. The write set is the project's source tree, the built objects, and programs and maps loaded into the running kernel while the loader runs. Rollback is stopping the loader, which detaches and unloads; pinned objects are removed with rm under /sys/fs/bpf. Loading needs CAP_BPF or root. No remote mutation.
Side effect Kernel state changes while the loader runs.
Done cargo run --release loads and attaches the program, log lines or map entries appear for a live event, and the loader exits cleanly on Ctrl-C.

Inputs

  • Program type and attach point (required): tracepoint, kprobe, uprobe, XDP, TC, LSM, or another type from the table in step 4.
  • Kernel (required): BTF at /sys/kernel/btf/vmlinux for portability. Grounded floor is Linux 7.2 mainline or 6.18 LTS; every kernel feature named here exists on both.
  • Toolchain (required): stable Rust plus a nightly with rust-src, bpf-linker, cargo-generate, and bpftool. The grounded Rust edition is 2024.

Procedure

  1. Set up the toolchain and generate the project. Done when: cargo build succeeds on the fresh template.
rustup toolchain install stable
rustup toolchain install nightly --component rust-src
cargo install bpf-linker
cargo install cargo-generate
cargo generate https://github.com/aya-rs/aya-template   # prompts for name and program type

The template lays out <name>/ (user-space crate), <name>-ebpf/ (kernel-side crate), and <name>-common/ (shared types). A build script compiles the eBPF crate and embeds the object, so ordinary cargo build, cargo check, and cargo run --release drive both sides; there is no separate build step.

  1. Write the kernel side with aya-ebpf and aya-log-ebpf. Done when: the crate compiles for the BPF target.

Read the full file on GitHub · 191 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. 3d ago First seen · 191 lines · 54 tokens per session scan B 794ae01a8e29

Subscribe to this mod's changes

ebpf-rust is a skill published in the GitHub repository OutlineDriven/outline-driven-development (52 stars, last pushed 3d ago), licensed Apache-2.0. It adds 54 tokens to every session and 2,242 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-06.

Related

Other skills, from other repositories

stack-trace-rust-probe

Internal helper for meta-stack-trace-investigator. Use when a Rust panic or backtrace needs Rust-specific Result/Option checks, cargo test guidance, and patch targets.

opensquilla/opensquilla · 42 tokens

clickhouse-rust-type-mismatches

Fix ClickHouse query errors in Rust when using clickhouse-rs crate. Use when: (1) "string is not valid utf8" errors - typically FixedString columns need CAST to String, (2) "tag for enum is not valid" errors - typically Option fields receiving non-NULL values, (3) Sum/count aggregations returning Float64 but Rust…

divinevideo/divine-mobile · 280 tokens

memory-safety-patterns

Implement memory-safe programming with RAII, ownership, smart pointers, and resource management across Rust, C++, and C. Use when writing safe systems code, managing resources, or preventing memory bugs.

rmyndharis/antigravity-skills · 45 tokens

delphi-legacy

Especialista em modernização de código Delphi legado. Auto-ativa quando detectar: "legado", "antigo", "modernizar", "migrar", "refatorar sistema", String[N], ShortString, AnsiString (em contexto de migração), código com with em todo lugar, ausência total de interfaces, SQL concatenado, Delphi 7/2007/2009/XE/XE2.

adrianosantostreina/delphi-dev · 91 tokens

rust-doctor

Use when Rust code just changed and must not regress, when the user asks to scan, audit or health-check a Cargo workspace, says "rust-doctor", or wants one of its findings explained, tuned or switched off.

arthjean/rust-doctor · 49 tokens

rust-build-optimization

Use when a Rust or Cargo build is slow and the user wants it diagnosed or sped up: profiling compile times with cargo --timings or -Zself-profile, finding whether the bottleneck is dependencies, codegen/LLVM, linking, or one oversized crate, and applying targeted fixes such as faster linkers (lld, mold, wild)…

bahayonghang/my-ai-cli-toolkit · 147 tokens