Sign in
Explore
Prompts · PromptEveryday codingDebuggingReviewed

cpp-build

Fix C++ build errors, CMake issues, and linker problems incrementally. Invokes the cpp-build-resolver agent for minimal, surgical fixes.

Kind
Prompt
Works with
Claude Code, Codex
Languages
C / C++
Source
affaan-m/ECC @ d3b8a3e90890
Path
commands/cpp-build.md
Jobs
Debugging
Topics
Debugging

Credit

Made by
affaan-m
Original
github.com/affaan-m/ECC/blob/d3b8a3e908904e242ed2dbe66af62cca…
License
MIT

Listed by Skill Manifest; not made by us.

InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
Install factsScanned 3 Nov 2026
Adds
  • .claude/commands/cpp-build.md (run as /cpp-build)
Runs scripts
Yes
  • shell block in the text
Uses the network
None found
Needs secrets
None found
Calls other skills
  • /cpp-test
  • /cpp-review
Source revision
d3b8a3e90890
Licence
MIT
Last activity
23 Nov 2026
Source changed after the scan
Yes
  • Last push 23 Nov 2026, scanned 3 Nov 2026; read it again before you rely on this scan
Review
Reviewed

Found by a static scan of the stored text; nothing is run. “None found” is not a guarantee, so read what you install before you run it.

# C++ Build and Fix

This command invokes the **cpp-build-resolver** agent to incrementally fix C++ build errors with minimal changes.

## What This Command Does

1. **Run Diagnostics**: Execute `cmake --build`, `clang-tidy`, `cppcheck`
2. **Parse Errors**: Group by file and sort by severity
3. **Fix Incrementally**: One error at a time
4. **Verify Each Fix**: Re-run build after each change
5. **Report Summary**: Show what was fixed and what remains

## When to Use

Use `/cpp-build` when:
- `cmake --build build` fails with errors
- Linker errors (undefined references, multiple definitions)
- Template instantiation failures
- Include/dependency issues
- After pulling changes that break the build

## Diagnostic Commands Run

```bash
# CMake configure
cmake -B build -S .

# Build
cmake --build build 2>&1 | head -100

# Static analysis (if available)
clang-tidy src/*.cpp -- -std=c++17
cppcheck --enable=all src/
```

## Example Session

```text
User: /cpp-build

Agent:
# C++ Build Resolution

## Initial Diagnostics

```bash
$ cmake --build build
src/service/user.cpp:25:15: error: use of undeclared identifier 'UserRepository'
…