Kernel
Avoid common Linux kernel mistakes — atomic context violations, allocation failures, and locking traps.
от clawic★ 23 звезды на GitHub
Установить Kernel в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Atomic Context Traps
spin_lockheld = cannot sleep — nokmalloc(GFP_KERNEL), nomutex_lock, nocopy_from_user- Interrupt can take same spinlock — must use
spin_lock_irqsave, not plainspin_lock rcu_read_lock()section cannot sleep — no blocking calls inside RCU read-sidemight_sleep()annotation — add to functions that may sleep, catches bugs withCONFIG_DEBUG_ATOMIC_SLEEP
Allocation Failures
GFP_ATOMICcan return NULL — always check, don't assume successvmallocmemory not physically contiguous — cannot use for DMAkzallocoverkmalloc— uninitialized memory leaks kernel info to userspace- Allocation in loop risks OOM — preallocate or use memory pool
User Pointer Handling
copy_from_userreturns bytes NOT copied — 0 means success, not failure- Never use
%swith user pointer in printk — kernel crash or info leak - User memory can change during syscall — copy to kernel buffer, validate the copy
__userannotation is documentation — doesn't enforce anything, you must use copy functions
Memory Ordering
READ_ONCE/WRITE_ONCEfor lockless shared data — prevents compiler from caching/reordering- Spinlock release has implicit barrier — but check-then-act patterns still need care
smp_wmb()before publishing pointer — ensures data visible before pointer is
Module Error Paths
- Init fails midway — must undo everything already done
- Reverse order cleanup — unregister in opposite order of register
goto err_*pattern standard — cleaner than nested ifs- Check what's actually initialized — don't free/unregister what wasn't set up
Locking Mistakes
- Same lock acquired twice = deadlock — even in different functions
- Inconsistent lock ordering — document order, acquire in same sequence everywhere
mutex_trylockreturns 1 on success — opposite ofpthread_mutex_trylock- Reader-writer locks rarely worth it — contention overhead usually exceeds benefit
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- _meta.json
FAQ
Что делает скилл Kernel?
Avoid common Linux kernel mistakes — atomic context violations, allocation failures, and locking traps.
Как установить скилл Kernel?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Kernel запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…