header-only-c-cpp-ingestion

header-only-c-cpp-ingestion is a skill for Claude Code, Codex from alivirgo/Major-AI-Skills. It costs 25 tokens per session (1,210 once invoked), scanned A, original, MIT.

A method for reading C and C++ header files before their implementation files. A header usually describes the public classes, data structures, constants, and function signatures that other code can use.

In plain words
What is it for?
Use it when understanding or integrating C or C++ modules, especially code with large implementation files.
Why use it?
It gives an agent the module's interface before exposing it to lengthy low-level implementation details.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Part of the major-ai-skills plugin — 147 skills, 7 plugins shipped together

Good fit Use it when understanding or integrating C or C++ modules, especially code with large implementation files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alivirgo/major-ai-skills/header-only-c-cpp-ingestion
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 alivirgo/Major-AI-Skills --skill header-only-c-cpp-ingestion
Clone the repo
git clone --depth 1 https://github.com/alivirgo/Major-AI-Skills

Made for: Claude Code, Codex.

Or install major-ai-skills, the plugin that ships this one along with the rest of its 147 skills, 7 plugins.

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 header-only-c-cpp-ingestion

README.md
[![agentmods](https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/header-only-c-cpp-ingestion/github.svg)](https://agentmods.dev/skills/alivirgo/major-ai-skills/header-only-c-cpp-ingestion)
Your own site
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/header-only-c-cpp-ingestion"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/header-only-c-cpp-ingestion/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 header-only-c-cpp-ingestion

Your own site · 80×15
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/header-only-c-cpp-ingestion"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/header-only-c-cpp-ingestion.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,210 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.00025 $0.01210
Opus 5 $0.00013 $0.00605
Sonnet 5 $0.00005 $0.00242
Haiku 4.5 $0.00003 $0.00121

Measured yesterday against content hash 8f1fb87421c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

header-only-c-cpp-ingestion 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.

skills/header-only-c-cpp-ingestion/SKILL.md · 115 lines

How it starts

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

Header-First C/C++ Ingestion (Interface Contract Protocol)

Overview

In systems programming codebases (C, C++, CUDA, Rust, Go), implementation files (.cpp, .c, .cu) are packed with thousands of lines of memory allocations (malloc, smart_ptr), low-level bitwise operations, cache alignments, and loop unrollings.

When an AI agent needs to integrate with a module or understand its public API, ingesting 2,000-line .cpp implementation files burns 15,000+ tokens on internal execution details.

The Header-First Ingestion Protocol directs the agent to inspect the lightweight interface header (.h, .hpp, .hxx) first. The header provides 100% of the class interfaces, struct layouts, enum constants, and method prototypes in 15% of the token cost.


Heavy .cpp Implementation vs. Lightweight .hpp Header

┌─────────────────────────────────────────────────────────────┐
│                 C/C++ Ingestion Economics                   │
│                                                             │
│  Full Implementation Ingestion (`engine.cpp` - 4,800 Tokens):│
│  • 1,200 lines of SIMD vectorization, cache tiling, locks   │
│  • Low-level memory buffers and mutex synchronization       │
│  ↳ 4,800 tokens billed, high cognitive noise                │
│                                                             │
│  Header Interface Ingestion (`engine.hpp` - 380 Tokens):    │
│  • Struct layout (`EngineConfig`, `FrameBuffer`)            │
│  • Class declaration (`RenderEngine`)                       │
│  • Method prototypes (`init()`, `renderFrame()`, `stop()`)  │
│  ↳ 380 clean tokens (92.1% Reduction!), 100% API clarity    │
└─────────────────────────────────────────────────────────────┘

The 2-Tier Inspection Hierarchy

┌───────────────────────────────────────────────────────────────────────────┐
│ TIER 1: INSPECT HEADER FIRST (`.h` / `.hpp` / `.d.ts` / `traits.rs`)      │
│ • Extract struct fields, class signatures, and public methods             │
│ • Formulate complete integration plan or caller code                      │
│                                                                           │
│ TIER 2: SLICE IMPLEMENTATION ONLY IF FIXING A BUG (`.cpp` / `.c`)        │
│ • If modifying an internal method: use line-bounded `view_file`           │
│   (e.g., lines 140-180 of `engine.cpp` rather than the entire 1,200 lines)│
└───────────────────────────────────────────────────────────────────────────┘

Read the full file on GitHub · 115 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 Changed · -20 tokens per session 8f1fb87421c9
  2. 6d ago First seen · 115 lines · 45 tokens per session scan A e4373ba23b4f

Subscribe to this mod's changes

header-only-c-cpp-ingestion is a skill published in the GitHub repository alivirgo/Major-AI-Skills (1 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 1,210 once invoked, about $0.0001 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-09-05.

Related

Other skills, from other repositories

ax-cpp-agent-memory-skills

Use when writing C++ code with axllm for agent memory, recall callbacks, dynamic skill discovery, loaded-skill state, and used-skill tracking.

ax-llm/ax · 42 tokens

ax-cpp-agent-context

Use when writing C++ code with axllm for deciding between context maps, trajectory context policy, offline optimization (ACE/GEPA), and memory recall for long-context agents.

ax-llm/ax · 44 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 · 0 tokens

cpp-expert

Expert-level C++ development with modern C++20/23, STL, memory management, and performance. Use when the user mentions C++, C++20, C++23, the STL, templates, or performance, or when the task involves Modern C++ Features, Memory Management, Ranges and Views, or Coroutines.

personamanagmentlayer/pcl · 70 tokens

agent-memory-mcp-v2

Agent Memory Skill workflow skill. Use this skill when the user needs A hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions) and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing…

diegosouzapw/awesome-omni-skills · 62 tokens

cpp-coroutines

C++20 coroutines skill for understanding coroutine mechanics and debugging. Use when working with coawait, coyield, coreturn, implementing promisetype, understanding coroutine frame layout, debugging suspended coroutines in GDB, or inspecting frame allocation with Compiler Explorer. Activates on queries about C++20…

mohitmishra786/low-level-dev-skills · 89 tokens