C++ Linting

Validate C++ source code against defined naming and formatting rules.

1|Updated Dec 2, 2025
One-click install
npx skills add https://github.com/kmt-t/fireball --skill c-linting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: C++ Linting
Source: https://github.com/kmt-t/fireball/tree/main/.agent/skills/cpp_linting
Command: npx skills add https://github.com/kmt-t/fireball --skill c-linting

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automatically validates C++ source code against a defined coding style and formatting rules, helping teams enforce consistency and reduce review time.

Core Features & Use Cases

  • Automated Naming & Formatting: Enforces snake_case for variables/functions/classes, UPPER_SNAKE_CASE for constants/macros, and two-space indentation.
  • Style Conformance in CI: Run checks on single files or entire directories to catch violations early in the development workflow.
  • Use Case: Integrate into pull requests to automatically report linting issues and ensure consistent code style across the codebase.

Quick Start

Run the linter on your codebase: python3 .agent/skills/cpp_linting/scripts/linter.py <source-file-or-directory>

Frequently Asked Questions about C++ Linting

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

FAQPage Schema
How do I automate C++ coding style checks for naming conventions and formatting?

You can automate C++ coding style checks by running a Python linter script that enforces snake_case, UPPER_SNAKE_CASE, 2-space indentation, and K&R braces across individual files or entire project directories.

What is the best way to enforce snake_case and K&R braces in a C++ project?

To enforce snake_case and K&R braces in a C++ project, use a linter script that leverages clang-format and clang-tidy when available to automatically validate your source files against defined formatting rules.

Can I run clang-tidy and clang-format checks on a whole directory instead of single files?

Yes, you can run clang-tidy and clang-format checks on a whole directory by passing the directory path to the Python linter script, enabling automated style violation detection across all C++ source files.

Does C++ linting work without clang-format and clang-tidy installed?

The linter script leverages clang-format and clang-tidy when available, applying its own defined rules for snake_case, UPPER_SNAKE_CASE, 2-space indentation, and K&R braces even if those specific tools are not installed.

How do I integrate C++ linting into CI pipelines to catch formatting violations?

To integrate C++ linting into CI pipelines, run the linter script against your source directory to automatically report style and formatting issues, catching violations early during development and code reviews.

What naming conventions are enforced by automated C++ linting?

Automated C++ linting enforces snake_case for variables, functions, and classes, and UPPER_SNAKE_CASE for constants and macros, ensuring consistent naming and formatting across the codebase.