Index of every page on this site: llms.txt
All skills
openvinotoolkit avatar

/code-review

@993f33e
Run it yourself

Review OpenVINO changes for correctness, compatibility, performance, security, testing, and maintainability. Use when reviewing a pull request, branch, commit, or proposed diff.

Use this Skill: https://skilld.dev/gh/openvinotoolkit/openvino/code-review

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencescmake.md

≈755 tokens on demand. Your agent reads this file only when SKILL.md points to it.

CMake and Build System Review

Applies to CMakeLists.txt, *.cmake, *.cmake.in, cmake/, and toolchain files; for dependency or CI job changes, also apply ci.md.

Mandatory requirements

General

  • Follow modern CMake practices: target-scoped commands; explicit PUBLIC/PRIVATE/INTERFACE; linking to targets instead of paths; no global flags, includes, definitions, or warning suppressions.
  • New targets use project helpers (ov_add_target with SOURCES, ov_add_plugin, ov_add_frontend, ov_add_test_target); raw add_library/add_executable must be justified.
  • Do not collect target sources with file(GLOB*), including ROOT and ADDITIONAL_SOURCE_DIRS of ov_add_target. Other globbing must be justified.
  • Justify exceptions with an in-code comment and list each one in the review for the human approver; a missing justification is a finding.
  • Internal dependencies (oneDNN, protobuf, pugixml, etc.) must not leak into the public interface of openvino::runtime.

Options

  • Avoid new public options: ov_option* (in features.cmake) adds to OV_OPTIONS, the developer package interface; use it only if out-of-tree plugins or extensions need it, else option()/cmake_dependent_option().
  • Defaults are correct for static builds, cross-compilation, and every OS/arch. A new public option defaults to the previous behavior; consumers tolerate its absence in an older developer package.
  • Renames or removals of options need a compatibility path; document user-facing options in docs/dev/cmake_options_for_custom_compilation.md.

Static build, install, and export

  • New library targets have an openvino::<name> alias with matching EXPORT_NAME, plus ov_install_static_lib and ov_developer_package_export_targets if shipped or used elsewhere. Self-registering objects need whole-archive linking.
  • Every install() sets a COMPONENT (new ones via ov_cpack_add_component) and uses OV_CPACK_*DIR destinations. Exported target names stay stable.

CMake and OpenVINO version compatibility

  • Commands, keywords, generator expressions, and policies must exist in the file's minimum CMake version and not be removed or deprecated in CMake 4.x.
  • The build tree uses the root cmake_minimum_required. Files shipped downstream (cmake/templates/*.cmake.in, developer package scripts, samples/) have a lower minimum; guard newer features with CMAKE_VERSION or if(POLICY ...). Raising the minimum needs a reason and CI support.
  • cmake/developer_package/** is installed as a whole, so its functions, macros, variables, and exported targets are public API. Removals, renames, and signature changes need a deprecation path; OpenVINOConfig-version.cmake.in only compares versions and cannot detect them.

Common problems in past PRs

  • Option ON by default pulls in a target missing in static or trimmed builds.
  • PUBLIC link to an internal library leaks it into OpenVINOTargets.cmake.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning21d3 checks · Risk SAFE
  • Gen Agent Trust Hub21d

    The skill provides a comprehensive and secure set of instructions for performing code reviews within the OpenVINO repository. It focuses on correctness, safety, performance, and maintainability without introducing any malicious patterns or dangerous operations.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: MEDIUM · 1 issue

Signed by skilld at 993f33e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 14 hours ago.

Activeupdated yesterday

README badge

README badge for openvinotoolkit/openvino/code-review