rtos-debug
Skill36 starsChanged 5 months agoMITView on GitHub
Use when debugging embedded RTOS scheduling, tasks, threads, stacks, priorities, mutexes, queues, interrupts, timers, or FreeRTOS, RT-Thread, Zephyr, ThreadX, or CMSIS-RTOS issues
2 other projects use a version of this.
Adopted by
Most recently taken up by
- LeoKemp223/embed-ai-tooltheir own version, first seen Jun 23, 2026
- zycdzh/stm32_skillstheir own version, first seen May 2, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- LeoKemp223/embed-ai-tool★ 979same name
- zycdzh/stm32_skills★ 8same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository75 other files it gives its agents.
- 8051-mcu-debugSkill
- avem-integrationSkill
- battery-charger-fuel-gauge-integrationSkill
- ble-gatt-integrationSkill
- bootloader-debugSkill
- canbus-integrationSkill
- canopen-integrationSkill
- cellular-at-modem-integrationSkill
- cmbacktrace-integrationSkill
- cmsis-dsp-integrationSkill
- cortex-m-debugSkill
- cortex-r5-debugSkill
- crc-checksum-integrationSkill
- easylogger-integrationSkill
- embedded-app-example-libsSkill
- embedded-buffer-queue-libsSkill
- embedded-data-parsing-libsSkill
- embedded-debug-entrySkill
- embedded-fault-debugSkill
- embedded-framework-libsSkill
- embedded-input-libsSkill
- embedded-library-entrySkill
- embedded-linux-login-debugSkill
- embedded-peripheral-bringupSkill
- embedded-serial-log-debugSkill
- embedded-state-machine-libsSkill
- embedded-timing-libsSkill
- epd-integrationSkill
- esp-idf-integrationSkill
- fatfs-integrationSkill
- flashdb-integrationSkill
- freemodbus-integrationSkill
- freertos-kernel-debugSkill
- freertos-plus-tcp-integrationSkill
- gnss-gps-integrationSkill
- hardware-interface-debugSkill
- heatshrink-integrationSkill
- letter-shell-integrationSkill
- littlefs-integrationSkill
- low-power-debugSkill
- lvgl-integrationSkill
- lwip-integrationSkill
- mbedtls-integrationSkill
- mcuboot-integrationSkill
- mcu-flashing-debugSkill
- micro-ecc-integrationSkill
- miniz-integrationSkill
- mqtt-embedded-integrationSkill
- nanopb-integrationSkill
- nrf-connect-sdk-integrationSkill
- nr-micro-shell-integrationSkill
- openocd-jlink-stlink-debugSkill
- openthread-integrationSkill
- ota-update-integrationSkill
- plooc-integrationSkill
- power-management-integrationSkill
- qspi-xip-flash-debugSkill
- readme-writingSkill
- riscv-mcu-debugSkill
- rt-thread-integrationSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill to debug RTOS problems by separating scheduler state, task stack health, synchronization, interrupt priority, timing, and …
- Distinctive: line 14
Use this skill when:
- Very specific: line 20
Do not use this skill before the target is known to boot and run at least some firmware.
- Distinctive: line 36
Verify the system reaches scheduler start and at least one known task runs.
- Distinctive: line 41
Check stack and heap first.
- Distinctive: line 47
Check interrupt priority rules.
- Distinctive: line 48
Ensure ISR priorities are legal for RTOS API calls and do not starve the scheduler tick.
- Distinctive: line 51
Use trace hooks, assertions, watermarks, counters, or event logs instead of adding arbitrary delays.
- Distinctive: line 67
Before claiming RTOS progress:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
RTOS Debug
Overview
Use this skill to debug RTOS problems by separating scheduler state, task stack health, synchronization, interrupt priority, timing, and resource ownership. Start from observable RTOS state before changing priorities or adding delays.
When To Use
Use this skill when:
- Firmware uses FreeRTOS, RT-Thread, Zephyr, ThreadX, CMSIS-RTOS, or another embedded scheduler.
- The user reports deadlock, starvation, missed events, queue timeout, stack overflow, watchdog reset, priority inversion, or task not running.
- The issue involves ISR-to-task signaling, timers, semaphores, mutexes, message queues, or task notifications.
Do not use this skill before the target is known to boot and run at least some firmware. For RTOS-specific deep dives, prefer freertos-kernel-debug, zephyr-integration, or rt-thread-integration when the RTOS is identified.
First Questions
Ask for:
- RTOS name/version and MCU/SoC.
- Symptom and when it occurs.
- Task list with priorities, stack sizes, and key responsibilities.
- Whether stack overflow checking, runtime stats, trace, or thread awareness is enabled.
- ISR sources involved and interrupt priorities.
- Logs, asserts, watchdog reason, or debugger task view.
Workflow
- Confirm the scheduler starts. Verify the system reaches scheduler start and at least one known task runs.
- Capture task state. Collect task names, states, priorities, stack high water marks, CPU/runtime stats, and blocked objects.
- Check stack and heap first. Stack overflow and heap exhaustion often masquerade as random RTOS failures.
- Inspect synchronization. Identify which task owns each mutex, which queue is full/empty, and whether ISR-safe APIs are used from interrupts.
- Check interrupt priority rules. Ensure ISR priorities are legal for RTOS API calls and do not starve the scheduler tick.
- Replace guesses with probes. Use trace hooks, assertions, watermarks, counters, or event logs instead of adding arbitrary delays.
Checks
- Stack high water mark for each task.
- Heap free/minimum ever free.
- Tick interrupt running at expected rate.
- Watchdog servicing task not starved.
- Mutex ownership and recursive/non-recursive mismatch.
- Queue length, item size, send/receive timeout.
- ISR uses correct
FromISRAPIs where required. - Critical sections are short and bounded.
- Priority inversion protection exists where shared resources are used.
Verification
Before claiming RTOS progress:
- State RTOS, scheduler status, task states, and stack/heap evidence.
- Identify the blocked or starving task and the object it waits on.
- State whether interrupt priorities are legal for RTOS API usage.
- Report any assertion, watchdog, or stack overflow hook evidence.
Common Failures
- Raising task priority without knowing why it is blocked.
- Adding delays to hide races.
- Calling non-ISR-safe APIs from interrupts.
- Ignoring stack high water marks.
- Debugging a queue payload before confirming queue item size and ownership.
Example
User:
FreeRTOS 有个任务偶尔不跑,最后看门狗复位。Agent:
- Asks for task list, priorities, stack sizes, watchdog owner, and task states.
- Checks high water marks, heap, tick, and blocked objects.
- Verifies ISR priority and queue/mutex ownership before suggesting priority changes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

