mcpp-usage

A C++23 build tool for creating, building, testing, running, and packaging modular C++ projects. It also manages project dependencies and compiler toolchains.

In plain words
What is it for?
Use it to create projects, add or update packages, install toolchains, run tests, build programs, package projects, and diagnose setup problems.
Why use it?
It brings common project setup and build tasks into one command-line tool, including diagnostics and explanations of build decisions or error codes.

Skill for Claude CodeCodex

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 skills/mcpp-community/mcpp/mcpp-usage
Any agent
npx skills add mcpp-community/mcpp --skill mcpp-usage
Clone the repo
git clone --depth 1 https://github.com/mcpp-community/mcpp

Made for: Claude Code, Codex.

Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,379 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00051 $0.01379
Opus 5 $0.00026 $0.00690
Sonnet 5 $0.00010 $0.00276
Haiku 4.5 $0.00005 $0.00138

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

Security

Grade C, and why

mcpp-usage scanned grade C with 2 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -fsSL https://github.com/mcpp-community/mcpp/releases/latest/download/install.sh | bash

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -fsSL https://github.com/mcpp-community/mcpp/releases/latest/download/install.sh | bash
.agents/skills/mcpp-usage/SKILL.md · 148 lines

How it starts

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

mcpp 基础用法

Overview

mcpp 是一个现代 C++ 模块化构建工具,纯 C++23 模块编写,已实现自举。一条命令安装,import std 开箱即用。

Quick Reference

命令 用途
mcpp new <name> 创建项目
mcpp build 构建
mcpp run [-- args] 构建并运行
mcpp test [pattern] [-- args] 发现并运行 tests/**/*.cpp 测试
mcpp add <pkg>[@ver] 添加依赖
mcpp remove <pkg> 移除依赖
mcpp update [pkg] 更新依赖
mcpp search <keyword> 搜索包
mcpp toolchain list 查看工具链
mcpp toolchain install gcc 16 安装工具链
mcpp pack 打包
mcpp why [toolchain|runtime|deps] 解释解析出的构建决策
mcpp --offline 只使用已有本地状态
mcpp self doctor 环境诊断
mcpp explain <CODE> 错误码解释

安装

# 推荐;Windows 请在 PowerShell 中运行
xlings install mcpp -y

# 或 Unix release 一键脚本(仅 Linux x86_64/aarch64 与 macOS ARM64)
curl -fsSL https://github.com/mcpp-community/mcpp/releases/latest/download/install.sh | bash

一键脚本不支持 Windows;Windows 使用 PowerShell 的 xlings 安装命令。安装到 ~/.mcpp/ 后会自动加入 PATH。首次使用时,mcpp 按宿主选择默认工具链并 安装到隔离沙盒:Linux 通常为 GCC,macOS 为 LLVM,Windows 在有可用 MSVC 时为 LLVM,否则为面向 x86_64-windows-gnu 的 MinGW-w64 GCC。

创建项目

mcpp new hello && cd hello
mcpp build
mcpp run

生成的项目包含最小 manifest 和可立即运行的 smoke test:

[package]
name = "hello"
version = "0.1.0"
description = "A modular C++23 package"
license = "Apache-2.0"

src/main.cpp 会自动推断为 binary target,tests/test_smoke.cpp 会由 mcpp test 自动发现;无需手写 [targets.hello]

mcpp.toml 配置

[package]
name = "myapp"
version = "0.1.0"

[targets.myapp]
kind = "bin"                # bin / lib / shared; tests are discovered from tests/**/*.cpp
main = "src/main.cpp"

[dev-dependencies]
gtest = "1.15.2"            # 仅测试使用;SemVer: ^, ~, 范围, 精确

[toolchain]
default = "[email protected]"

更多配置:https://github.com/mcpp-community/mcpp/blob/main/docs/05-mcpp-toml.md

Read the full file on GitHub · 148 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 · 148 lines · 51 tokens per session scan C c3b89a0d0ef4

Subscribe to this mod's changes

mcpp-usage is a skill published in the GitHub repository mcpp-community/mcpp (114 stars, last pushed 2d ago), licensed Apache-2.0. It adds 51 tokens to every session and 1,379 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

readable-cpp

Readable C/C++/Rust/CUDA code rules inspired by The Art of Readable Code. Use when writing, reviewing, or refactoring C, C++, Rust, or CUDA code. Enforces short functions, flat control flow, clear naming, readable structure, and idiomatic patterns.

crazyguitar/cppcheatsheet · 63 tokens

cpp

Comprehensive C/C++ programming reference covering everything from C11-C23 and C++11-C++23, system programming, CUDA GPU computing, debugging tools, Rust interop, and advanced topics. Use for: C/C++ questions, C/C++ interview preparation, modern language features, RAII/memory management, templates/generics, CUDA…

crazyguitar/cppcheatsheet · 107 tokens

mcpp-style-ref

为 mcpp 项目应用 Modern/Module C++ (C++23) 编码风格。适用于编写或审查带模块的 C++ 代码、命名标识符、组织 .cppm/.cpp 文件,或用户提及 mcpp、module C++、现代 C++ 风格时。.

Sunrisepeak/mbun · 73 tokens

mbun-runtime-debugging

调试 mbun 运行时测试失败/崩溃时用。提供仓库实测可用的定位配方——选二进制、单文件跑测、gdb 抓 backtrace、按 API 定位源码、常见坑排查清单、何时跳过。凡处理 bun 测试跑不过/段错误/hang/断言失败,先读本 skill 再动手,避免每个 task 重复摸索拖慢。.

Sunrisepeak/mbun · 109 tokens

dev-process

在本仓开发任何改动前用。规定 issue 先行的开发流程,按 bugfix / 优化 / 新功能分流;新功能须经 issue 充分讨论并在 .agents/docs 落地设计方案;衔接 tdd-workflow 与本体验证 / 测试 / CI / PR 规范。开发前先读本 skill。.

Sunrisepeak/mbun · 82 tokens

issue-reporting

向本仓提交 issue / 发起讨论时用。规定一份好问题反馈的 SOP——软件/版本、报错信息、初步分析、相关资料,并去除本地隐私(用户名/token 等替换)。凡要创建 issue、反馈 bug、发起讨论,先读本 skill 再动手。.

Sunrisepeak/mbun · 75 tokens