rdk-peripheral-cookbook

rdk-peripheral-cookbook is a skill for Claude Code, Codex from D-Robotics/moss. It costs 281 tokens per session (4,135 once invoked), scanned B, original, MIT.

A practical guide for controlling physical devices connected to RDK boards, including pins, buses, motors, lights, audio and CAN communication. RDK boards are Linux-based development boards for embedded and robotics projects.

In plain words
What is it for?
Use it to light LEDs, read sensors, control servos and motors, send data over GPIO, I2C, SPI, UART, PWM or CAN, and work with ALSA audio on RDK boards.
Why use it?
It helps you connect hardware safely and choose the right board interface without guessing. It also covers common causes of devices not working, including incorrect pin or bus mappings and missing drivers.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to light LEDs, read sensors, control servos and motors, send data over GPIO, I2C, SPI, UART, PWM or CAN, and work with ALSA audio on RDK boards.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/d-robotics/moss/rdk-peripheral-cookbook
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 D-Robotics/moss --skill rdk-peripheral-cookbook
Clone the repo
git clone --depth 1 https://github.com/D-Robotics/moss

Made for: Claude Code, Codex.

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 rdk-peripheral-cookbook

README.md
[![agentmods](https://agentmods.dev/badge/skills/d-robotics/moss/rdk-peripheral-cookbook/github.svg)](https://agentmods.dev/skills/d-robotics/moss/rdk-peripheral-cookbook)
Your own site
<a href="https://agentmods.dev/skills/d-robotics/moss/rdk-peripheral-cookbook"><img src="https://agentmods.dev/badge/skills/d-robotics/moss/rdk-peripheral-cookbook/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 rdk-peripheral-cookbook

Your own site · 80×15
<a href="https://agentmods.dev/skills/d-robotics/moss/rdk-peripheral-cookbook"><img src="https://agentmods.dev/badge/skills/d-robotics/moss/rdk-peripheral-cookbook.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 281 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,135 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Privilege Escalation · line 35
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 69
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
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.00281 $0.04135
Opus 5 $0.00140 $0.02067
Sonnet 5 $0.00056 $0.00827
Haiku 4.5 $0.00028 $0.00413

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

Security

Grade B, and why

rdk-peripheral-cookbook scanned grade B with 1 finding 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 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/can_mode.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

4. **RDK-specific trap:** a 40PIN pin may default to GPIO. On X-series, switch the function first via `sudo srpi-config` → `3 Interface Options` → `I3 Peripheral bus config` (or the `/app/40pin_samples/` scripts) before
packages/moss-agent/assets/rdk-knowledge/skills/rdk-peripheral-cookbook/SKILL.md · 138 lines

How it starts

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

RDK Peripheral Cookbook

Drive a real peripheral on an RDK board: GPIO, I2C, SPI, UART, PWM, servos, motors, LEDs, audio, and CAN. The single rule that prevents the most damage: never power a servo, motor, or LED strip from 40PIN Pin 2/4 (5V) — even one SG90 stall current can brown out the board and reboot it. Always use an external 5V/6V supply and share GND.

Sources: official D-Robotics docs (rdk_doc / rdk_s_doc 40pin user guide, rdk_x5/can.md, mcu_development/09_mcu_can.md), the x5-hobot-io toolchain, and standard cross-platform Linux peripheral practice. Every non-trivial board-specific claim is verified against the cited source; cross-platform Linux facts (libgpiod, ALSA, PCA9685) are standard and noted as such.

The one rule that matters most

A peripheral that needs current — servo, DC/stepper/BLDC motor, WS2812 strip — must NOT draw its power from the 40PIN 5V rail (Pin 2/4). Stall or full-load current pulls the rail down and reboots the board. Always: external 5V/6V supply for the load, signal line back to the board, common GND. This applies on RDK, Raspberry Pi, Jetson, and Rockchip alike — it is not RDK-specific.

Decision cheat-sheet (pick the right approach)

Need First-choice approach
Cross-board GPIO / unsure of pin number libgpiod (gpiodetect / gpioinfo / gpiofind "GPIO17") — don't guess BCM numbers
Single servo (1–2 ch) On-board hardware PWM (50Hz / 20ms period, 1.0–2.0ms pulse), external supply
Multiple servos (≥3 ch) PCA9685 + I2C (default addr 0x40), servo power on PCA9685's V+ terminal
DC motor H-bridge (TB6612 / DRV8833 / BTS7960) + PWM speed + GPIO direction
Stepper motor Dedicated driver (A4988 / DRV8825 / TMC2209 silent) + STEP/DIR
Brushless (BLDC) RC ESC (50Hz PWM, reuse PCA9685) or ODrive/VESC (UART/CAN closed-loop); on S100 use the MCU real-time domain
WS2812 RGB strip SPI MOSI emulating the 800kHz timing (run SPI at 2.4MHz, NeoPixel-SPI). RPi's rpi_ws281x does NOT work on RDK
Audio (no TROS) Standard ALSA (aplay -l / arecord / alsamixer); a USB sound card is the universal fallback
CAN Only X5 is Linux SocketCAN (TCAN4550): ip link set can0 type can bitrate 500000 dbitrate 2000000 fd on + can-utils. S100/S600 CAN lives in the MCU domain — use CANHAL/IPC + /app/Can sample, NOT ip link. X3/Ultra have no on-board CAN. Full bringup: rdk-can-and-board-io.md

Read the full file on GitHub · 138 lines

Files

What ships with it

5 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. 9d ago First seen · 138 lines · 281 tokens per session scan B d801cccaf54d

Subscribe to this mod's changes

rdk-peripheral-cookbook is a skill published in the GitHub repository D-Robotics/moss (142 stars, last pushed 13d ago), licensed MIT. It adds 281 tokens to every session and 4,135 once invoked, about $0.0014 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). 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

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

jetson-diagnostic

Read-only Jetson health snapshot for identity, memory, GPU, thermal, power, storage, services, and top processes.

NVIDIA/skills · 30 tokens

doca-socket-relay

Use this skill when the operator is driving the DOCA Socket Relay to bridge a socket-oriented host application onto a BlueField DPU peer without rewriting it — picking the deployment shape (in-process, sidecar, or BlueField service container), configuring the host-side socket and the DPU-side forwarding endpoint…

NVIDIA/skills · 236 tokens

offensive-z-wave

Z-Wave attack methodology — sniffing with Z-Force / EZ-Wave / RTL-SDR + ZniffMobile, S0 (legacy) network-key derivation flaw and key reuse, S2 (modern) ECDH commissioning analysis, replay/injection on unauthenticated nodes, default-key brute-force on test deployments, and home-automation hub pivots. Use when targeting…

SnailSploit/Claude-Red · 113 tokens

hsb-flash

Flash the FPGA on an HSB board connected to an NVIDIA devkit. Supports HSB Lattice boards (FPGA versions 2407, 2412, 2507, 2510) and Leopard Imaging VB1940 "all-in-one" cameras (FPGA versions 2507, 2510). Uses release-specific YAML manifests and board-type-specific program commands. Lattice and VB1940 commands must…

NVIDIA/skills · 94 tokens

jetson-validate-image

Use after jetson-flash-image to run static BSP checks, on-target smoke/regression tests on a flashed DUT, or both. Not for build or flash steps. Triggers: validate bsp, on-target validation.

NVIDIA/skills · 50 tokens