modern-c-cpp-standards

modern-c-cpp-standards is a skill for Claude Code, Codex from mohitmishra786/low-level-dev-skills. It costs 150 tokens per session (3,111 once invoked), scanned A, original, MIT.

A guide to current C and C++ language standards and how GCC and Clang support them. C and C++ are programming languages; the guide covers C23, C++20, proposed C++26 features, compiler defaults, and feature checks.

In plain words
What is it for?
Use it when upgrading GCC or Clang, migrating code to C23 or C++20, trying features such as C23 checked arithmetic or C++26 reflection, and checking compiler support.
Why use it?
Compiler upgrades can change the language standard used by default and make existing code stop compiling. This guide helps identify the active standard and avoid relying on changing defaults.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when upgrading GCC or Clang, migrating code to C23 or C++20, trying features such as C23 checked arithmetic or C++26 reflection, and checking compiler support.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mohitmishra786/low-level-dev-skills/modern-c-cpp-standards
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.

Any agent
npx skills add mohitmishra786/low-level-dev-skills --skill modern-c-cpp-standards
Clone the repo
git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for modern-c-cpp-standards

README.md
[![agentmods](https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/modern-c-cpp-standards/github.svg)](https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/modern-c-cpp-standards)
Your own site
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/modern-c-cpp-standards"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/modern-c-cpp-standards/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.

agentmods 80×15 button for modern-c-cpp-standards

Your own site · 80×15
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/modern-c-cpp-standards"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/modern-c-cpp-standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,111 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00150 $0.03111
Opus 5.5 $0.00060 $0.01244
Sonnet 5.5 $0.00030 $0.00622
Haiku 4.5 $0.00015 $0.00311

Measured 14d ago against content hash 6028b0d4a4e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

modern-c-cpp-standards 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 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.

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.

skills/compilers/modern-c-cpp-standards/SKILL.md · 274 lines

How it starts

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

Modern C and C++ Standards

Purpose

Guide agents through current C and C++ standards on real compilers (checked with GCC 14/15/16.2 and Clang 23.1): changed defaults, C23 and C2y features, the C++20 default in GCC 16, C++26 reflection and contracts, library hardening, and feature detection.

Triggers

  • "My code stopped compiling after upgrading to GCC 15/16"
  • "What changed in C23 and how do I use #embed / nullptr / ckd_add?"
  • "How do I try C++26 reflection?"
  • "How do C++26 contracts (pre, post, contract_assert) work?"
  • "Which compiler supports which C++26 feature?"
  • "How do I detect language features portably?"

Workflow

1. Which standard am I compiling with?

Compiler Default C Default C++
GCC 14 gnu17 (201710L) gnu++17 (201703L)
GCC 15 gnu23 (202311L) gnu++17
GCC 16 gnu23 gnu++20 (202002L)
Clang 23 gnu17 gnu++17
# Print the effective standard version macros
gcc -dM -E -x c /dev/null | grep __STDC_VERSION__
g++ -dM -E -x c++ /dev/null | grep '__cplusplus '

# Pin the standard in the build instead of relying on defaults
gcc -std=gnu17 ...      # CMake: set(CMAKE_C_STANDARD 17), set(CMAKE_CXX_STANDARD 17)
Build broke after a compiler upgrade?
├── C file → new default is C23 → section 2 (or pin -std=gnu17 while fixing)
├── C++ file with GCC 16 → new default is C++20 → section 4 (or pin -std=gnu++17)
└── Neither → check release notes for new warnings promoted to errors

2. Moving C code to C23

C17 code C23 behaviour Fix
typedef int bool; / #define bool int bool, true, false are keywords: 'bool' cannot be defined via 'typedef' Remove; use the keyword (or <stdbool.h> is a no-op)
int f(); then f(1, 2) () means (void): too many arguments to function 'f' Write the full prototype
K&R definitions int f(a, b) int a, b; {...} Removed from C23 Convert to prototype form
Identifiers nullptr, constexpr, typeof, static_assert, alignas, thread_local Now keywords Rename

Read the full file on GitHub · 274 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. 14d ago First seen · 274 lines · 150 tokens per session scan A 6028b0d4a4e7

Subscribe to this mod's changes

modern-c-cpp-standards is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (310 stars, last pushed 14d ago), licensed MIT. It adds 150 tokens to every session and 3,111 once invoked, about $0.0006 per session on Opus 5.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-11-21.

Related

modern-c-cpp-standards compared with skills from other repositories

modern-c-cpp-standards next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
modern-c-cpp-standardsmohitmishra786/low-level-dev-skillsSkill31014d agoMITA150Claude Code, Codex
header-only-c-cpp-ingestionalivirgo/Major-AI-SkillsSkill6todayMITA25Claude Code
zoom-meeting-sdk-unrealanthropics/knowledge-work-pluginsSkill38ktodayApache-2.0A41Claude Code
cudnn-installNVIDIA/skillsSkill4.3ktodayApache-2.0A49Claude Code, Codex
ccclNVIDIA/skillsSkill4.3ktodayApache-2.0A206Claude Code, Codex
doca-argpNVIDIA/skillsSkill4.3ktodayApache-2.0A277Claude Code
address-sanitizerRedHatProductSecurity/prodsec-skillsSkill2084d agoApache-2.0A35Claude Code