Agent skill
kernel-basics
Essential Zephyr RTOS kernel services. Covers thread lifecycle and priority, the logging subsystem for diagnostics, and the interactive shell for real-time hardware inspection and debugging. Trigger when writing application flows, adding logging to modules, or creating interactive CLI commands.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/kernel-basics
SKILL.md
Zephyr Kernel Basics
Master the essential services that bring your Zephyr application to life.
Core Workflows
1. Threads & Scheduling
Create and manage multi-threaded application flows.
- Reference: threads.md
- Key Tools:
K_THREAD_DEFINE,k_sleep,k_yield, Priorities.
2. Logging & Diagnostics
Implement layered logging for better observability and troubleshooting.
- Reference: logging.md
- Key Tools:
LOG_MODULE_REGISTER,LOG_INF,LOG_ERR, Dynamic Filtering.
3. Interactive Shell (CLI)
Build powerful command-line interfaces for hardware and software inspection.
- Reference: shell.md
- Key Tools:
SHELL_CMD_REGISTER,SHELL_STATIC_SUBCMD_SET_CREATE.
Quick Start (Logging)
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(my_app, CONFIG_APP_LOG_LEVEL);
void my_fn(void) {
LOG_INF("Hello from Zephyr!");
}
Quick Start (Threads)
K_THREAD_DEFINE(worker_tid, 1024, worker_fn, NULL, NULL, NULL, 5, 0, 0);
Automation Tools
- log_summary.py: Parse Zephyr runtime logs and summarize counts by level/module.
Examples & Templates
- shell_command_template.c: Starter command set for shell registration patterns.
Validation Checklist
- Log output includes module tag and expected log level filtering.
- At least one worker thread starts and runs at the intended priority.
- Shell command registration appears in
helpoutput and executes without faults. - No blocking or mutex misuse appears in ISR-context paths.
Resources
- References:
threads.md: Configuration and creation of kernel threads.logging.md: Log levels, modules, and backends.shell.md: Interactive command registration and subcommands.
- Scripts:
log_summary.py: Runtime log summarizer for quick diagnostics.
- Assets:
shell_command_template.c: Shell command registration template.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?