fix-cppheaders
Skill67 starsChanged 58 days agoMITView on GitHub
Use when hl2sdk_cs2 C++ headers must be repaired to match the latest vtable or record-layout YAML references. Runs run_cpp_tests.py to obtain layout diffs, maps failing cpp_tests entries to their configured headers, edits only those headers, and repeats validation until the differences are resolved. Triggers: fix cpp headers, fix-cppheaders, repair vtable layout, repair record layout, header layout differences.
- Reads credentials
In this repository54 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- cleanup-workspaceSkill
- convert-finder-skill-to-preprocessor-scriptsSkill
- create-agent-skill-fallbackSkill
- create-cpp-testsSkill
- create-preprocessor-scriptsSkill
- create-prSkill
- dump-vtablesSkill
- find-CBaseEntity_GetChangeAccessorPathInfo_1Skill
- find-CCSBotManager_AddBot_BotNavIgnoreSkill
- find-CCSGameRules__sm_mapGcBanInformationSkill
- find-CCSPlayer_MovementServices_CheckJumpButton_WaterPatchSkill
- find-CCSPlayer_MovementServices_FullWalkMove_SpeedClampSkill
- find-CEntitySystem_Init-decompilesSkill
- find-CEntitySystem_m_entityNamesSkill
- find-CNetworkGameServerBase_CheckTimeouts-decompilesSkill
- find-CNetworkGameServerBase_CreateFakeClientSkill
- find-CNetworkGameServerBase_GetChallengeTypeSkill
- find-CNetworkGameServer_GetFreeClientSkill
- find-CNetworkMessages_dtorSkill
- find-CNetworkMessages_GetIsForServerSkill
- find-CNetworkMessages_GetNetworkSerializationContextDataSkill
- find-CNetworkMessages_vtable-decompilesSkill
- find-CServerSideClientBase_GetUserIDStringSkill
- find-CSource2Server_Shutdown-decompilesSkill
- find-CSteam3ServerS1_InitGameServer-decompilesSkill
- find-INetworkServerService_GetServerSerializersCRCSkill
- find-INetworkServerService_IsActiveInGameSkill
- find-INetworkServerService_IsServerRunningSkill
- find-IVEngineServer2_GetClientSteamIDSkill
- find-OnServerVoiceData_IsPlayingDemo_CalleeSkill
- generate-reference-yamlSkill
- generate-signature-for-functionSkill
- generate-signature-for-globalvarSkill
- generate-signature-for-patchSkill
- generate-signature-for-structoffsetSkill
- generate-signature-for-vfuncoffsetSkill
- get-func-from-yamlSkill
- get-vtable-addressSkill
- get-vtable-from-yamlSkill
- get-vtable-indexSkill
- init-gamebinSkill
- rename-preprocessor-scriptsSkill
- resolve-pr-conflictSkill
- run-validation-until-no-failureSkill
- run-vcall-finderSkill
- trigger-release-buildSkill
- write-func-as-yamlSkill
- write-globalvar-as-yamlSkill
- write-patch-as-yamlSkill
- write-structoffset-as-yamlSkill
- write-vfunc-as-yamlSkill
- write-vtable-as-yamlSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Keep compiler declarations for gaps in incomplete reference YAMLs unless surrounding index shifts prove removal.
- Very specific: line 29
Do not edit reference YAMLs, tracked bin_artifacts, cpp test sources, or comparison code to hide a difference.
- Distinctive: line 30
Do not invoke an external agent runner.
- Very specific: line 31
Stop and report a blocker when the diff is ambiguous, the configured header is missing, or a required edit is outside hl2sdk_cs2/.
- Distinctive: line 40
Run the complete comparison with debug details:
- Distinctive: line 48
Read the configured headers and the complete diff sections:
- Distinctive: line 59
If compilation fails after an edit, inspect the compiler error, repair the edited declaration, and rerun.
- Distinctive: line 60
If unrelated pre-existing failures prevent a clean full run, verify the affected test output as far as the runner permits and report the …
- Very specific: line 62
If headers is absent or empty, do not guess an edit target.
- Distinctive: line 63
If multiple headers are configured, trace the declared symbol before choosing the file.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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>.yamlcpp_testsentry. - 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, usevirtual void FunctionName() = 0;until a reliable prototype is known. - Interpret
Class_dtorandClass_vdtorreference entries as virtual destructors forClass. - Do not edit reference YAMLs, tracked
bin_artifacts, 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
- Determine the game version from the user's request. If omitted, read
CS2VIBE_GAMEVERfrom.env. - Resolve a release-local immutable symbol candidate. Use a caller-provided actual candidate when available; otherwise
build one from tracked
bin_artifacts/<gamever>/withgamesymbol_candidate.py buildand explicit temporary output/ session paths. Never use a trackedgamesymbols/fallback or read per-symbol truth frombin/. Run the complete comparison with debug details:
uv run run_cpp_tests.py -gamever <gamever> -configyaml configs/<gamever>.yaml -snapshot <snapshot> -debug- For each test reporting layout differences, find its
cpp_testsentry inconfigs/<GAMEVER>.yamland read itssymbol,headers, target, aliases, and reference modules. - Read the configured headers and the complete diff sections:
Current vtable entriesversusYAML reference vtable entriesCurrent record membersversusYAML reference struct members
- 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.
- Re-run the same command with the same snapshot. If differences remain, use the new output rather than the previous diff and repeat.
- Finish only when the command exits successfully with zero compile failures, invalid items, and layout differences.
Failure Handling
- If compilation fails after an edit, inspect the compiler error, repair the edited declaration, and rerun.
- If unrelated pre-existing failures prevent a clean full run, verify the affected test output as far as the runner permits and report the unrelated failures verbatim.
- If
headersis absent or empty, do not guess an edit target. Report the test name and request a config correction. - If multiple headers are configured, trace the declared symbol before choosing the file; do not edit every header blindly.
Completion Report
Report the headers changed, the layout mismatches corrected, and the exact final verification command and result.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

