kernel-testing

kernel-testing is a skill for Claude Code, Codex from mohitmishra786/low-level-dev-skills. It costs 78 tokens per session (1,586 once invoked), scanned B, original, MIT.

A guide to testing Linux kernel code with tools such as KUnit, kselftest, syzkaller, and the Linux Test Project. These cover focused in-kernel tests, broader self-tests, automated fuzzing, and system-call compatibility checks.

In plain words
What is it for?
Writing kernel unit tests, adding self-tests, fuzzing system calls and ioctl interfaces, measuring kernel coverage, and connecting tests to continuous integration.
Why use it?
It helps catch kernel regressions, unsafe inputs, and compatibility problems before changes reach real systems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./tools/testing/kunit/kunit.py run.

Good fit Writing kernel unit tests, adding self-tests, fuzzing system calls and ioctl interfaces, measuring kernel coverage, and connecting tests to continuous integration.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills
agentmods
npx agentmods add skills/mohitmishra786/low-level-dev-skills/kernel-testing

Made for: Claude Code, 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 kernel-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/kernel-testing/github.svg)](https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/kernel-testing)
Your own site
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/kernel-testing"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/kernel-testing/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 kernel-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/kernel-testing"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/kernel-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,586 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.
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.00078 $0.01586
Opus 5.5 $0.00031 $0.00634
Sonnet 5.5 $0.00016 $0.00317
Haiku 4.5 $0.00008 $0.00159

Measured 15d ago against content hash 0360ce313256, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

kernel-testing 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 15d 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.

| LTP massive failures | Wrong environment | Run as root; check prerequisites in README |
skills/kernel/kernel-testing/SKILL.md · 241 lines

How it starts

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

Kernel Testing

Purpose

Guide agents through testing the Linux kernel: KUnit in-kernel unit tests, the kselftest harness, syzkaller fuzzing with kcov coverage, Linux Test Project (LTP) syscall regression, and KernelCI integration for continuous testing.

Triggers

  • Writing unit tests for kernel library code or driver helpers
  • Adding regression tests to tools/testing/selftests/
  • Fuzzing syscalls and ioctl interfaces with syzkaller
  • Measuring kernel code coverage with kcov
  • Running LTP for syscall compatibility validation
  • Setting up CI for kernel patches

Workflow

1. KUnit — in-kernel unit tests

// test_example.c
#include <kunit/test.h>

static void example_test(struct kunit *test)
{
    KUNIT_EXPECT_EQ(test, 1 + 1, 2);
    KUNIT_ASSERT_NOT_ERR_OR_NULL(test, kmalloc(16, GFP_KERNEL));
}

static struct kunit_case example_test_cases[] = {
    KUNIT_CASE(example_test),
    {}
};

static struct kunit_suite example_suite = {
    .name = "example",
    .test_cases = example_test_cases,
};
kunit_test_suite(example_suite);

MODULE_LICENSE("GPL");
# Makefile
obj-$(CONFIG_KUNIT) += test_example.o
# Run KUnit (in-tree)
./tools/testing/kunit/kunit.py run

# Run specific test
./tools/testing/kunit/kunit.py run --filter example

# With cross-compilation
./tools/testing/kunit/kunit.py run --cross_compile aarch64-linux-gnu- \
    --arch arm64

KUnit runs in kernel context (UMH or dedicated kunit kernel). Use kunit_kmalloc for test allocations.

2. kselftest harness

# Build all selftests
cd tools/testing/selftests
make -j$(nproc)

# Run all
make run_tests

# Run specific test
./memfd/memfd_test
./mount/run_unprivileged_remount.sh

Adding a new selftest:

tools/testing/selftests/mytest/
├── Makefile
├── mytest.c
└── config        # optional kconfig requirements
# tools/testing/selftests/mytest/Makefile
CFLAGS += -Wall
TEST_GEN_FILES := mytest
TEST_PROGS := mytest

include ../lib.mk

Read the full file on GitHub · 241 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. 15d ago Changed · +2 lines 0360ce313256
  2. 3mo ago First seen · 239 lines · 78 tokens per session scan B 37babc4a8c3a

Subscribe to this mod's changes

kernel-testing is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (311 stars, last pushed today), licensed MIT. It adds 78 tokens to every session and 1,586 once invoked, about $0.0003 per session on Opus 5.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-03.

Related

kernel-testing compared with skills from other repositories

kernel-testing next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kernel-testingmohitmishra786/low-level-dev-skillsSkill311todayMITB78Claude Code, Codex
test-commanderEliasOulkadi/shokuninSkill1122mo agoMITA117Claude Code
testingjkaninda/okapi-skillsSkill43mo agoMITA0Claude Code, Codex
test-writerCODE-SAURABH/OpenSkillsSkill64mo agoMITA67Claude Code, Codex
migrate-xunit-to-xunit-v3dotnet/skillsSkill6.5ktodayMITA149Claude Code
go-testingGentleman-Programming/gentle-aiSkill9.8kyesterdayMITA26Claude Code, Codex
product-description-generatornexscope-ai/eCommerce-SkillsSkill1.6k2d agoMITA126Claude Code, Codex