fix-cppheaders

A workflow for repairing C++ headers when their class layout or virtual-function table differs from reference YAML data. It uses compiler tests to identify the headers and checks the result afterward.

In plain words
What is it for?
Use it to update allowed headers under hl2sdk_cs2 so declarations match verified binary layout information.
Why use it?
It helps resolve mismatches without hiding differences by changing reference data, generated files, or tests.

Skill for Claude CodeCodex

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 skills/hlnd2t/cs2_vibesignatures/fix-cppheaders
Any agent
npx skills add HLND2T/CS2_VibeSignatures --skill fix-cppheaders
Clone the repo
git clone --depth 1 https://github.com/HLND2T/CS2_VibeSignatures

Made for: Claude Code, Codex.

Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 860 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.00091 $0.00860
Opus 5 $0.00046 $0.00430
Sonnet 5 $0.00018 $0.00172
Haiku 4.5 $0.00009 $0.00086

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

Security

Grade A, and why

fix-cppheaders 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/skills/fix-cppheaders/SKILL.md · 68 lines

How it starts

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

Fix C++ Headers

Overview

Repair hl2sdk_cs2 declarations from compiler-versus-YAML layout differences. Treat run_cpp_tests.py as the source of truth for both the initial diff and final verification.

Resolve GAMEVER from the user's explicit request or CS2VIBE_GAMEVER; use only configs/$GAMEVER.yaml for test definitions and fail if it is missing.

Constraints

  • Edit only header paths listed in the failing configs/<GAMEVER>.yaml cpp_tests entry.
  • Require every edited header to be under hl2sdk_cs2/.
  • Preserve existing names and style when the reference exposes only a slot or offset.
  • Keep compiler declarations for gaps in incomplete reference YAMLs unless surrounding index shifts prove removal.
  • Name unknown virtual slots consistently with nearby declarations, such as unk_001; when only a known function name is available, use virtual void FunctionName() = 0; until a reliable prototype is known.
  • Interpret Class_dtor and Class_vdtor reference entries as virtual destructors for Class.
  • Do not edit reference YAMLs, generated files under bin/, cpp test sources, or comparison code to hide a difference.
  • Do not invoke an external agent runner. This SKILL owns the repair loop directly.
  • Stop and report a blocker when the diff is ambiguous, the configured header is missing, or a required edit is outside hl2sdk_cs2/.

Workflow

  1. Determine the game version from the user's request. If omitted, read CS2VIBE_GAMEVER from .env.

  2. Resolve the immutable symbol snapshot. Use a caller-provided actual candidate when available; otherwise use the published historical snapshot at gamesymbols/<gamever>.yaml. Never read reference YAML directly from bin.

  3. Run the complete comparison with debug details:

    uv run run_cpp_tests.py -gamever <gamever> -configyaml configs/<gamever>.yaml -snapshot <snapshot> -debug
    
  4. For each test reporting layout differences, find its cpp_tests entry in configs/<GAMEVER>.yaml and read its symbol, headers, target, aliases, and reference modules.

  5. Read the configured headers and the complete diff sections:

    • Current vtable entries versus YAML reference vtable entries
    • Current record members versus YAML reference struct members
  6. Make the smallest declaration-only edit that aligns the header with the reference. Typical edits are reordering, adding, or removing virtual declarations; correcting inheritance; and adjusting record members or padding.

  7. Re-run the same command with the same snapshot. If differences remain, use the new output rather than the previous diff and repeat.

  8. Finish only when the command exits successfully with zero compile failures, invalid items, and layout differences.

Read the full file on GitHub · 68 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 68 lines · 91 tokens per session scan A c2aaa128ed16

Subscribe to this mod's changes

fix-cppheaders is a skill published in the GitHub repository HLND2T/CS2_VibeSignatures (65 stars, last pushed 2d ago), licensed MIT. It adds 91 tokens to every session and 860 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

add-sgl-kernel

Step-by-step tutorial for adding a heavyweight AOT CUDA/C++ kernel to sgl-kernel (including tests & benchmarks).

sgl-project/sglang · 31 tokens

spanify-buffers

Find and fix unsafe buffer operations in a C++ file by removing UNSAFETODO markers and replacing unsafe raw pointers/C-style functions with base::span and standard safe containers. Use when the user asks to fix unsafe buffer warnings or -Wunsafe-buffer-usage errors. Don't use for other types of memory safety bugs like…

chromium/chromium · 86 tokens

jni-type-conversion

How to use @JniType annotations for ergonomic JNI. Relevant for Java files that use @NativeMethods or @CalledByNative.

chromium/chromium · 32 tokens

platform-port

Guide porting FastLED to new MCU platforms, including int.h types, clockless drivers, SPI implementations, and platform detection. Use when adding support for a new microcontroller family or board.

FastLED/FastLED · 42 tokens

qt-cpp-review

Invoke when the user asks to review, check, audit, or look over Qt6 C++ code — or suggest before committing. Runs deterministic linting (60+ rules) then six parallel deep- analysis agents covering model contracts, ownership, threading, API correctness, error handling, and performance. Reports only high-confidence…

mavlink/qgroundcontrol · 86 tokens

cpp-pro

Writes, optimizes, and debugs C++ applications using modern C++20/23 features, template metaprogramming, and high-performance systems techniques. Use when building or refactoring C++ code requiring concepts, ranges, coroutines, SIMD optimization, or careful memory management — or when addressing performance…

Jeffallan/claude-skills · 79 tokens