Skip to content
Back to skills

Kernel Basics

ASecurity

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.

  • 63 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 1, 2026
developmentshelldebuggingbackend

Works with

  • cli

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 1, 2026

npx -y skills add beriberikix/zephyr-agent-skills --skill kernel-basics --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Kernel Basics?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Kernel Basics
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/beriberikix-kernel-basics/badge)](https://www.skillsdirectory.com/skills/beriberikix-kernel-basics)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: kernel-basics
description: 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.
---

# 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](references/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](references/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](references/shell.md)**
- **Key Tools**: `SHELL_CMD_REGISTER`, `SHELL_STATIC_SUBCMD_SET_CREATE`.

## Quick Start (Logging)
```c
#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)
```c
K_THREAD_DEFINE(worker_tid, 1024, worker_fn, NULL, NULL, NULL, 5, 0, 0);
```

## Automation Tools
- **[log_summary.py](scripts/log_summary.py)**: Parse Zephyr runtime logs and summarize counts by level/module.

## Examples & Templates
- **[shell_command_template.c](assets/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 `help` output and executes without faults.
- [ ] No blocking or mutex misuse appears in ISR-context paths.

## Resources

- **[References](references/)**:
  - `threads.md`: Configuration and creation of kernel threads.
  - `logging.md`: Log levels, modules, and backends.
  - `shell.md`: Interactive command registration and subcommands.
- **[Scripts](scripts/)**:
  - `log_summary.py`: Runtime log summarizer for quick diagnostics.
- **[Assets](assets/)**:
  - `shell_command_template.c`: Shell command registration template.

Files in this skill

  • SKILL.md2.4 KB
  • assets/shell_command_template.c821 B
  • references/logging.md997 B
  • references/shell.md977 B
  • references/threads.md1.6 KB
  • scripts/log_summary.py1.8 KB
  • skill-meta.yaml479 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.