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 agentmods add skills/redtropig/harness-anchor/cpp-build-systemsnpx skills add Redtropig/harness-anchor --skill cpp-build-systemsgit clone --depth 1 https://github.com/Redtropig/harness-anchorWrote 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/redtropig/harness-anchor/cpp-build-systems)<a href="https://agentmods.dev/skills/redtropig/harness-anchor/cpp-build-systems"><img src="https://agentmods.dev/badge/skills/redtropig/harness-anchor/cpp-build-systems.svg" alt="Measured on agentmods" 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.00033 | $0.01239 |
| Opus 5 | $0.00016 | $0.00620 |
| Sonnet 5 | $0.00007 | $0.00248 |
| Haiku 4.5 | $0.00003 | $0.00124 |
Grade A, and why
cpp-build-systems 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 5d 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 — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.
C/C++ Build Systems
The build system is the single most important piece of C/C++ tooling — it determines how every other tool (clang-tidy, IWYU, language servers, debuggers) understands your code.
The compile_commands.json invariant
Every C/C++ project must export
compile_commands.json.
It's a JSON database of compiler invocations per file. Without it, clang-tidy/IWYU/clangd can't parse your code correctly (they need to know macros, includes, standard, flags). The cpp-static-analysis skill enforces this prerequisite.
Per-build-system commands
CMake
cmake -S . -B .build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build .build -j
-DCMAKE_EXPORT_COMPILE_COMMANDS=ONis mandatory unless already inCMakeLists.txtviaset(CMAKE_EXPORT_COMPILE_COMMANDS ON)- Out-of-source build (
.build/) keeps the source tree clean - Symlink from project root so tools find it:
ln -sf .build/compile_commands.json .
Meson
meson setup builddir
meson compile -C builddir
- Meson emits
compile_commands.jsonin builddir automatically. Symlink it to root if tooling expects it there.
Make (raw)
Pure Makefile projects don't generate compile_commands.json natively. Use bear:
bear -- make -j
Or compiledb:
compiledb make -j
Bazel
bazel build //...
bazel run @hedron_compile_commands//:refresh_all
Bazel requires the hedron_compile_commands rule. If not configured, suggest the user add it; do NOT try to hand-edit BUILD files.
Build failure triage (you fix common ones, escalate the rest)
-
CMake "could not find package X" → likely missing
find_package(X REQUIRED)cleanup or wrong CMAKE_PREFIX_PATH. Suggest:cmake -L .buildto inspect, or pass-DX_DIR=.... -
Linker "undefined reference" → missing source in target or missing link library. Check
target_link_libraries(...)lists everything.
What ships with it
3 files 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.
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.
- 5d ago First seen · 127 lines · 33 tokens per session scan A 45f17abdd3a5
cpp-build-systems is a skill published in the GitHub repository Redtropig/harness-anchor (13 stars, last pushed 1mo ago), licensed MIT. It adds 33 tokens to every session and 1,239 once invoked, about $0.0002 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.
Other skills, from other repositories
zephyr-json
JSON serialization and deserialization in Zephyr RTOS using the descriptor-based JSON library. Use when encoding C structs to JSON strings, parsing JSON into C structs, working with nested objects or arrays, handling cloud/IoT protocols (MQTT, HTTP, CoAP payloads), or implementing REST APIs on embedded devices.
unreal-cpp
写 Unreal C++/蓝图时使用。UObject/GC、反射宏、Tick 性能、蓝图边界。.
cmd_cpp_build
Fix C++ build errors, CMake issues, and linker problems incrementally. Invokes the cpp-build-resolver agent for minimal, surgical fixes.
cmd_cpp_test
Enforce TDD workflow for C++. Write GoogleTest tests first, then implement. Verify coverage with gcov/lcov.
cpp-coding-standards
C++ coding standards based on the C++ Core Guidelines (isocpp.github.io). Use when writing, reviewing, or refactoring C++ code to enforce modern, safe, and idiomatic practices.
cpp-coding-standards
C++ coding standards based on the C++ Core Guidelines (isocpp.github.io). Use when writing, reviewing, or refactoring C++ code to enforce modern, safe, and idiomatic practices.