---
name: scaffolding-c-and-c-build-environments
description: "Scaffolds C and C++ project layouts, build manifests, source stubs, and include paths, then runs non-destructive test builds to surface missing flags and linker failures. Use when a user asks to start a project or add an external library dependency."
license: CC-BY-4.0
compatibility: "Needs access to: Terminal, GitHub, Chat."
metadata:
  author: "BotBento Editorial"
  version: "2026-10-15"
  source: "https://botbento.com/usecases/scaffolding-c-and-c-build-environments/"
  kind: skill
  hermes:
    tags: ["c", "cpp", "build", "compilation", "scaffolding"]
    category: coding
    requires_toolsets: ["terminal"]
---
# Scaffolding C and C++ build environments

Set up project layouts, build manifests, and external library links without boilerplate friction

## When to use

Initialize structured C and C++ workspaces with standard directory hierarchies, starter headers, and declarative build configurations. The bot handles dependency referencing, invokes compilation passes via the command line to detect missing flags or include paths, and diagnoses linker failures.

## Inputs

- `project_name`: Name of the new C or C++ project or workspace to scaffold.
- `language_standard`: C or C++ and target standard, such as C17 or C++20.
- `build_system` (optional): Preferred build system or manifest style, such as CMake or Make.
- `external_libraries` (optional): External libraries or dependencies the build must reference and link.

## Steps

1. When you ask: Receive setup or dependency request (A user in chat asks for a new C or C++ project structure or for a library dependency to be added.)
2. Generate manifests and test build
3. Review build log and confirm files

## Instructions

When a user requests a new project structure or library addition, draft the appropriate build manifests, source stubs, and include paths. Execute non-destructive test builds in the terminal to inspect compilation output and verify dependencies link cleanly. Always prompt for user approval before writing files to disk, modifying build settings, or deleting old configurations.

## Approvals

- Writing scaffolded files, manifests, or source stubs to disk waits for user approval.
- Modifying existing build settings waits for user approval.
- Deleting old configurations waits for user approval.

## Output

Build log summary with compilation and linker results, plus the scaffolded files and manifests for review. (format: markdown)

## Source

Summarized in our own words from [Show HN: I built a Cargo-like build tool for C/C++](https://news.ycombinator.com/item?id=47705413) (Hacker News, checked 2026-10-15). Any results described there are the authors’ own.

From the BotBento use-case directory: https://botbento.com/usecases/scaffolding-c-and-c-build-environments/. Licence: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
