ros2-engineering-skills
Source version: 1.9.1. See release notes and
release procedure.

Production-oriented ROS 2 engineering guidance for coding agents, with focused
references, static validators, regression tests, and multi-distribution CI.
The skill covers workspace and package design, executors, DDS QoS, lifecycle,
tf2, ros2_control, Nav2, MoveIt 2, perception, safety, runtime provenance, testing,
and deployment. It distinguishes a plausible explanation from observed behavior.
Why this exists
A syntactically correct ROS 2 answer can still be operationally wrong: changing
subscriber QoS without inspecting the publisher, editing an unused source YAML,
assuming a zero topic command stopped the hardware, or using another distro's API.
This skill routes work to relevant references and requires evidence for claims.
It is not a robot safety certification or a substitute for an operator.
Before / After
These are illustrative comparisons of the intended workflow, not measured model
outputs. Real paired evaluations require the captures described below.
Prompt: "My ROS 2 subscriber isn't receiving any sensor messages. Help me fix it."
# Guess at the fix before inspecting the live endpoints.
from rclpy.qos import qos_profile_sensor_data
sub = node.create_subscription(
Image, '/camera/image_raw',
callback, qos_profile_sensor_data)
Assumes the publisher exists, the type is correct, and QoS is the mismatch.
ros2 topic list
ros2 topic type /camera/image_raw
ros2 topic info /camera/image_raw -v
ros2 node list --no-daemon
# Only after endpoint inspection supports this diagnosis.
from rclpy.qos import qos_profile_sensor_data
sub = node.create_subscription(
Image, '/camera/image_raw',
callback, qos_profile_sensor_data)
Checks graph, type, namespace, and offered/requested QoS before changing code.
Prompt: "Create a C++ driver package for my LiDAR sensor."
my_lidar_driver/
├── src/main.cpp
├── CMakeLists.txt
└── package.xml
A bare node without explicit configuration, test, resource, or shutdown contracts.
my_lidar_driver/
├── include/my_lidar_driver/my_lidar_driver_node.hpp
├── src/my_lidar_driver_node.cpp
├── src/main.cpp
├── launch/bringup.launch.py
├── config/params.yaml
├── test/test_driver.cpp
├── test/test_bringup.py
├── CMakeLists.txt
└── package.xml
Chooses Node or LifecycleNode from resource ownership and supervision; declares
QoS, frames, timestamps, limits, dependencies, and distro-compatible tests.
Installation
Claude Code plugin
claude plugin marketplace add dbwls99706/ros2-engineering-skills
claude plugin install ros2-engineering@ros2-engineering-skills
Inside Claude Code the equivalent commands are:
/plugin marketplace add dbwls99706/ros2-engineering-skills
/plugin install ros2-engineering@ros2-engineering-skills
The plugin uses .claude-plugin/plugin.json, root SKILL.md, and
hooks/hooks.json. It provides a workspace check, PreToolUse checks and
advisory Stop reports. The hook command requires python3; it does not grant
tool permissions.
In a ROS 2 workspace the plugin checks where the files disagree: a launch file
that starts an executable setup.py does not define, a parameter file with no
section for the node it is given to, a directory that is never installed, an
undeclared dependency, a callback rclpy cannot call, a keyword create_timer
does not have, a service name one character from the one that is offered, and
similar defects that build cleanly and fail at bring-up. It records what it
finds when a conversation starts and says nothing. When the model is about to
finish, it hands over what is still reported, including what the session itself
broke, and names the tests of packages the session changed and did not run;
the model continues once to deal with it. The hook runs nothing itself. It is
a mechanical check of declarations, not a review. While code is written, the PreToolUse hook
also adds, once per session, what a message type such as LaserScan or Imu
means beyond its fields. What is compared, what cannot be seen and why the
findings come at the end are described in the
skill contract. Set
ROS2_SKILL_WORKSPACE=advise to have the findings shown to you instead, or
off to turn the check off.
The PreToolUse hook also reports ros2 commands that can move hardware, such as
ros2 topic pub /cmd_vel ..., a navigation goal, a controller switch, or an
e-stop reset. By default this is a note to the model and nothing is blocked. Set
ROS2_SKILL_ACTUATION=ask to have Claude Code ask you before such a command
runs (experimental; see client compatibility),
or off to disable it. It matches names in POSIX shell commands and is not a
safety function: keep an operator and an independent stop path.
Knowledge-only skill: Codex, Claude Code, Cursor, Gemini CLI
git clone https://github.com/dbwls99706/ros2-engineering-skills.git
cd ros2-engineering-skills
python3 -m pip install -r requirements.txt
python3 scripts/install_skill.py --client codex --dry-run
python3 scripts/install_skill.py --client codex
# Alternatives: --client claude, --client cursor, --client gemini
# Add --project /path/to/project for project scope.
Use a virtual environment as required by your Python installation. The installer
copies a validated bundle, not client settings. Existing skills need --force;
it stages the replacement before touching the old installation. It excludes
Claude plugin manifests and hook registration intentionally. The portable files
and manual validators do not require the Claude plugin.
Every installation records INSTALL_PROVENANCE.json: the source version and
Git commit, the installer version, and a SHA-256 digest of each installed file.
python3 scripts/install_skill.py --verify --client codex reports whether the
installation still matches that manifest (exit 0 only when clean). --force
refuses to replace an installation that differs from its manifest or has none;
add --force --discard-local-changes to replace it anyway. The manifest is an
installation snapshot for detecting accidental or local drift, not a signed
attestation: it cannot prove the absence of deliberate tampering, because the
manifest and the files can be edited together. The installer never searches for
custom installation locations; name them with --target.
Codex's optional display and invocation policy live in agents/openai.yaml.
Supported discovery paths, explicit invocation, remote-environment caveats, and
what has actually been tested are documented in
Client compatibility. A documented discovery path
is not proof of a successful authenticated model run on every client version.
The original ./install.sh and .\install.ps1 still support full-checkout
copy/link installation, force replacement, and dry-run. They write no provenance
manifest, and they refuse to replace a target that is a symbolic link or reparse
point, so a link shared by several clients is never split into a separate copy;
pass the resolved path instead. A full checkout includes the Claude plugin
manifest; it is not necessarily a knowledge-only installation when placed in
Claude's skill directories. Prefer the new installer for that use.
Verify installation and run tools
python3 scripts/validate_skill.py --check-sources
python3 scripts/validate_skill.py --root /path/to/ros2-engineering-skills --installed --portable
python3 scripts/install_skill.py --verify --client codex
python3 scripts/workspace_checks.py /path/to/ros2_ws
python3 scripts/skill_validate_hook.py --file src/my_node.py
python3 scripts/skill_validate_hook.py --command 'ros2 topic list'
python3 scripts/skill_validate_hook.py --command 'ros2 topic pub /cmd_vel geometry_msgs/msg/Twist "{}"'
SKILL_WORKSPACE=/path/to/ros2_ws python3 scripts/skill_stop_hook.py
The command string above is inspected, never executed. Python 3.10+ is required;
the CI matrix targets 3.10 through 3.14. Consult the run for the exact revision's
results. Runtime dependencies are in requirements.txt; development dependencies
are separate. Build and runtime checks additionally require the target ROS stack.
Where the guidance lives
| Path | Role |
|---|
SKILL.md, references/, docs/ | The guidance itself: router, task references, contracts |
scripts/ | User-facing static checkers and helpers (table below) |
.claude-plugin/, hooks/, agents/, install.sh, install.ps1 | Client and installation integration |
tests/, evals/, .github/ | Development and verification of this repository |
What is included
The selected SKILL.md contains a short operating contract and task router.
Detailed tables and the 22 recurring pitfalls are retained in
references/engineering-principles.md,
loaded only when relevant. The context budget separates
byte/line limits from measured, named-tokenizer counts.
The decision router in SKILL.md selects among 27 task-specific
references plus cross-cutting engineering principles.
Metadata is advertised before activation; the selected body and needed references
supply the workflow. See Skill contract for scope,
permission boundaries, protocol behavior, and context-budget limitations.
| Utility | Purpose | Boundary |
|---|
create_package.py | Generate package scaffolds | Build in the target distribution |
qos_checker.py | Compare offered/requested QoS | Compatibility is not delivery quality |
qos_audit.py | Pair QoS declarations across a package by topic and type | Static; unresolved values are never guessed, and a Python profile modified after construction is not judged from its constructor |
rosbag2_qos_checker.py | Inspect bag metadata QoS | Static metadata analysis |
launch_validator.py | Detect selected Python launch defects | Does not start a graph |
workspace_checks.py | Compare declarations between files of Python packages: console scripts, install rules, parameter files, package.xml, remappings, QoS, rclpy keywords and callback signatures, endpoint names, interface fields, and a few plain Python defects (a method without self, a while that cannot end, a name a module does not define) | Static; reads literals only, never guesses, reports only what fails on every supported distribution, and no finding is not a pass |
launch_supervisor.py | Run an authorized launch with owned SIGINT handling | POSIX; starts processes, not a hardware stop |
skill_validate_hook.py | Inspect source and command strings, including ros2 commands that can move hardware | Best-effort guard, not a security or safety boundary; automatic source advice only with confirmed ROS context |