cpp26-init

A project setup command for C++26, the upcoming version of the C++ programming language standard. It creates or updates project files such as CMakeLists.txt, .clangd, and a plugin configuration file.

In plain words
What is it for?
Starting or upgrading a C++ project, enabling C++26 settings, exporting compiler information for code tools, and recording project-specific overrides.
Why use it?
It puts the project settings and compiler information expected by the C++26 tools in one place, while avoiding unwanted overwrites of existing content.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/parasxos/cpp26-adapter/cpp26-init
Clone the repo
git clone --depth 1 https://github.com/parasxos/cpp26-adapter
Per session 85 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,272 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00085 $0.01272
Opus 5 $0.00043 $0.00636
Sonnet 5 $0.00017 $0.00254
Haiku 4.5 $0.00009 $0.00127

Measured yesterday against content hash 558e9b5e1561, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cpp26-init scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/cpp26-init.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/cpp26-init — scaffold a C++26 project

Run this once per project to wire up the toolchain expectations the cpp26-adapter plugin assumes. The command is idempotent: re-running on a configured project diffs against the desired state and only writes files that are missing or out-of-date. Existing user content is never clobbered without a backup.

What this does

  1. Detect the project root. Walk up from the current directory looking for .git, CMakeLists.txt, or package.json. If none exists, use the current directory.

  2. CMakeLists.txt — if missing, scaffold a minimal C++26 project:

    cmake_minimum_required(VERSION 3.28)
    project(my_project LANGUAGES CXX)
    
    set(CMAKE_CXX_STANDARD 26)
    set(CMAKE_CXX_STANDARD_REQUIRED ON)
    set(CMAKE_CXX_EXTENSIONS OFF)
    set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
    
    # Pin -std=c++2c so build is portable even when compilers don't
    # recognize CXX_STANDARD 26 yet.
    add_compile_options(-std=c++2c)
    
    add_executable(my_project main.cpp)
    

    If CMakeLists.txt already exists:

    • Check for set(CMAKE_CXX_STANDARD 26) (or equivalent). If missing or set lower, emit a suggested patch but do not apply it without consent.
    • Check for CMAKE_EXPORT_COMPILE_COMMANDS. If missing, suggest adding it (clangd-driven editing depends on this).
  3. .clangd — if missing, scaffold:

    CompileFlags:
      Add:
        - "-std=c++2c"
        - "-Wno-unknown-pragmas"  # quiet pragmas the user has opted into
      # If the user has clang-p2996 installed elsewhere:
      # CompilerPath: /opt/clang-p2996/bin/clang++
    
    Diagnostics:
      UnusedIncludes: Strict
      MissingIncludes: Strict
      ClangTidy:
        Add: [modernize-*, performance-*]
        Remove: [modernize-use-trailing-return-type]
    
  4. .cpp26-adapter.yaml — write a default that opts the project into the plugin's defaults:

    # cpp26-adapter project overrides.
    #   Set skip-skill: true to disable the cpp26-idioms skill for
    #   legacy modules that should remain pre-C++26 idiomatic.
    #   Add anti-pattern ids to allow-list to silence specific
    #   PostToolUse findings.
    skip-skill: false
    allow-list: []
    # Optional: override the compiler the reviewer uses on this project.
    # compiler: clang-p2996
    

Read the full file on GitHub · 146 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 146 lines · 85 tokens per session scan A 558e9b5e1561

Subscribe to this mod's changes

cpp26-init is a command published in the GitHub repository parasxos/cpp26-adapter (3 stars, last pushed 3mo ago), licensed MIT. It adds 85 tokens to every session and 1,272 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.