Initialize RTOS project knowledge for this plugin. Use when user says: init rtos, initialize project, 初始化项目, 初始化 RTOS, setup rtos project, configure rtos, 配置 RTOS 项目, generate rtos knowledge, or when .claude/rtos-knowledge/ does not exist and any other plugin skill is triggered.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rtos-engineer-toolkit:project-initThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate project-specific knowledge documents in `.claude/rtos-knowledge/` so other skills can work without hardcoding any RTOS-specific rules.
Generate project-specific knowledge documents in .claude/rtos-knowledge/ so other skills can work without hardcoding any RTOS-specific rules.
Ask the user:
What RTOS does this project use? (e.g., NuttX, Zephyr, FreeRTOS, RT-Thread, ThreadX, LiteOS, RTEMS, or other)
Record the answer as RTOS_TYPE.
Identify the current working directory as the project root. Ask the user to confirm:
Project root:
<cwd>— is this correct?
Based on RTOS_TYPE and the project directory, scan for:
| Information | How to detect |
|---|---|
| Build system | Look for Makefile, CMakeLists.txt, build.ninja, envsetup.sh, west.yml, SConstruct |
| Build commands | Infer from build scripts (e.g., make, cmake --build, west build, source envsetup.sh && lunch && m) |
| Toolchain | Look for cross-compiler prefixes in Makefiles/CMake (arm-none-eabi-, riscv64-, xtensa-) |
| Style checker | Look for checkpatch.sh, .clang-format, .astyle, .editorconfig |
| Coding style | Read .clang-format or infer from existing source (indent, line length, brace style, comment style) |
| Commit conventions | Read recent git log --oneline -20 to detect message format pattern |
| Branch/push model | Check for .gitreview (Gerrit), detect remotes |
Show the user a summary of detected information, organized by file:
## Detected Project Profile
- RTOS: <type>
- Build: <command>
- Toolchain: <prefix>
- Style: <rules>
- Commit format: <pattern>
- Push model: <gerrit/github/gitlab>
Does this look correct? What needs to be changed?
Wait for user confirmation. Apply any corrections they provide.
Create .claude/rtos-knowledge/ directory with the following files:
# Project Profile
- RTOS: <type>
- Architecture: <arch>
- Project root: <path>
- Description: <one-line from user or inferred>
# Build
## Commands
- Full build: <command>
- Clean build: <command>
- Single module: <command if applicable>
## Output
- Build artifacts: <path>
## Notes
- <any special build requirements>
# Coding Style
## Rules
- Indent: <spaces/tabs, count>
- Line length: <max chars>
- Brace style: <same-line/next-line>
- Comment style: <// or /* */>
- Naming: <convention>
## Checker
- Tool: <checkpatch/clang-format/none>
- Command: <how to run>
## Key Conventions
- <additional rules observed>
# Toolchain
- Compiler prefix: <prefix>
- addr2line: <prefix>addr2line
- objdump: <prefix>objdump
- GDB: <prefix>gdb
- ELF location: <typical path to output ELF>
# Commit & Collaboration Conventions
## Commit Message Format
<detected format with example>
## Push Model
- Type: <Gerrit/GitHub PR/GitLab MR/direct>
- Push command: <e.g., git push origin HEAD:refs/for/main>
## Branch Strategy
- Main branch: <name>
- Feature branches: <pattern if any>
## Required Checks
- <style check, CI, tests before push>
Tell the user:
Knowledge files generated in
.claude/rtos-knowledge/:
- profile.md
- build.md
- coding-style.md
- toolchain.md
- conventions.md
Other plugin skills (kernel-review, commit-helper, crash-guide, rtos-workflow) will now read these files for project-specific rules.
You can edit these files anytime to update the knowledge. Run this skill again to regenerate.
npx claudepluginhub kaben123/rtos-engineer-toolkit --plugin rtos-engineer-toolkitGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.