Borrowing it
Nothing to install: this file belongs to mcpp-community/mcpp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/mcpp-community/mcpp/main/.agents/skills/mcpp-usage/SKILL.mdgit clone --depth 1 https://github.com/mcpp-community/mcppWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/mcpp-community/mcpp/mcpp-usage)<a href="https://agentmods.dev/skills/mcpp-community/mcpp/mcpp-usage"><img src="https://agentmods.dev/badge/skills/mcpp-community/mcpp/mcpp-usage/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/mcpp-community/mcpp/mcpp-usage"><img src="https://agentmods.dev/badge/skills/mcpp-community/mcpp/mcpp-usage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00051 | $0.01833 |
| Opus 5.5 | $0.00020 | $0.00733 |
| Sonnet 5.5 | $0.00010 | $0.00367 |
| Haiku 4.5 | $0.00005 | $0.00183 |
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 14d ago.
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 How it starts
The opening of the file, as written. The whole thing — 173 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 开箱即用。
- 仓库:https://github.com/mcpp-community/mcpp
- 文档:https://github.com/mcpp-community/mcpp/tree/main/docs
- 包索引:https://github.com/mcpp-community/mcpp-index
- 模块化库:https://github.com/mcpplibs
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 配置
传统头文件库的模块化封装
mcpplibs.mwrap.<库名> 为传统 C/C++ 库提供模块入口;API namespace 保留上游,例如
import mcpplibs.mwrap.opencv.core; 后仍使用 cv::Mat。包版本对齐上游,封装修订最多追加一个数字尾号。
具体已发布的版本/feature 先查索引,不把文档中的候选库当已发布包。
每个新建或重构的 -m 库提供包自带快捷模板:
mcpp new vision --template [email protected]
mcpp new --list-templates [email protected]
模板语法为 [namespace.]name[@version][:template],只有一个默认模板时可以省略模板名。
包模板中的 {{self.name}} 是完整包选择器,应用 "{{self.name}}" 作为单个依赖 key,
不要放到另一层 namespace 表下。模板必须实际创建、构建、运行,而不只做字符串检查。
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.
- 14d ago Changed · +25 lines cb80af19f348
- 2mo ago First seen · 148 lines · 51 tokens per session scan C c3b89a0d0ef4
mcpp-usage is a skill published in the GitHub repository mcpp-community/mcpp (196 stars, last pushed yesterday), licensed Apache-2.0. It adds 51 tokens to every session and 1,833 once invoked, about $0.0002 per session on Opus 5.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.
mcpp-usage compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mcpp-usagemcpp-community/mcpp | Skill | 196 | yesterday | Apache-2.0 | C | 51 | Claude Code, Codex |
| readable-cppcrazyguitar/cppcheatsheet | Skill | 293 | 9d ago | MIT | A | 63 | Claude Code |
| cppcrazyguitar/cppcheatsheet | Skill | 293 | 9d ago | MIT | A | 0 | Claude Code |
| zoom-meeting-sdk-unrealanthropics/knowledge-work-plugins | Skill | 35k | 2d ago | Apache-2.0 | A | 41 | Claude Code |
| doca-argpNVIDIA/skills | Skill | 3.9k | yesterday | Apache-2.0 | A | 277 | Claude Code, Codex |
| cpu-kernelshuggingface/kernels | Skill | 783 | yesterday | Apache-2.0 | A | 89 | Claude Code |
| llvm-learninggmh5225/awesome-llvm-security | Skill | 890 | 1mo ago | MIT | A | 39 | Claude Code |