Agent Skillsaresbit/MateBot › kernel-dev-skill

kernel-dev-skill

GitHub

用于Linux内核开发、模块编写及故障调试的实用技能,涵盖内存、并发、驱动等核心子系统。适用于构建失败分析、补丁实现、Oops/Panic解码及性能优化,强调最小化变更与证据验证。

skills/kernel-dev-skill/SKILL.md aresbit/MateBot

Trigger Scenarios

内核代码编译或运行失败 需要实现内核模块或子系统补丁 分析Oops/Panic、锁或内存Bug 涉及进程调度、中断或设备模型开发

Install

npx skills add aresbit/MateBot --skill kernel-dev-skill -g -y
More Options

Use without installing

npx skills use aresbit/MateBot@kernel-dev-skill

指定 Agent (Claude Code)

npx skills add aresbit/MateBot --skill kernel-dev-skill -a claude-code -g -y

安装 repo 全部 skill

npx skills add aresbit/MateBot --all -g -y

预览 repo 内 skill

npx skills add aresbit/MateBot --list

SKILL.md

Frontmatter
{
    "name": "kernel-dev-skill",
    "description": "Linux kernel development skill grounded in local references\/labs and references\/lectures materials. Use for kernel modules, system calls, process scheduling, interrupts, locking, memory management, filesystems, networking, architecture, debugging, profiling, and device model work."
}

Linux Kernel Development

Core rule: simple is superior to everything.

This skill is for practical kernel engineering. Use it to analyze failures, choose the smallest relevant subsystem material, make minimal verifiable changes, and validate with evidence.

Use this skill when

  • Kernel code fails to build or run on a target kernel
  • A module, subsystem patch, or lab skeleton needs implementation
  • You need help on process, syscall, interrupt, SMP, memory, filesystem, networking, or architecture topics
  • You are decoding oops/panic, lock bugs, memory bugs, or performance regressions
  • You are working on device-model or driver-adjacent kernel paths

Scope

Includes:

  • kernel modules and build flow
  • kernel API and execution context rules
  • system calls and process interactions
  • interrupts and deferred work
  • SMP and synchronization
  • memory management and mapping
  • filesystems and VFS-facing logic
  • networking stack and net path basics
  • architecture layer and portability concerns
  • debugging and profiling
  • device and driver model

Coverage contract

When responding, ensure the chosen path explicitly maps to one of these kernel components:

  • module lifecycle
  • syscall boundary
  • process/scheduler path
  • interrupts/deferred work
  • locking/SMP behavior
  • memory subsystem (allocation, mapping, lifetime, reclaim-facing assumptions)
  • filesystem/VFS path
  • networking path
  • architecture portability
  • debugging/profiling or device model

If the issue touches memory, call out which memory aspect is involved:

  • allocation/lifetime (kmalloc, vmalloc, kzalloc, free path symmetry)
  • user/kernel copy boundary
  • mapping or virtual memory behavior (mmap, vm area assumptions)
  • context safety (sleeping/atomic constraints)

Excludes:

  • pure user-space programs
  • generic Linux administration without kernel code

Required inputs

Collect minimal hard evidence before proposing a patch:

  • target kernel version, distro, architecture
  • source path and build entry (Makefile / Kbuild / target)
  • first failing build log or runtime log
  • subsystem guess: module, syscall, process, irq, memory, fs, net, arch, driver, or unknown
  • desired outcome: compile fix, runtime fix, behavior change, or learning implementation

Workflow

  1. Freeze baseline. Run one build or collect one complete runtime failure trace.
  2. Classify failure. Place blockers into one class: API break, context violation, concurrency, memory, lifecycle, functional bug, or performance issue.
  3. Route to one reference first. Use references/source-map.md to pick the smallest matching file from references/labs or references/lectures.
  4. Patch one theme per step. Avoid mixing unrelated refactors.
  5. Verify immediately. Rebuild and run one focused check that proves the specific blocker moved.
  6. Expand only after proof. After the first fix is validated, handle next blocker.

Hard rules

  • Minimal, reversible, evidence-based changes.
  • No API claims without code/log evidence.
  • Do not redesign architecture while baseline is broken.
  • Do not hide uncertainty; label assumptions and provide next confirming command.
  • Keep recommendations subsystem-specific, not generic Linux advice.

Command set

make -C /lib/modules/$(uname -r)/build M=$PWD V=1 modules
make -C /lib/modules/$(uname -r)/build M=$PWD W=1 C=1 modules
dmesg -T | tail -n 200
scripts/checkpatch.pl --strict -f path/to/file.c

Add subsystem commands only when they directly test the current blocker.

Subsystem verification rule

For the selected subsystem, include at least one verification step with an expected signal:

  • memory: allocator path, user-copy return handling, or mapping behavior check
  • interrupts: handler registration and interrupt-path signal in logs
  • process/scheduler: task state transition or wake/sleep behavior evidence
  • filesystem: VFS callback path evidence
  • networking: packet path or interface state transition evidence
  • syscall boundary: errno and copy boundary behavior evidence

Output format

1. Subsystem and failure class
2. Evidence used
3. Relevant local material
4. Smallest patch sequence
5. Verification step and expected signal
6. Risks / assumptions

Output must satisfy all items:

  • name one primary kernel component from the coverage contract
  • cite the local material file used for that component (references/labs/*.md or references/lectures/*.md)
  • provide one concrete verification step with expected signal
  • if subsystem is unknown, state the shortest command to disambiguate it

Fast mode

For firefighting requests:

  • show top 3 blockers only
  • map each blocker to one local reference
  • provide smallest next patch and one verification step

References

Version History

  • 2328a17 Current 2026-08-20 10:32

Same Skill Collection

matecode/SKILL.md
skills/3d-cad-skill/SKILL.md
skills/agent-browser/SKILL.md
skills/arkts-agent-skill/SKILL.md
skills/autoresearch-skill/SKILL.md
skills/baoyu-post-to-wechat/SKILL.md
skills/blogwatcher/SKILL.md
skills/c-skill/SKILL.md
skills/chrome-cdp/SKILL.md
skills/claudeception/.claude/skills/continuous-learning/SKILL.md
skills/claudeception/examples/nextjs-server-side-error-debugging/SKILL.md
skills/claudeception/examples/prisma-connection-pool-exhaustion/SKILL.md
skills/claudeception/examples/typescript-circular-dependency/SKILL.md
skills/claudeception/SKILL.md
skills/clawdhub/SKILL.md
skills/coding-agent/SKILL.md
skills/docx/SKILL.md
skills/ebook/book-architect/SKILL.md
skills/ebook/book-idea-validator/SKILL.md
skills/ebook/book-ideation/SKILL.md
skills/ebook/book-market-research/SKILL.md
skills/ebook/chapter-architect/SKILL.md
skills/elf-patcher/SKILL.md
skills/excalidraw-diagram-skill/SKILL.md
skills/frontend-slides/SKILL.md
skills/gemini/SKILL.md
skills/gifgrep/SKILL.md
skills/git-wt/SKILL.md
skills/github/SKILL.md
skills/harmonyos-code-review/SKILL.md
skills/harmonyos-linux-cli-dev/SKILL.md
skills/harmonyos-skills/skills/harmonyos-game-generator/SKILL.md
skills/harmonyos-skills/skills/harmonyos-test-cases/SKILL.md
skills/harmonyos-skills/skills/harmonyos-ui-automator/SKILL.md
skills/harmonyos-skills/skills/ohos-app-build-debug/SKILL.md
skills/hm-fetch-skill/SKILL.md
skills/hm-framework-skill/SKILL.md
skills/humanizer/SKILL.md
skills/ian-gemini-web/SKILL.md
skills/kimi/docx_SKILL.md
skills/kimi/pdf_SKILL.md
skills/kimi/SKILL.md
skills/kimi/webapp-building_SKILL.md
skills/lecture-skill/SKILL.md
skills/macos-menubar-tuist-app/SKILL.md
skills/macos2linuxapp/SKILL.md
skills/matecode/SKILL.md
skills/medialibrary-ut-generator/SKILL.md
skills/mermaid-validator/SKILL.md

Metadata

Files
0
Version
2328a17
Hash
24996f6a
Indexed
2026-08-20 10:32

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 08:53
浙ICP备14020137号-1 $방문자$