freertos-patterns

freertos-patterns is a skill for Claude Code from wedsamuel1230/arduino-skills. It costs 40 tokens per session (892 once invoked), scanned A, original, MIT.

A collection of design patterns for running multiple jobs at once on ESP32 boards or the two-core RP2040. It covers FreeRTOS, a real-time operating system used for tasks and coordination, plus RP2040 multicore work.

In plain words
What is it for?
Use it to create tasks, set priorities, size stacks, pass data through queues, coordinate cores, use mutexes or semaphores, and diagnose concurrency failures.
Why use it?
Concurrent code can suffer from race conditions, deadlocks, stack overflows, missed watchdog deadlines, or unsafe shared data. These patterns help structure communication and synchronization.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the arduino-skills plugin — 33 skills shipped together

Good fit Use it to create tasks, set priorities, size stacks, pass data through queues, coordinate cores, use mutexes or semaphores, and diagnose concurrency failures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wedsamuel1230/arduino-skills/freertos-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add wedsamuel1230/arduino-skills --skill freertos-patterns
Clone the repo
git clone --depth 1 https://github.com/wedsamuel1230/arduino-skills

Made for: Claude Code.

Or install arduino-skills, the plugin that ships this one along with the rest of its 33 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for freertos-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/wedsamuel1230/arduino-skills/freertos-patterns/github.svg)](https://agentmods.dev/skills/wedsamuel1230/arduino-skills/freertos-patterns)
Your own site
<a href="https://agentmods.dev/skills/wedsamuel1230/arduino-skills/freertos-patterns"><img src="https://agentmods.dev/badge/skills/wedsamuel1230/arduino-skills/freertos-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for freertos-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/wedsamuel1230/arduino-skills/freertos-patterns"><img src="https://agentmods.dev/badge/skills/wedsamuel1230/arduino-skills/freertos-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 892 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.00892
Opus 5 $0.00020 $0.00446
Sonnet 5 $0.00008 $0.00178
Haiku 4.5 $0.00004 $0.00089

Measured 12d ago against content hash 14af4fa657d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

freertos-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/freertos-patterns/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FreeRTOS Patterns for ESP32 and RP2040

Use this skill for real concurrency problems on ESP32 or RP2040. Keep the main flow focused and load the detailed reference that matches the user's exact problem.

Resources

  • references/patterns-task-creation.md - task lifecycle, priorities, stack sizing, and task startup
  • references/patterns-queues.md - inter-task communication with queues
  • references/patterns-synchronization.md - mutexes, semaphores, critical sections, and ISR coordination
  • references/patterns-memory.md - stack sizing, heap checks, and monitoring
  • references/patterns-advanced.md - watchdogs, notifications, event groups, timers, and affinity
  • assets/workflow.mmd - architecture overview

When to Use

Use this skill when the request includes:

  • multiple concurrent jobs on ESP32
  • task priorities or preemption
  • queue, semaphore, mutex, or notification design
  • RP2040 setup1 and loop1 multicore coordination
  • watchdog-safe long-running behavior
  • debugging race conditions, stack overflows, or deadlocks

Do not use this skill when:

  • the target is UNO or another single-core board
  • a simple millis() scheduler solves the problem
  • the request is only about one blocking loop with no concurrency requirement

Workflow

  1. Confirm the target platform first:
    • ESP32 -> FreeRTOS task model
    • RP2040 -> dual-core coordination model
  2. Identify the dominant problem:
    • task startup -> open patterns-task-creation.md
    • communication -> open patterns-queues.md
    • shared data or ISR signaling -> open patterns-synchronization.md
    • stack or heap risk -> open patterns-memory.md
    • watchdogs, notifications, timers, or affinity -> open patterns-advanced.md
  3. Solve one synchronization boundary at a time. Avoid mixing queue, mutex, and notification advice unless the design truly needs all of them.
  4. Keep board-specific details explicit. ESP32 FreeRTOS guidance and RP2040 multicore guidance are not interchangeable.

Read the full file on GitHub · 101 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 101 lines · 40 tokens per session scan A 14af4fa657d7

Subscribe to this mod's changes

freertos-patterns is a skill published in the GitHub repository wedsamuel1230/arduino-skills (21 stars, last pushed 23d ago), licensed MIT. It adds 40 tokens to every session and 892 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

cardputer-buddy

Iterate on the Cardputer-Adv MicroPython app bundle (Claude Buddy, Snake, Hello) after the device is already provisioned via m5-onboard. Use when the user wants to add a new app, push a single changed .py without re-flashing, watch device serial logs, or run a one-shot REPL command. Trigger on "add an app", "push to…

anthropics/claude-plugins-official · 109 tokens

gke-compute-classes

Configures, optimizes, and troubleshoots GKE ComputeClasses. Use when configuring Spot VMs with on-demand fallback, targeting specific accelerators (GPUs/TPUs) or machine families, restricting ComputeClass access, or debugging pending pods related to node pool auto-creation. Do not use for cluster-level Node Auto…

google/skills · 83 tokens

google-cloud-filestore-autoscale

Inspects Google Cloud Filestore capacity and utilization, evaluates storage scaling rules, and performs capacity autoscaling (scale UP for low free space or scale DOWN for cost optimization). Use when monitoring Filestore instance headroom, resizing instance shares, configuring automated growth/shrink thresholds…

google/skills · 101 tokens

developer-device-platform-basics

Provides guidance and instructions on managing remote devices on Developer Device Platform (DDP). Use when reserving remote Android devices, establishing connection tunnels, checking session status, or extending/cancelling leases. Don't use for iOS or local device/hardware inquiries.

google/skills · 57 tokens

gke-ai-troubleshooting-tpu-vbar-oom

Diagnoses and prevents vbarcontrolagent segfaults, out-of-memory (OOM) errors, and TPU device initialization failures on TPU v6e nodes in GKE caused by race conditions during TPU device resets or high-frequency metrics polling. Use when troubleshooting vbarcontrolagent crashes, memory cgroup OOMs in serial console…

google/skills · 125 tokens

m5-onboard

End-to-end onboarding for a freshly-plugged-in M5Stack ESP32 device (Cardputer, Cardputer-Adv, Core, CoreS3, Stick) — detect on USB, flash UIFlow 2.0 firmware, and install the Claude Buddy MicroPython app bundle. Use whenever the user plugs in or wants to flash/provision/reset an M5Stack or ESP32 board, or says…

anthropics/claude-plugins-official · 94 tokens