Skip to content
Skills Library
Programming · Learning & explanation

linux-kernel-architecture

/linux-kernel-architecture

Use when navigating kernel source, understanding boot flow, initcall levels, or major subsystems (VFS, scheduler, MM) in linux.git. Not for driver-model depth: use device-drivers.

Licence
Apache-2.0
Last repository change
28.09.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 28.09.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use when navigating kernel source, understanding boot flow, initcall levels, or major subsystems (VFS, scheduler, MM) in linux.git. Not for driver-model depth: use device-drivers.

Original author description

Use when navigating kernel source, understanding boot flow, initcall levels, or major subsystems (VFS, scheduler, MM) in linux.git. Not for driver-model depth: use device-drivers.

How it works

  1. Contract
  2. Inputs
  3. Procedure
  4. Failure and recovery
  5. Output
Original SKILL.md headings · 61 lines, 638 words
SKILL.md preview
---
name: linux-kernel-architecture
description: 'Use when navigating kernel source, understanding boot flow, initcall levels, or major subsystems (VFS, scheduler, MM) in linux.git. Not for driver-model depth: use device-drivers.'
---

# Linux kernel architecture

## Contract

| Field | Bound contract |
|---|---|
| Trigger | Navigating linux.git or understanding kernel structure: the boot sequence, initcall levels, subsystem layout, key data structures, or locating a symbol or `CONFIG_*` knob. |
| Authority | Read-only. Writes nothing. Chat output only. No remote mutation. |
| Side effect | None. The skill returns navigation guidance and source paths. |
| Done | A boot-flow map, a subsystem path with key structs, an initcall sequence, or a located symbol is delivered, with a deeper-skill pointer when the question crosses into implementation. |

## Inputs

1. Question (required): boot flow, subsystem location, initcall ordering, or symbol lookup.
2. Checkout path (optional): a linux.git tree to search; the answers assume a recent tree (mainline 7.2 or LTS 6.18).
3. Target symbol or config (optional): the name to locate.

## Procedure

1. Classify the question: boot flow, subsystem map, initcall level, or symbol location. Done when: the class is named and the matching step below is chosen.
2. For boot flow, state the sequence with the initcall placement made precise: firmware or UEFI hands off to `arch/*/boot`, which decompresses the kernel and runs early setup; `start_kernel()` initializes core subsystems (mm, scheduler, timers, IRQ); `rest_init()` spawns `kernel_init`, whose `do_basic_setup()` runs `do_initcalls()` through every initcall level; `kernel_init` then calls `run_init_process()` for userspace `init`. Driver `module_init` and built-in `device_initcall` code runs inside that initcall phase, before `init`. Done when: the sequence from firmware to userspace names where initcalls run.
3. For a subsystem question, map the subsystem to its source path and key structures:

   | 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/` | `pt_regs` |

   Done when: the question's subsystem names its path and the structs a reader will meet first.
4. For initcall ordering, read the levels in run order from `include/linux/init.h`: `early_initcall`, `core_initcall`, `postcore_initcall`, `arch_initcall`, `subsys_initcall`, `fs_initcall`, `device_initcall`, `late_initcall`. Platform drivers typically register at `subsys_initcall` or through `module_init` (which lands at `device_initcall` for built-in code). Done when: the requested code sits at a named level relative to its dependencies.
5. For a symbol or config, search the checkout:

   ```bash
   grep -rn "platform_driver_register" drivers/
   ./scripts/config --state CONFIG_FOO
   ls Documentation/admin-guide/
   ```

   Done when: the command output names the defining file or the config state.
6. Route the question when it crosses into implementation: `kernel-memory-management` for `mm/` depth, `device-drivers` for the driver model and hardware description, `virtual-memory-paging-and-tlb` for paging mechanics, `kernel-security` for hardening and mitigations. Done when: the delivered answer states the boundary and names the skill that owns the depth.

## Failure and recovery

| Failure class | Behavior |
|---|---|
| Symbol not found | Widen the grep, or check whether the code is gated behind an unset `CONFIG_*` with `scripts/config`. |
| Driver probes too early | Its initcall level precedes a dependency: move the level later, or return `-EPROBE_DEFER` on the missing supplier. |
| Boot hangs before userspace | Add `earlycon` (or `earlyprintk` on x86) and `initcall_debug` to the command line to see the last boot step. |
| Wrong subsystem | Trace the call chain through `struct bus_type` or the subsystem's ops struct instead of guessing from names. |
| Question needs implementation depth | Hand off to the skill named in step 6. |

## Output

A boot-flow map with initcall placement; a subsystem path and struct table; the initcall sequence with the level for named code; the search command and its result; a deeper-skill pointer when the boundary is reached.
Files in this package (2)
  • SKILL.md 4 KB
  • agents/openai.yaml 1 KB

Versions

RepositoryScoreLicence
This page · OutlineDriven/outline-driven-development100Apache-2.0
mohitmishra786/low-level-dev-skills100MIT

Database snapshot: 13.11.2026 · package version 3962b591e66d (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100kernel-internals
    Linux kernel internals skill for scheduler, memory, and VFS subsystems. Use when analyzing CFS/EEVDF scheduling, buddy/SLUB allocators, page cache, memory zones, OOM killer, or interpreting /proc/meminfo. Activates on queries about kernel scheduler, vruntime, SLUB, vmalloc, page…
  • 100device-driver-development
    Use when developing, reviewing, debugging, porting, or engineering Linux kernel device drivers, kernel modules, device tree bindings, bus clients, subsystem drivers, DMA/IRQ/memory paths, userspace interfaces, or hardware bring-up plans.
  • 100kernel-development
    Use this skill when the user says 'kernel module', 'Linux driver', 'device driver', 'ring 0', 'system call', 'interrupt handler', 'spinlock', 'RCU', 'kernel panic', 'oops', 'write an OS', 'bootloader', 'page tables', 'Rust for Linux'. Covers OS internals and Linux kernel…
  • 100linux-kernel-modules
    Use when writing loadable kernel modules: Kbuild, module parameters, proc and sysfs entries, char devices, or ftrace debugging. Not for driver architecture: use device-drivers.
  • 100linux-kernel-module-development
    Develop production-grade Linux Kernel Modules (LKM), character device drivers (`cdev`), and hardware control abstractions in C. Implement file operations (`open`, `read`, `write`, `unlocked_ioctl`), kernel memory allocators (`kmalloc`, `vmalloc`), spinlocks, mutexes, interrupt…
  • 100device-drivers
    Linux device driver skill for kernel driver development. Use when writing platform/i2c/spi drivers, char device lifecycle, IRQ handling, DMA engine API, regmap, power management, or udev rules. Activates on queries about platform_driver, request_irq, dma_alloc_coherent, regmap,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.