smith-cpp-style

Enforce consistent C++ style in src/smith and examples with clang-format.

236|35|Updated Feb 24, 2020
One-click install
npx skills add https://github.com/llnl/smith --skill smith-cpp-style
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: smith-cpp-style
Source: https://github.com/llnl/smith/tree/main/skills/cpp-style
Command: npx skills add https://github.com/llnl/smith --skill smith-cpp-style

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Smith's C++ codebase suffers from inconsistent style and naming conventions across src/smith and examples, which hampers readability and maintainability.

Core Features & Use Cases

  • Enforces consistent C++ style across the codebase, including formatting, header structure, and naming conventions.
  • Provides guidelines for namespaces, file headers, and trailing newlines to ensure uniform style.
  • Supports code reviews and onboarding by offering a clear reference for expected conventions in new contributions.

Quick Start

Format and name new or edited C++ files in src/smith and examples to conform with Smith's style rules.

Frequently Asked Questions about smith-cpp-style

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

FAQPage Schema
How do I enforce consistent C++ naming conventions in my codebase?

To enforce consistent C++ naming conventions, apply style rules to new or edited C++ files, guiding formatting, naming, and header conventions during development and code reviews to ensure uniformity across the codebase.

What's the best way to standardize C++ header structure for new contributions?

Standardizing C++ header structure requires enforcing specific conventions like using pragma once, nested namespaces, and proper doxygen headers to ensure uniform style and improve readability for new contributions.

Does this C++ style guide work with my existing clang-format settings?

Yes, the C++ style guide ensures consistency with the repository's existing clang-format settings, applying those formatting rules alongside naming and header conventions to maintain code quality.

When do I need to apply C++ style rules during development?

You need to apply C++ style rules whenever you add or edit C++ code in designated source directories, ensuring that formatting, naming, and header conventions are maintained during active development and code reviews.

Why does inconsistent C++ style hamper codebase maintainability?

Inconsistent C++ style hampers maintainability and readability because varying formatting and naming conventions across source files make it difficult for developers to review contributions and onboard new team members effectively.

Can I use this style guide for C++ files outside of the main source directory?

This style guide specifically applies to C++ files within the src/smith and examples directories, ensuring that formatting, header structure, and naming conventions are uniform across the targeted codebase sections.