verify-claim

A command for checking whether a C++ claim is true by compiling and running a small example, with reference material when needed.

In plain words
What is it for?
It verifies claims about C++ semantics, reports the compiler and standard version, and records the example’s actual output.
Why use it?
It replaces assumptions about C++ behavior with evidence from a real compiler and documented language references.

Command for Claude Code

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/awesome-embedded-learning-studio/tutorial_awesomemoderncpp/verify-claim
Clone the repo
git clone --depth 1 https://github.com/Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP

Made for: Claude Code.

Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 577 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.00037 $0.00577
Opus 5 $0.00018 $0.00289
Sonnet 5 $0.00007 $0.00115
Haiku 4.5 $0.00004 $0.00058

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

Security

Grade A, and why

verify-claim 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 2d 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.

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.

.claude/commands/verify-claim.md · 40 lines

What it actually says

/verify-claim — 验证一条 C++ 断言

C++ 语义随标准版本和实现变化,禁止凭记忆断言。本命令把这条金科玉律变成可执行流程:对一条断言,用真实编译输出说话

命名说明:叫 /verify-claim 而非 /verify,是为了避开 Claude Code 内置的 /verify(验证代码改动是否生效)。本命令专做"C++ 断言的编译实证"。

输入

$ARGUMENTS —— 要验证的断言(如"std::move 作用于 const 对象会退化为拷贝")。为空则停下问。

流程

  1. 写最小复现:用 Write 把最小 .cpp 写到 /tmp/(verify_<主题>.cpp),只覆盖断言涉及的行为,别塞无关代码。
  2. 编译(单独一次 Bash):g++ -std=c++20 -O2 -o /tmp/verify_xxx /tmp/verify_xxx.cpp;要看生成的指令再加一次 g++ -std=c++20 -O2 -S -o /tmp/verify_xxx.s /tmp/verify_xxx.cpp
  3. 运行(单独一次 Bash):/tmp/verify_xxx不要和编译用 && 串。
  4. 查标准(必要时):web search cppreference,标标准版本。
  5. 记录编译器:g++ --version

输出

断言:<原文>
结论:成立 / 不成立 / 部分成立(说清条件)
标准:C++XX  |  编译器:GCC XX
最小例子:<code>
真实输出:<粘贴>
依据:cppreference 链接 / 汇编片段(如适用)

硬约束

  • 编译产物只到 /tmp/;禁止在项目目录跑 cmake / make / build。
  • 编译和运行分两次 Bash,不串 &&
  • 不确定就如实说"无法确定",别编输出
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. 2d ago First seen · 40 lines · 37 tokens per session scan A f71c2123740a

Subscribe to this mod's changes

verify-claim is a command published in the GitHub repository Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP (250 stars, last pushed 3d ago), licensed MIT. It adds 37 tokens to every session and 577 once invoked, about $0.0002 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-30.