format

Format C++ source files in place using the project's clang-format configuration.

307|59|Updated Jun 2, 2024
One-click install
npx skills add https://github.com/spiriMirror/libuipc --skill format-spirimirror
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: format
Source: https://github.com/spiriMirror/libuipc/tree/main/.cursor/skills/format
Command: npx skills add https://github.com/spiriMirror/libuipc --skill format-spirimirror

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The skill helps maintain consistent C++ code style by formatting source files according to the project's clang-format configuration, reducing manual edits and styling drift.

Core Features & Use Cases

  • Enforces code style across C++ headers and sources using the project's .clang-format.
  • Formats only changed files relative to main or a specified baseline.
  • Use case: Before commits or PRs to ensure a clean, consistent diff.

Quick Start

Run clang-format to reformat all tracked C++ files in the repository.

Frequently Asked Questions about format

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I format C++ code with clang-format before committing?

Format C++ code by running clang-format to reformat tracked headers and sources in place, ensuring a clean and consistent diff before commits or PRs.

Can I format only changed C++ files relative to main?

Yes, you can format only changed files relative to main or a specified baseline, avoiding unnecessary reformatting of stable code during development or CI pipelines.

Do I need clang-format installed to automate C++ code style enforcement?

Yes, automating C++ code style requires clang-format to be installed and available in PATH to apply the project's .clang-format configuration to source files.

What is the best way to enforce consistent C++ code style across a project?

Enforce consistent C++ code style by applying the project's .clang-format configuration across headers and sources during development, CI pipelines, and pre-commit hooks.

Does this C++ formatting tool modify files in place?

Yes, the formatting process modifies C++ source files in place, directly applying the style rules defined in the project's .clang-format configuration.

When do I need to run clang-format in a CI pipeline?

Run clang-format in a CI pipeline to automatically verify and enforce that all committed C++ source files conform to the project's defined code style configuration.