$npx -y skills add dbwls99706/ros2-engineering-skills --skill ros2-engineering-skillsTRIGGER when the user: writes or reviews ROS 2 nodes (rclcpp/rclpy), creates packages (colcon/ament), edits launch files (.launch.py), configures QoS or DDS, writes URDF/xacro, implements ros2_control hardware interfaces or controllers, sets up Nav2/MoveIt 2 pipelines, processes
| 1 | # ROS 2 Engineering Skills |
| 2 | |
| 3 | > **Single responsibility:** This skill is an **API reference & code template guide** |
| 4 | > for ROS 2 development. It tells you *how to use ROS 2 APIs correctly* and |
| 5 | > *what mistakes to avoid*. It does NOT do CI/CD orchestration, incident response, |
| 6 | > data analysis, or deployment automation — those are separate skill categories. |
| 7 | |
| 8 | A progressive-disclosure skill for ROS 2 development — from first workspace to |
| 9 | production fleet deployment. Detailed patterns and code templates live in |
| 10 | `references/`; read the relevant file before writing code. |
| 11 | |
| 12 | ## How to use this skill |
| 13 | |
| 14 | **Progressive disclosure — do NOT read everything at once.** This always-loaded |
| 15 | file carries routing, core principles, pitfalls, and anti-patterns; that is |
| 16 | enough for quick questions and architectural decisions. `references/*.md` load |
| 17 | on demand — use the Decision Router to pick the 1–2 files matching the task, |
| 18 | never all of them. `scripts/` are tools to run (scaffolding, QoS checking, |
| 19 | launch validation), not reading material. |
| 20 | |
| 21 | **Steps:** |
| 22 | |
| 23 | 1. Identify what the user is building (see Decision Router below). |
| 24 | 2. Read **only** the matching `references/*.md` file(s) for detailed guidance. |
| 25 | 3. Check the **AI pitfalls** table before generating any code. |
| 26 | 4. Apply the Core Engineering Principles in every artifact you produce. |
| 27 | 5. When multiple domains intersect (e.g. Nav2 + ros2_control), read both files |
| 28 | but favor safety > determinism > simplicity when recommendations conflict. |
| 29 | |
| 30 | **Execution log (opt-in):** When the Stop hook runs (Claude Code only) *and* |
| 31 | the `SKILL_RUNS_LOG` environment variable is set, a session summary is |
| 32 | appended to `.skill-runs.log`. If that file exists in the workspace, read the |
| 33 | last few lines to avoid repeating past mistakes. Without the opt-in — and on |
| 34 | platforms without hooks — the file is never created, so a read-only session |
| 35 | leaves the working tree untouched. |
| 36 | |
| 37 | **Platform support:** `SKILL.md` and `references/` are platform-neutral |
| 38 | knowledge documents. `scripts/` can be run manually on any platform whose |
| 39 | environment has Python and the repository dependencies. The hook wiring |
| 40 | (automatic execution) and `.skill-runs.log` are Claude Code-specific; on |
| 41 | other platforms run the validators manually from the skill root: |
| 42 | `SKILL_WORKSPACE=<dir> python3 scripts/skill_stop_hook.py` and |
| 43 | `python3 scripts/skill_validate_hook.py --file <src> / --command '<cmd>'` |
| 44 | (the command string is inspected only, never executed; without those flags |
| 45 | the validate hook expects a Claude Code PreToolUse payload and checks |
| 46 | nothing on its own). |
| 47 | |
| 48 | ## Decision router |
| 49 | |
| 50 | | User is doing... | Read | |
| 51 | |---------------------------------------------------|-----------------------------------| |
| 52 | | Creating a workspace, package, or build config | `references/workspace-build.md` | |
| 53 | | Writing nodes, executors, callback groups | `references/nodes-executors.md` | |
| 54 | | Topics, services, actions, custom interfaces, QoS | `references/communication.md` | |
| 55 | | Lifecycle nodes, component loading, composition | `references/lifecycle-components.md` | |
| 56 | | Launch files, conditional logic, event handlers | `references/launch-system.md` | |
| 57 | | tf2, URDF, xacro, robot_state_publisher | `references/tf2-urdf.md` | |
| 58 | | ros2_control, hardware interfaces, controllers | `references/hardware-interfa |