Individual skill

cpp-formatting

Use in C/C++ projects for clang-format. Changed-lines-only; never reformat unchanged code mid-feature. .clang-format from root or LLVM baseline.

skills/cpp-formatting/SKILL.md

Read pinned source

Source commit 2664c77b1388efbc59aca14602ba7de1a2b96935

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
Yes
Repository scan complete
No
Skill scan complete
No
Observed behavior
Local scripts
Last checked
Nov 11, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
13
Repository last updated
Jul 31, 2026
License
MIT

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# C/C++ Formatting (clang-format)

`clang-format` is the de-facto C/C++ formatter. Like Prettier or rustfmt, it's deterministic and removes formatting debates.

## Prerequisites

- `clang-format` reachable — see "Is clang-format actually here?" below before concluding
  it's missing; only then `brew install clang-format` / `apt install clang-format`.
- `.clang-format` config at project root (use `templates/cpp/.clang-format.tpl` if not present — `/cpp-init` drops it for you)

## Format changed lines only (preferred)

```bash
git diff -U0 --no-color HEAD | clang-format-diff -p1 -i
Back to top