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.
npx skills add alivirgo/Major-AI-Skills --skill header-only-c-cpp-ingestiongit clone --depth 1 https://github.com/alivirgo/Major-AI-SkillsWrote 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/alivirgo/major-ai-skills/header-only-c-cpp-ingestion)<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.
<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>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.00025 | $0.01210 |
| Opus 5.5 | $0.00010 | $0.00484 |
| Sonnet 5.5 | $0.00005 | $0.00242 |
| Haiku 4.5 | $0.00003 | $0.00121 |
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 1mo 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.
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)│
└───────────────────────────────────────────────────────────────────────────┘
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.
- 1mo ago Changed · -20 tokens per session 8f1fb87421c9
- 1mo ago First seen · 115 lines · 45 tokens per session scan A e4373ba23b4f
header-only-c-cpp-ingestion is a skill published in the GitHub repository alivirgo/Major-AI-Skills (2 stars, last pushed yesterday), licensed MIT. It adds 25 tokens to every session and 1,210 once invoked, about $0.0001 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-09-05.
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-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.
embedded-stm32
Best practices for embedded C/C++ development on STM32 microcontrollers using the HAL, covering peripherals, DMA, interrupts, memory constraints, and hardware-focused testing. Use when writing STM32 HAL code, configuring peripherals generated by STM32CubeMX, working with interrupts or DMA, debugging with SWD/JTAG…
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…
cpp-idioms
Modern C++ (17/20/23) idioms: RAII, smart pointers, value semantics, Rule of Zero/Five, concepts, and std::expected error handling. Use when writing, refactoring, or reviewing C++ code, CMake targets, or native modules.
cpp
Guidelines for modern C++ development with C++17/20 standards, memory safety, and performance optimization.