Agent skill

Cpp Style

by LuisaGroup in LuisaGroup/LuisaCompute

C++ naming, formatting, static analysis, and RTTI rules for LuisaCompute.

Apache-2.0Auto-check passedSecurity

Install Cpp Style

skills CLI
$ npx skills add LuisaGroup/LuisaCompute --skill cpp-style -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LuisaGroup/LuisaCompute cpp-style --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/LuisaGroup/LuisaCompute.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/cpp-style .claude/skills/cpp-style && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cpp-style
GitHub stars
1.1k
Token cost
~1.1k tokens
SKILL.md length
429 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

C++ naming, formatting, static analysis, and RTTI rules for LuisaCompute.

  • Tasks that involve Static analysis and SAST
  • SKILL.md covers Naming, Syntax Check, Formatting and Static Analysis, plus 4 more sections
  • Calls python

What it does

Cpp Style is an agent skill from LuisaGroup/LuisaCompute. C++ naming, formatting, static analysis, and RTTI rules for LuisaCompute.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Security, covering Static analysis and SAST. It works with C++. The repository describes itself as: High-Performance Rendering Framework on Stream Architectures. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Static analysis and SAST

Example prompts

  • “/cpp-style”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 0c84a1a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cpp Style loads about 1.1k tokens when it runs. Until then it costs about 21 tokens; SKILL.md has 429 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~21
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from LuisaGroup/LuisaCompute at commit 0c84a1a, republished under its Apache-2.0 licence (© LuisaGroup). 429 words, ~1,100 tokens.

Download SKILL.mdSave it as .claude/skills/cpp-style/SKILL.md (or your agent's skills folder).
name
cpp-style
description
C++ naming, formatting, static analysis, and RTTI rules for LuisaCompute.

Naming

  • Classes / structs / enums: CamelCase (MyClass, RenderPipeline)
  • Functions & public vars: snake_case (get_value, process_data)
  • Private/protected members & functions: _snake_case (_private_var, _internal_helper())
  • Constants: kCamelCase or UPPER_SNAKE_CASE for macros
  • Template params: CamelCase
  • Namespaces: luisa, luisa::compute, vstd, etc. Keep compact.

Syntax Check

Use the project C++ syntax checker:

bash
python scripts/check_cpp_syntax.py <file>.cpp

It runs clangd with the project's compile_commands.json and .clang-tidy. Skip files not in compile_commands.json.

Formatting

Format with the project .clang-format (bundled in this skill; the project root copy is authoritative).

Base: LLVM style. Key overrides:

  • Indent: 4 spaces, no tabs. Continuation indent 4. Case labels indented. Preprocessor indent 2.
  • Braces: K&R (attach). No break before braces. Indent braces off.
  • Line width: unlimited (ColumnLimit: 0).
  • Pointers/refs: right-aligned (int *p, int &r).
  • Access modifiers: indent offset -4 (flush with class). Empty lines before/after left as-is.
  • Short constructs: allow single-line for short blocks, functions, ifs, loops, lambdas, enums, case labels.
  • Constructor init: not forced one-per-line; no break before comma.
  • Templates / concepts: break declarations only when multiline; indent requires clause.
  • Spaces: before =, ctor-initializer :, inheritance :, range-for :. No space after C-style casts, !, template keyword, before braced lists. No space in empty parens or before trailing comments.
  • Alignment: after open brackets & operands; don't align consecutive assignments.
  • Includes/using: never auto-sort.
  • Namespaces: compact single-line when short; no indentation inside (ShortNamespaceLines: 0).
  • Strings/comments: break string literals; don't reflow comments.
  • Macros: control-flow-like ($if, $elif, $else, $for, $while, $loop, $switch, $case, $default) get space before (. Function-like macros don't. Special lists:
    • ForEachMacros: LUISA_STRUCT, LUISA_BINDING_GROUP, LUISA_BINDING_GROUP_TEMPLATE
    • IfMacros: $if, $elif, $else, $for, $while, $loop, $switch, $case, $default
    • StatementMacros: LUISA_MAP
Show full SKILL.md (182 more words)Show less

Static Analysis

Run .clang-tidy (bundled in this skill; the project root copy is authoritative).

All checks disabled (-*), then enabled by category:

  • bugprone-*
  • cert-*
  • cppcoreguidelines-*
  • google-* (default-arguments, explicit-constructor, runtime-operator)
  • hicpp-*
  • misc-*
  • modernize-*
  • mpi-, openmp-
  • performance-*
  • portability-*
  • readability-*

See the bundled .clang-tidy for the exact check list.

No RTTI

RTTI is disabled for project code. Do not use:

  • dynamic_cast — use static_cast when type is known
  • typeid
  • std::type_info

Prefer virtual dispatch or explicit type tags for type-safe downcasting. Third-party code under src/ext is exempt.

Integer Types

Prefer fixed-width integer types:

  • Use: int32_t, uint32_t, int64_t, uint64_t, int16_t, uint16_t, int8_t, uint8_t
  • size_t is acceptable for sizes/indices per STL convention.
  • Prefer std::byte for raw byte data.
  • Avoid unsigned int, long long, unsigned long, short, and char for arithmetic. Some platform/system headers may define aliases such as uint; avoid introducing new uses in project code.

Verification

After editing C++ files:

bash
# Check syntax / tidy diagnostics
python scripts/check_cpp_syntax.py src/foo.cpp

# Check formatting (dry run; replace --dry-run with -i to apply)
clang-format --dry-run --Werror src/foo.cpp

# Run clang-tidy on a specific file
clang-tidy -p build src/foo.cpp

When changing build-affecting files, configure and build a relevant target:

bash
xmake f -m debug -c
xmake build <target>

Resources

  • .clang-format — bundled copy of the project formatter config.
  • .clang-tidy — bundled copy of the project static-analysis config.
  • .clangd — project root configuration for clangd diagnostics (not bundled; see project root).

© LuisaGroup, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/cpp-style of LuisaGroup/LuisaCompute.

Open the folder on GitHubat commit 0c84a1a

Compare with similar skills

Cpp Style next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cpp Style compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cpp Style this skillLuisaGroup/LuisaCompute1.1k—~1.1kAutomated safety check: PassApache-2.0
Clangmohitmishra786/low-level-dev-skills253—~1.4kAutomated safety check: PassMIT
Static AnalysisLeoKemp223/embed-ai-tool983—~402Automated safety check: PassNone
CodeQL Security Scantrailofbits/skills7.4k—~4.6kAutomated safety check: NotesCC-BY-SA-4.0
Zeroization Audittrailofbits/skills7.4k4 repos~5.9kAutomated safety check: NotesCC-BY-SA-4.0
Constant-Time Analysistrailofbits/skills7.4k—~3.3kAutomated safety check: NotesCC-BY-SA-4.0

Similar skills

  • Clang

    mohitmishra786/low-level-dev-skills

    Clang/LLVM compiler skill for C/C++ projects. An agent skill from mohitmishra786/low-level-dev-skills.

    253 GitHub stars~1.4k tokensUpdated 3 mo ago
    SecurityAuto-check passed
  • Static Analysis

    LeoKemp223/embed-ai-tool

    当需要对嵌入式 C/C++ 代码运行 cppcheck、clang-tidy 或 GCC analyzer 静态分析,或进行 MISRA-C 合规检查时使用。

    983 GitHub stars~402 tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • CodeQL Security Scan

    trailofbits/skills

    Official

    Scans a codebase for vulnerabilities with CodeQL's data flow and taint tracking in run-all or important-only modes, including data extensions for project-specific sources and sinks.

    7.4k GitHub stars~4.6k tokensUpdated 5 days ago
    SecurityAuto-check: notes
  • Zeroization Audit

    trailofbits/skills

    Official

    Finds sensitive data that C, C++ or Rust code never wipes from memory, including wipes the compiler optimizes away, using source, assembly and control-flow analysis.

    7.4k GitHub starsUsed in 4 repos~5.9k tokens
    SecurityAuto-check: notes
  • Constant-Time Analysis

    trailofbits/skills

    Official

    Compiles cryptographic code and inspects the assembly or bytecode for variable-time instructions, then triages which flagged operations actually touch secrets.

    7.4k GitHub stars~3.3k tokensUpdated 5 days ago
    SecurityAuto-check: notes
  • Taint Instrumentation Assistant

    ArabelaTso/Skills-4-SE

    Instruments code to track the flow of untrusted or sensitive data at runtime, enabling detection of injection vulnerabilities, data leaks, and privilege violations.

    253 GitHub stars~2.9k tokensUpdated 1 mo ago
    SecurityAuto-check passed

More from LuisaGroup/LuisaCompute

All 12 skills in this repo
  • Git

    LuisaGroup/LuisaCompute

    Show uncommitted changes and commit history via git. An agent skill from LuisaGroup/LuisaCompute.

    1.1k GitHub stars~544 tokensUpdated yesterday
    Auto-check passed
  • Ast

    LuisaGroup/LuisaCompute

    Manual AST construction with FunctionBuilder for kernels and callables without DSL sugar.

    1.1k GitHub stars~4.2k tokensUpdated yesterday
    Auto-check passed
  • Cmake

    LuisaGroup/LuisaCompute

    CMake build options, custom functions, and backend patterns for LuisaCompute.

    1.1k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Debug

    LuisaGroup/LuisaCompute

    Debug crashes and test failures via stack-traces, host/device logging, and DSL buffer inspection.

    1.1k GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Hlsl

    LuisaGroup/LuisaCompute

    HLSL code generation, StringBuilder patterns, builtin headers, and DXIL embedding.

    1.1k GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Llvm Spirv

    LuisaGroup/LuisaCompute

    Experimental Vulkan AST-to-LLVM-to-SPIR-V backend, its fail-closed runtime-interface boundary, LLVM build integration, and validation path.

    1.1k GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Cpp Style

What does Cpp Style do?

C++ naming, formatting, static analysis, and RTTI rules for LuisaCompute. Cpp Style is an agent skill from LuisaGroup/LuisaCompute. C++ naming, formatting, static analysis, and RTTI rules for LuisaCompute.

When should I use Cpp Style?

Cpp Style fits situations like: tasks that involve Static analysis and SAST.

How do I install Cpp Style in Claude Code?

Run `npx skills add LuisaGroup/LuisaCompute --skill cpp-style -a claude-code`. Or copy the skill folder (.agents/skills/cpp-style in LuisaGroup/LuisaCompute) into .claude/skills/cpp-style in your project. Claude Code loads it when a task matches its description.

How do I install Cpp Style in Codex?

Run `npx skills add LuisaGroup/LuisaCompute --skill cpp-style -a codex`. Or copy the skill folder (.agents/skills/cpp-style in LuisaGroup/LuisaCompute) into .agents/skills/cpp-style in your project. Codex loads it when a task matches its description.

Can I use Cpp Style in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LuisaGroup/LuisaCompute --skill cpp-style -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cpp-style, .gemini/skills/cpp-style, .github/skills/cpp-style and .opencode/skills/cpp-style in your project.

What does Cpp Style need to run?

Going by SKILL.md and its folder, Cpp Style needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Cpp Style access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cpp Style safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cpp Style use?

Cpp Style is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cpp Style use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cpp Style?

Skills that share tags, products or a category with Cpp Style: Clang (mohitmishra786/low-level-dev-skills, 253 stars), Static Analysis (LeoKemp223/embed-ai-tool, 983 stars), CodeQL Security Scan (trailofbits/skills, 7.4k stars) and Zeroization Audit (trailofbits/skills, 7.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cpp Style?

LuisaGroup (a GitHub organization) maintains it in LuisaGroup/LuisaCompute, which has 1,051 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 6, 2026.

Source: LuisaGroup/LuisaCompute on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.