kernel-dev

A development tool for building Linux kernels and kernel modules, which are add-on pieces of kernel code such as drivers. It installs dependencies and supports RPM-based systems, including Alibaba Cloud Linux, on Intel/AMD and ARM 64-bit machines.

In plain words
What is it for?
Use it to set up a kernel development environment, build an official or upstream Linux kernel, compile sample modules, and verify kernel vulnerability fixes. It requires Linux and root access.
Why use it?
It prepares the compiler and kernel development files needed for low-level Linux work. It also provides two documented ways to build a kernel and a way to test a sample module.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/alibaba/anolisa/kernel-dev
Any agent
npx skills add alibaba/anolisa --skill kernel-dev
Clone the repo
git clone --depth 1 https://github.com/alibaba/anolisa

Made for: Claude Code, Codex.

Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,926 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
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 $0.00112 $0.04926
Opus 5 $0.00056 $0.02463
Sonnet 5 $0.00022 $0.00985
Haiku 4.5 $0.00011 $0.00493

Measured 2d ago against content hash 2242de3ff52a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

kernel-dev scanned grade B with 2 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 2d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/build-kernel.sh, scripts/check-env.sh, scripts/install-deps.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

sudo yum install -y \

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

git ccache dwarves wget curl kmod \
src/os-skills/devops/kernel-dev/SKILL.md · 677 lines

How it starts

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

Kernel Development - Linux 内核研发自动化

核心定位

五大功能:

  1. 依赖检测与安装 - 自动检测并安装内核开发所需的软件包
  2. 工具链安装 - 安装编译器(gcc)、make、git 等开发工具
  3. 内核 devel 包安装 - 下载并安装当前系统内核的 devel 包
  4. 内核编译 - 支持两种编译方法:
    • SRPM 方法:Alinux4 官方内核,输出 RPM 包,适合生产环境
    • Upstream 方法:kernel.org 最新内核,编译快速,适合新特性测试
  5. Module 编译测试 - 测试编译示例内核 module

支持架构:

  • x86_64 — Intel/AMD 64 位服务器
  • aarch64 — ARM 64 位服务器(如倚天 710)

重要约束:

  • 🔒 需要 root 权限执行内核相关操作
  • 📦 仅Linux操作系统
  • ⚠️ 内核编译会消耗大量系统资源(建议至少 4GB 内存)
  • ⏱️ 编译时间:SRPM 方法 1-3 小时,Upstream 方法 30-60 分钟

快速开始

一键搭建开发环境

# 1. 检测系统架构
ARCH=$(uname -m)
KERNEL_VER=$(uname -r)
echo "架构: $ARCH | 内核: $KERNEL_VER"
# x86_64 示例输出:架构: x86_64 | 内核: 6.6.102-5.2.alnx4.x86_64
# aarch64 示例输出:架构: aarch64 | 内核: 6.6.102-5.2.alnx4.aarch64

# 2. 检查 Alinux4 系统
grep -i 'alinux\|alnx' /etc/os-release || echo "[警告] 非 Alinux4 系统"

# 3. 安装所有依赖(两种架构通用)
sudo yum install -y \
  gcc gcc-c++ make binutils \
  flex bison \
  libelf-devel openssl-devel ncurses-devel \
  pahole perl python3 python3-devel \
  git ccache dwarves wget curl kmod \
  rpm-build rpmdevtools

# 4. 安装内核 devel 包(yum 自动匹配当前架构)
sudo yum install -y kernel-devel-$KERNEL_VER kernel-headers-$KERNEL_VER

# 5. 验证环境
ls -l /lib/modules/$KERNEL_VER/build
gcc --version

# 6. 编译内核(可选,两种方法)
# 方法 A: Upstream 方法(推荐,快速)
sudo ./scripts/build-kernel.sh upstream latest 8 defconfig

# 方法 B: SRPM 方法(Alinux4 官方)
sudo ./scripts/build-kernel.sh srpm 6.6.102-5.2.alnx4.x86_64

创建第一个内核模块

MODULE_NAME="hello_module"
mkdir -p $MODULE_NAME && cd $MODULE_NAME

# 创建模块代码
cat > ${MODULE_NAME}.c << 'EOF'
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Alinux4 Kernel Dev");
MODULE_DESCRIPTION("Hello World kernel module for alnx4");
MODULE_VERSION("0.1");

static int __init hello_init(void)
{
    printk(KERN_INFO "hello_module: Module loaded (alnx4)\n");
    return 0;
}

static void __exit hello_exit(void)
{
    printk(KERN_INFO "hello_module: Module unloaded\n");
}

module_init(hello_init);
module_exit(hello_exit);
EOF

# 创建 Makefile
cat > Makefile << 'EOF'
obj-m += hello_module.o

KERNEL_DIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)

all:
	make -C $(KERNEL_DIR) M=$(PWD) modules

clean:
	make -C $(KERNEL_DIR) M=$(PWD) clean

install:
	sudo insmod hello_module.ko

unload:
	sudo rmmod hello_module

.PHONY: all clean install unload
EOF

# 编译和加载
make
sudo make install

# 查看日志
dmesg | tail

# 卸载
sudo make unload

Read the full file on GitHub · 677 lines

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. 2d ago First seen · 677 lines · 112 tokens per session scan B 2242de3ff52a

Subscribe to this mod's changes

kernel-dev is a skill published in the GitHub repository alibaba/anolisa (614 stars, last pushed 3d ago), licensed Apache-2.0. It adds 112 tokens to every session and 4,926 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

beevibe-team-mesh-negotiation

Multi-round negotiation protocol — covers both initiator and peer roles. Use when about to call negotiate(), when receiving a intent block as a peer, or when receiving an 'escalated' sentinel from a blocked respondnegotiate. Covers proposal crafting, counter-strategy, deadlock detection, when to accept early…

beevibe-ai/beevibe · 112 tokens

beevibe-verify-pr

CI verification before marking a PR-bearing task done. Use BEFORE calling mcpbeevibeupdateprogress(done) on any session whose deliverable is a pull request — including the first dispatch (you opened the PR with gh pr create) and any revision dispatch (you pushed new commits to an existing PR). Watches the PR's…

beevibe-ai/beevibe · 172 tokens

beevibe-pre-task-setup

Cold-start git workspace setup for a fresh beevibe task. Use at the start of a session whose intent has a block but NO or block — i.e. the first dispatch of this task. Checks for an existing repo clone, pulls the base branch if present (clone if missing), prunes any per-task worktrees from earlier tasks whose work has…

beevibe-ai/beevibe · 198 tokens

beevibe-use-repo

You are the child agent inside a fresh Docker sandbox. Borrow the given GitHub repo, produce a real artifact for the goal, and export it. Do not review the repo. The proof is that it works.

beevibe-ai/beevibe · 50 tokens

spec-converge

Iteratively review an instar-development spec with multi-angle internal reviewers (security, scalability, adversarial, integration, decision-completeness, lessons-aware) and real cross-model external reviewers routed through the agent's own installed CLIs (codex → GPT-tier, gemini → Gemini-tier; one pass per available…

JKHeadley/instar · 135 tokens

beevibe-discover-repo

Find the best GitHub repo for a goal, then call userepo to run it in a sandbox. Use whenever the user's goal requires a capability you don't have natively and you haven't been given a specific repo.

beevibe-ai/beevibe · 51 tokens