/vibe:miscfrom vibe
Guides usage of less common BPF program types: freplace for hot-patching, struct_ops for kernel callback tables, syscall for privileged loaders, and LWT hooks for routing/tunneling.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Less common types used for program composition, kernel extension, and specialized hooks.
workflows/testing.md.freplace when you need to replace or wrap an already loaded BPF program.struct_ops when implementing kernel callback tables in BPF.syscall only for specialized privileged loader designs.Replaces or wraps an existing loaded BPF program. Used to hot-patch a running program without reloading it.
When to use it:
// The replacement program must match the signature of the target
SEC("freplace/original_prog_name")
int replacement_handler(struct xdp_md *ctx) {
// pre-processing...
// bpf_tail_call into the original, or fully replace it
return XDP_PASS;
}
Attaching (libbpf):
// Open the target object and find the program to replace
struct bpf_program *ext_prog = bpf_object__find_program_by_name(obj, "replacement_handler");
bpf_program__set_attach_prog_fd(ext_prog, target_prog_fd);
bpf_object__load(obj);
struct bpf_link *link = bpf_program__attach(ext_prog);
Notes:
BPF_PROG_TYPE_EXT programs can only be attached to one target at a timeImplements kernel struct operations (e.g. TCP congestion control algorithms, scheduler ops) entirely in BPF. The BPF program replaces a kernel vtable.
When to use it:
// Implement a custom TCP congestion control algorithm
SEC("struct_ops/tcp_init")
void BPF_PROG(my_cc_init, struct sock *sk) { }
SEC("struct_ops/tcp_cong_avoid")
void BPF_PROG(my_cc_cong_avoid, struct sock *sk, u32 ack, u32 acked) { }
SEC("struct_ops/tcp_ssthresh")
u32 BPF_PROG(my_cc_ssthresh, struct sock *sk) { return 0; }
// Register the struct_ops — must match the kernel struct exactly
SEC(".struct_ops")
struct tcp_congestion_ops my_cc = {
.init = (void *)my_cc_init,
.cong_avoid = (void *)my_cc_cong_avoid,
.ssthresh = (void *)my_cc_ssthresh,
.name = "my_bpf_cc",
};
Notes:
bpf_map__attach_struct_ops(skel->maps.my_cc)Allows BPF programs to issue BPF syscalls themselves — enabling one BPF program to load and manage other BPF programs.
When to use it:
SEC("syscall")
int prog_loader(struct pt_regs *ctx) {
// Can call bpf() syscall to create maps, load programs, etc.
return 0;
}
Notes:
CAP_BPF + CAP_PERFMON or CAP_SYS_ADMINHook into the Linux lightweight tunnel subsystem for custom encapsulation/decapsulation logic.
When to use them:
| Type | SEC() | Direction | Use Case |
|---|---|---|---|
lwt_in | SEC("lwt_in") | Ingress | Process inbound tunnel packets |
lwt_out | SEC("lwt_out") | Egress | Process outbound tunnel packets |
lwt_xmit | SEC("lwt_xmit") | Transmit | Custom encapsulation before transmit |
lwt_seg6local | SEC("lwt_seg6local") | SRv6 | Segment Routing v6 local processing |
SEC("lwt_in")
int handle_lwt_in(struct __sk_buff *skb) {
return BPF_OK;
}
SEC("lwt_xmit")
int handle_lwt_xmit(struct __sk_buff *skb) {
// Can call bpf_lwt_push_encap to add encapsulation
return BPF_OK;
}
Attaching:
# Attach via iproute2 route command
ip route add 10.0.0.0/24 encap bpf in obj prog.o sec lwt_in dev eth0
ip route add 10.0.0.0/24 encap bpf xmit obj prog.o sec lwt_xmit dev eth0
Notes:
struct __sk_buff * — similar to TC but in the routing pathlwt_xmit can call bpf_lwt_push_encap to prepend MPLS, IP-in-IP, etc.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job