Format

From spiriMirror/libuipc · View interactive version

Format is an AI agent skill from the GitHub repository spiriMirror/libuipc. Format C++ code using clang-format

How to use this skill

Skill file

Format

Overview

Format C++ code using the .clang-format file in the project root.

Format Changed Files

Use the repository helper with clang-format 18 (the same major as CI):

python scripts/format_changed.py
python scripts/format_changed.py --check

The helper selects committed C++ changes from the merge base of origin/main

to HEAD; use --base <ref> when a different base is intended. Format newly

edited, uncommitted files explicitly before staging them. Formatter lookup and

the pinned Windows executable are documented in

the build guide.

Format a Specific File

clang-format-18 -i <file>

Format All C++ Files in a Directory

find <directory> -type f \( -name '*.h' -o -name '*.hpp' -o -name '*.cpp' -o -name '*.inl' -o -name '*.cu' -o -name '*.cuh' \) -exec clang-format-18 -i {} +
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.