From kernel-dev
Use when the user wants to build a Linux kernel, configure it, install modules, or cross-compile. Covers make, LLVM/GCC toolchains, config fragments, ccache, and install workflows. Trigger on "build the kernel", "make", "menuconfig", "defconfig", "cross-compile", "install modules".
How this skill is triggered — by the user, by Claude, or both
Slash command
/kernel-dev:kernel-buildThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Check what's available before building:
Check what's available before building: which clang && clang --version # LLVM toolchain which ccache # build cache nproc # core count
# GCC (default)
make -j$(nproc)
# Clang/LLVM
make LLVM=1 -j$(nproc)
# With ccache
make CC="ccache gcc" -j$(nproc)
make LLVM=1 CC="ccache clang" -j$(nproc)
Always check for a project-specific build script (build.py, build.sh, Makefile wrapper) before driving make directly -- many trees have one.
make defconfig # arch default
make olddefconfig # update .config, accept defaults for new symbols
make menuconfig # interactive (human only, never from tool call)
# Merge fragments on top of existing .config
scripts/kconfig/merge_config.sh .config fragment1.config fragment2.config
# Or use make with config items
scripts/config --enable CONFIG_BPF
scripts/config --set-val CONFIG_LOG_BUF_SHIFT 18
scripts/config --disable CONFIG_MODULES
make olddefconfig # resolve dependencies after manual edits
scripts/config --enable CONFIG_DEBUG_INFO_BTF
scripts/config --enable CONFIG_KASAN
scripts/config --enable CONFIG_PROVE_LOCKING
scripts/config --enable CONFIG_DEBUG_INFO_DWARF5
make olddefconfig
make modules_install # installs to /lib/modules/$(make kernelrelease)
make install # installs bzImage + System.map to /boot
# ARM64 with LLVM
make ARCH=arm64 LLVM=1 -j$(nproc) defconfig
make ARCH=arm64 LLVM=1 -j$(nproc)
# ARM64 with GCC cross-compiler
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j$(nproc)
make -j$(nproc) mm/ # rebuild only mm/ objects
make -j$(nproc) kernel/bpf/ # rebuild only kernel/bpf/ objects
make bzImage -j$(nproc) # skip modules entirely (fastest)
make mm/memory.o # compile one .c -> .o
make mm/memory.i # preprocessor output only
make mm/memory.s # assembly output
After building with clang (LLVM=1), generate the compilation database for clangd / IDE integration:
scripts/clang-tools/gen_compile_commands.py
This reads the .*.cmd files left by the build and produces
compile_commands.json in the tree root. Run it after every build (or
after a partial rebuild) so clangd picks up the correct flags.
When building with LLVM=1, always offer to regenerate compile_commands.json after the build completes.
make olddefconfig after ANY manual .config edit -- otherwise
dependencies won't resolve and the build may silently drop symbols.make mrproper nukes .config -- only use when starting fresh.CONFIG_DEBUG_INFO_BTF) requires pahole >= 1.16.make O=/path/to/builddir keeps the source tree
clean but breaks some scripts that assume in-tree build.make -j$(nproc) (or make LLVM=1)scripts/config --enable/--disable then
make olddefconfig then buildmake mm/somefile.omake modules_install,
make install, then boot (or vng)Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub tzussman/kernel-dev-skill --plugin kernel-dev