cpp-coding
Skill9.1k starsChanged 27 days agoApache-2.0View on GitHub
C++ coding standards for librealsense - language standard, naming, RAII, error handling, comments. Use before adding or modifying any C++ code.
3 other projects use a version of this.
Trending
Steady talk.about the whole repository
Most recently taken up by
- Ultimaker/CuraEnginetheir own version, first seen Nov 9, 2026
- timeplus-io/protontheir own version, first seen Oct 8, 2026
- figuretu/my-skillstheir own version, first seen Jul 28, 2026
Who's talking about realsenseai/librealsense
- NixOS/nixpkgs“librealsense: add missing support to udev rules”GitHub · Jan 6, 2026 · 2 reactions
- David-Martel/librealsense“fix(fw-update): stop device handles before logger teardown”GitHub · Jul 17, 2026 · 1 reactions
- Bradly187/Personal-Desktop-Agent“chore(deps): bump the python-minor-patch group across 1 directory with 8 updates”GitHub · Nov 2, 2026
- OpenGraphLabs/oglo-python“build(deps-dev): bump the python-dependencies group across 1 directory with 3 updates”GitHub · Nov 1, 2026
- huggingface/lerobot“docs: fix dead Isaac Teleop and RealSense links”GitHub · Oct 30, 2026
The biggest 5 of 34 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 34
Talked about on GitHub (34 times).
On GitHub · 34
- Jan 6, 2026librealsense: add missing support to udev rules — NixOS/nixpkgs2 reactions · 7 comments
- Jul 17, 2026fix(fw-update): stop device handles before logger teardown — David-Martel/librealsense1 reaction · 1 comment
- Nov 2, 2026chore(deps): bump the python-minor-patch group across 1 directory with 8 updates — Bradly187/Personal-Desktop-Agent0 reactions
- Nov 1, 2026build(deps-dev): bump the python-dependencies group across 1 directory with 3 updates — OpenGraphLabs/oglo-python0 reactions
- Oct 30, 2026docs: fix dead Isaac Teleop and RealSense links — huggingface/lerobot0 reactions · 1 comment
29 more on GitHub
- Oct 22, 2026build(deps): bump pyrealsense2 from 2.58.4.10922 to 2.59.1.11053 — nvidia-holoscan/holoscan-telesurgery0 reactions
- Oct 20, 2026[D585][GMSL_MUX] Support independent PD 15/30 FPS profiles — polejoe/librealsense0 reactions · 1 comment
- Oct 17, 2026Update pyrealsense2 requirement from >=2.55 to >=2.59.1.11053 — bnrohit/hybrid-rf-scanner0 reactions
- Oct 11, 2026librealsense 2.59.1 — Homebrew/homebrew-core0 reactions · 2 comments
- Oct 4, 2026pyrealsense2: Add version 2.58.4.10922 — riseproject-dev/python-wheels0 reactions · 1 comment
- Sep 23, 2026Add rocm-enabled librealsense package — gbionics/rock-the-conda0 reactions
- Sep 23, 2026Add librealsense — gbionics/rock-the-conda0 reactions · 3 comments
- Sep 14, 2026librealsense: update recipe to latest stable version 2.58.1 — conan-io/conan-center-index0 reactions · 1 comment
- Sep 14, 2026[RSDEV-14616] Use BA10 exclusively for D500 RGB calibration — realsenseai/realsense_mipi_platform_driver0 reactions · 3 comments
- Sep 5, 2026Update pyrealsense2 requirement from >=2.55 to >=2.58.4.10922 — bnrohit/hybrid-rf-scanner0 reactions · 1 comment
- Sep 2, 2026[RSDEV-14097] Expose D585 GMSL gyro sensitivity — realsenseai/realsense_mipi_platform_driver0 reactions
- Aug 31, 2026Package rocm variant of librealsense — conda-forge/librealsense-feedstock0 reactions · 1 comment
- Aug 30, 2026librealsense 2.58.4 — Homebrew/homebrew-core0 reactions · 1 comment
- Aug 28, 2026Fix RVIZ Vizualization of the RealSense D435i Camera Stability and Performance Via ROS Network — arcs-tmu/laika0 reactions
- Aug 15, 2026Update pyrealsense2 requirement from >=2.55 to >=2.58.3.10794 — bnrohit/hybrid-rf-scanner0 reactions · 1 comment
- Aug 5, 2026RSDEV-13232 Integrate D500 stream-group runtime — ghu3/librealsense0 reactions · 4 comments
- Aug 5, 2026Bake ROS 2, RealSense, SiMa CLI, and GitHub tooling into the ARM64 SDK image — sima-vertical-solutions/ros2-sdk0 reactions
- Jul 20, 2026Add python3-pyrealsense2-pip rosdep key to python.yaml — ros/rosdistro0 reactions · 1 comment
- Jul 19, 2026librealsense 2.58.3 — Homebrew/homebrew-core0 reactions · 1 comment
- Jul 9, 2026Support launching Docker GUI apps from Fedora Wayland via XWayland — amoffat/librealsense0 reactions
- Jul 6, 2026Add D401 GMSL dual-RGB support (POC) — ashrafk93/librealsense0 reactions
- Jun 29, 2026chore(deps): bump pyrealsense2 from 2.58.1.10581 to 2.58.2.10647 — AliaksandrNazaruk/janus-camera-stack0 reactions · 1 comment
- Jun 24, 2026Ashraf/zerocopy pr1 — ashrafk93/librealsense0 reactions
- Jun 12, 2026Add placeholder workflow to register build-deb-packages trigger — locusrobotics/librealsense0 reactions
- Mar 11, 2026Add aligned depth topic for RGBD sensor — gazebosim/gz-sim0 reactions · 1 comment
- Feb 17, 2026`pixel_to_real_world` service fails in real mode due to missing `/camera/depth/camera_info` publisher — Final-Project-ROS2/vision0 reactions
- Jan 27, 2026Reliability of the AI-Autostart — A13k5-5/COMP0016_2025_Team11_no-ui-game0 reactions · 1 comment
- Jan 24, 2026[day 1] — z18k/AI-Vision-Learning0 reactions
- Dec 4, 2025[realsense2] update to v2.56.5 — microsoft/vcpkg0 reactions · 2 comments
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- timeplus-io/proton★ 2.3ksame name
- Ultimaker/CuraEngine★ 1.9ksame name
- figuretu/my-skills★ 16same 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 repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- add-apiSkill
- buildSkill
- file-creationSkill
- pr-createSkill
- pr-reviewSkill
- pytest-infraSkill
- testingSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 9 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this protocol to ensure all C++ code modifications align with the project's engineering standards.
- Very specific: line 14
Safety: Prefer strict Types over auto (unless type is obvious or iterator).
- Distinctive: line 15
No Macros: Avoid C-style macros unless absolutely necessary.
- Very specific: line 27
Pointers: Use std::unique_ptr by default.
- Very specific: line 28
Allocation: Avoid raw new/delete. Use std::make_unique / std::make_shared.
- Distinctive: line 29
Value Semantics: Prefer stack allocation and value semantics where possible.
- Distinctive: line 33
Silence: Never fail silently. Log errors or throw exceptions.
- Distinctive: line 36
Style: Do NOT reformat existing code solely for style.
- Distinctive: line 40
Hot Paths: Check for hidden allocations in loops or streaming callbacks.
- Distinctive: line 44
Comments should be sparse: Keep to 1–2 lines unless the code is large and genuinely complex.
- Distinctive: line 45
Intention: Don't restate what the code already says, comment should convey the reason for the code.
- Distinctive: line 48
Generality: Don't reference internal session reasoning e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
C++ Coding Standards & Practices Skill
Use this protocol to ensure all C++ code modifications align with the project's engineering standards.
Protocol
1. Enforce Language Standard
- Standard: The core library must compile with C++14 compatibility (
cxx_std_14— seeCMake/lrs_macros.cmake). The public interface requires C++11 (cxx_std_11). Examples and wrappers generally use C++11 - Safety: Prefer strict Types over
auto(unless type is obvious or iterator). - No Macros: Avoid C-style macros unless absolutely necessary.
2. Applied Naming Conventions
- General:
snake_casefor variables, functions, classes and namespaces (e.g.uvc_device,get_device_count()). - Files: kebab-case (e.g.
backend-v4l2.h,device-model.cpp). - Constants:
UPPER_CASE_WITH_UNDERSCORES. - Members: Prefix with
_(e.g.,_my_variable). - Templates:
PascalCasefor type parameters (e.g.,template<typename T>). - Namespaces:
librealsense(core),librealsense::platform(platform layer); public C API types and enums use thers2_prefix. - Suffixes:
*_interface(abstract bases, e.g.device_interface),*_factory,*_callback,*_model(viewer UI classes).
3. Resource Management (RAII)
- Pointers: Use
std::unique_ptrby default. Usestd::shared_ptronly when ownership is truly shared. - Allocation: Avoid raw
new/delete. Usestd::make_unique/std::make_shared. - Value Semantics: Prefer stack allocation and value semantics where possible.
4. Error Handling
- Exceptions: Inside
src/, throw the library exception types fromsrc/librealsense-exception.h(e.g.invalid_value_exception,wrong_api_call_sequence_exception,not_implemented_exception); the C API wrappers translate them intors2_error.rs2::erroris the public C++ wrapper's type, used only ininclude/librealsense2/hpp/and client code. - Silence: Never fail silently. Log errors or throw exceptions.
5. Modification Rules
- Style: Do NOT reformat existing code solely for style. Only apply these rules to new or refactored lines.
- Consistency: Match the surrounding code style if it deviates from the standard (local consistency wins for minor edits).
6. Performance Checks
- Hot Paths: Check for hidden allocations in loops or streaming callbacks.
- Copying: Minimize data copying; use const references (
const T&) for non-primitive arguments.
7. Comments
- Comments should be sparse. Keep to 1–2 lines unless the code is large and genuinely complex.
- Intention: Don't restate what the code already says, comment should convey the reason for the code.
- Locality: The comment should refer to the local code. e.g. class description should not mention inheritors or where other logic live.
- Length: Comment lines can be as long as the surrounding code. If code lines usually trim at 120 characters comment lines don't have to be 80 characters long.
- Generality: Don't reference internal session reasoning e.g. "as you instructed"
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.

