linux-kernel-architecture — Claude Code skill: Linux kernel map
Gives your agent a map of the Linux kernel: boot sequence, major subsystems, initcall levels, and where code lives in linux.git.
npx skills add mohitmishra786/low-level-dev-skills --skill linux-kernel-architecture -a claude-codeWhat linux-kernel-architecture does
The skill breaks the kernel into navigable pieces: the path from firmware/UEFI through start_kernel() and rest_init() to init in userspace. It also lays out initcall levels from early_initcall to late_initcall, noting that platform drivers usually register at subsys_initcall or through module_init. That answers why a driver probes earlier or later than you expected.
A subsystem table pairs typical paths with key structs: the scheduler in kernel/sched/ with task_struct, memory in mm/ with struct page and mm_struct, VFS in fs/ with inode and dentry, plus block, net, and drivers. Common symptoms get their own table — a missing symbol because it was built as a module, a boot hang from disabled early printk.
It complements skills/kernel/kernel-internals but stays at the architecture level, aimed at driver and subsystem work. If you are opening linux.git for the first time over a feature or a bug, start here, then move to skills/kernel-dev/platform-device-model or skills/kernel-dev/device-tree.
What it helps with
- find which kernel directory holds a given subsystem
- work out why a driver probes too early
- trace the path from boot to init
- tell which initcall level a platform driver registers at
- diagnose a symbol that will not resolve at build time
Example prompts for the agent
- /linux-kernel-architecture Where does page fault handling live and what calls it?
- /linux-kernel-architecture Which initcall level does a platform driver register at?
- /linux-kernel-architecture Walk me through the boot path up to systemd
How to install linux-kernel-architecture
1Skills CLI (Vercel)
npx skills add mohitmishra786/low-level-dev-skills --skill linux-kernel-architecture -a claude-code2Manually: put the files in place
~/.claude/skills/linux-kernel-architecture/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/linux-kernel-architecture/
1Skills CLI (Vercel)
npx skills add mohitmishra786/low-level-dev-skills --skill linux-kernel-architecture -a codex2Manually: put the files in place
.agents/skills/linux-kernel-architecture/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add mohitmishra786/low-level-dev-skills --skill linux-kernel-architecture -a cursor2Manually: put the files in place
.cursor/skills/linux-kernel-architecture/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install mohitmishra786/low-level-dev-skills linux-kernel-architecture2Manually: put the files in place
.github/skills/linux-kernel-architecture/SKILL.md1Skills CLI (Vercel)
npx skills add mohitmishra786/low-level-dev-skills --skill linux-kernel-architecture -a gemini-cli2Platform CLI
gemini skills install https://github.com/mohitmishra786/low-level-dev-skills --path skills/kernel-dev/linux-kernel-architectureManually: put the files in place
.devin/skills/linux-kernel-architecture/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add mohitmishra786/low-level-dev-skills --skill linux-kernel-architecture -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about linux-kernel-architecture
How do I install linux-kernel-architecture in Claude?
Run npx skills add mohitmishra786/low-level-dev-skills --skill linux-kernel-architecture -a claude-code. The skill file lands at ~/.claude/skills/linux-kernel-architecture/SKILL.md.
What does linux-kernel-architecture do?
It hands the agent a mental map of the Linux kernel: boot sequence, major subsystems with paths and structs, initcall levels, and ways to locate code in linux.git.
How is it different from kernel-internals?
skills/kernel/kernel-internals goes deep on the scheduler, SLUB, and VFS, while this skill covers architecture-level navigation. They pair well for driver and subsystem work.
Source text
SKILL.md · MIT
--- name: linux-kernel-architecture description: Linux kernel architecture skill for subsystem overview. Use when navigating kernel source, understanding boot flow, initcalls, or major subsystems (VFS, scheduler, MM). Activates on queries about kernel architecture, boot process, initcall levels, subsystem layout, or where code lives in linux.git. --- # Linux Kernel Architecture ## Purpose Provide a mental map of the Linux kernel: boot sequence, major subsystems, key data structures, and where to look in source — complementing `skills/kernel/kernel-internals` with architecture-level navigation for driver and subsystem work. ## When to Use - First time exploring `linux.git` for a feature or bug - Understanding how boot reaches `init` and driver `probe` - Tracing a syscall or interrupt through subsystems - Onboarding before `skills/kernel-dev/platform-device-model` or driver skills ## Workflow ### 1. Boot flow (x86/ARM64 simplified) ``` firmware/UEFI ├── arch/*/boot — decompress kernel, early setup ├── start_kernel() — mm, scheduler, timers, IRQ subsys ├── rest_init() → kernel_init → run_init_process └── userspace init (systemd) ``` Driver `module_init` / `device_initcall` run during `start_kernel` before init. ### 2. Major subsystems | Subsystem | Path (typical) | Key structs | |-----------|----------------|-------------| | Scheduler | `kernel/sched/` | `task_struct`, `sched_entity` | | Memory | `mm/` | `struct page`, `mm_struct`, `vm_area_struct` | | VFS | `fs/` | `inode`, `dentry`, `file`, `super_block` | | Block | `block/` | `request_queue`, `gendisk` | | Net | `net/` | `sk_buff`, `net_device` | | Drivers | `drivers/` | `device`, `device_driver` | | Syscalls | `kernel/`, `fs/`, `mm/` | `SYSCALL_DEFINE*` | ### 3. Initcall levels ```c /* include/linux/init.h — order matters */ early_initcall → core_initcall → postcore_initcall → arch_initcall → subsys_initcall → fs_initcall → device_initcall → late_initcall ``` Platform drivers usually register at `subsys_initcall` or via `module_init`. ### 4. Finding code ```bash # Locate symbol grep -rn "platform_driver_register" drivers/ # Trace config ./scripts/config --state CONFIG_FOO # File hierarchy docs ls Documentation/admin-guide/ ``` ### 5. Agent usage ``` /linux-kernel-architecture Where does page fault handling live and what calls it? ``` ## Common Problems | Symptom | Cause | Fix | |---------|-------|-----| | Driver probes too early | Initcall vs DT ordering | Defer with `deferred_probe` | | Symbol missing | Built as module | `modprobe` or built-in `CONFIG_*` | | Wrong subsystem | Similar names in `drivers/` | Follow `struct bus_type` | | Boot hang | Early printk disabled | `earlyprintk`, `initcall_debug` | ## Related Skills - `skills/kernel/kernel-internals` — scheduler, SLUB, VFS depth - `skills/kernel-dev/kernel-memory-management` — mm/ details - `skills/kernel-dev/platform-device-model` — driver model - `skills/kernel-dev/device-tree` — hardware description - `skills/low-level-programming/linux-kernel-modules` — LKM basics
© mohitmishra786 · MIT · mohitmishra786/low-level-dev-skills