openharmony-cpp

Installation
SKILL.md

OpenHarmony C++ Coding Skills

Core Mandates (Common Pitfalls)

These rules are strictly enforced in OpenHarmony and often differ from general C++ projects.

1. Strict Naming & Formatting

  • Extensions: Always use .cpp and .h.
  • Files: Filenames must match class names (Unix-like, e.g., my_class.cpp).
  • Variables: Global vars must start with g_ (e.g., g_config). Class members must end with _ (e.g., value_).
  • Braces: K&R Style is mandatory (opening brace on the same line).
  • Details: See naming_formatting.md.

2. Header Management

  • Guards: Use #ifndef guards. #pragma once is FORBIDDEN.
  • Includes: Prefer #include over forward declarations to prevent hidden dependencies.
  • Details: See headers_scopes.md.

3. Critical Security Requirements

Related skills

More from openharmonyinsight/openharmony-skills

Installs
81
GitHub Stars
21
First Seen
Feb 1, 2026