Linux Kernel Modules
Guide for writing and debugging loadable Linux kernel modules with Kbuild, parameters, and Secure Boot signing.
- CCM score
- 60 of 100
- skills.sh installs
- 740
- GitHub stars
- 303
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the full module lifecycle: minimal init and exit code, Kbuild Makefile, build,
insmod/rmmod, and inspection withmodinfoanddmesg - Includes examples for module parameters,
/procand sysfs interfaces, character device registration, and KGDB andftracedebugging - Enforces GPL-aware symbol export guidance, distinguishing
EXPORT_SYMBOLfromEXPORT_SYMBOL_GPLand the taint warning for non-GPL modules - Designed for kernel developers writing out-of-tree drivers, with KUnit in-kernel unit testing included
Install
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill linux-kernel-modules -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Linux Kernel Modules
Purpose
Guide agents through writing loadable Linux kernel modules (LKMs): the Kbuild build system, module parameters, /proc and sysfs interfaces, character device implementation, kernel debugging with KGDB and ftrace, and module signing for Secure Boot.
Triggers
- "How do I write a Linux kernel module?"
- "How do I add parameters to my kernel module?"
- "How do I create a /proc or sysfs entry?"
- "How do I implement a character device driver?"
- "How do I debug a kernel module with KGDB?"
- "How do I sign a kernel module for Secure Boot?"
Workflow
1. Minimal kernel module
// hello.c — minimal loadable kernel module
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Your Name");
MODULE_DESCRIPTION("Minimal hello world module");
MODULE_VERSION("1.0");
static int __init hello_init(void)
{
printk(KERN_INFO "hello: module loaded\n");
return 0; // non-zero = load failure
}
static void __exit hello_exit(void)
{
printk(KERN_INFO "hello: module unloaded\n");
}
module_init(hello_init);
module_exit(hello_exit);
Details
- Repository
- github.com/mohitmishra786/low-level-dev-skills
- First seen
- Jun 3, 2026
Questions
What does the linux-kernel-modules skill help with?
The linux-kernel-modules skill guides agents through writing and debugging loadable Linux kernel modules. It covers the Kbuild build system, module parameters, /proc and sysfs interfaces, character devices, KGDB and ftrace debugging, and module signing for Secure Boot.
How do I install the linux-kernel-modules skill?
Run npx -y skills add mohitmishra786/low-level-dev-skills --skill linux-kernel-modules -y in your project. Once installed, the agent can write a minimal module with a Makefile, load it with insmod and read its output with dmesg.
Can the skill help me create a /proc or sysfs entry in a kernel module?
Yes, the skill includes worked examples for both interfaces. It shows how to create a /proc entry with proc_create and seq_file, and a sysfs attribute under kernel_kobj that you can read and write from the shell.
Does the skill cover debugging a kernel module with KGDB or ftrace?
Yes, the skill covers KGDB debugging over serial or network and ftrace function tracing through the debugfs tracing files. It also shows how to enable pr_debug output with dynamic debug.
More from mohitmishra786/low-level-dev-skills
All 54- Ebpf736
- Msvc Cl736
- Fuzzing728
- Binutils727
- Linkers Lto721
- Conan Vcpkg717
- Dynamic Linking707
- Rust Security706
- Rust Sanitizers Miri680
- Rust Ffi674
- Rust Unsafe670
- Pgo663
- Interpreters660
- Cargo Workflows657
- Meson654
- Rust Debugging648
- Cpp Modules644
- Hardware Counters637
- Debug Optimized Builds626
- Cpp Templates622
- Rustc Basics620
- Rust Cross614
- Wasm Emscripten603
- Zig Debugging594
Similar to Linux Kernel Modules
kernel-development-skillsPlugindavepoon/buildwithclaude3.8K starsKernel Field Guide: Linux kernel development the way experienced kernel engineers work: driver code and teardown order, devicetree bindings and DTS, Kconfig, de
elf-inspectionSkillmohitmishra786/low-level-dev-skills772 installsGuide to inspecting Linux ELF binaries with readelf, objdump, nm, and ldd for linking and symbol diagnosis.
dynamic-linkingSkillmohitmishra786/low-level-dev-skills707 installsLinux ELF shared library guide covering loading failures, RPATH/RUNPATH, soname versioning, dlopen plugins, and symbol visibility.
nginx-c-modulesSkillpproenca/dot-skills383 installsReference guide of 49 rules for writing, reviewing, and refactoring nginx C modules safely.
nginx-c-module-debugSkillpproenca/dot-skills263 installsStructured debugging guide for nginx C modules covering crashes, memory bugs, GDB analysis, and request tracing.