cmake-build-system
CMake build-system design.
Skill by Literate AI maintainers <literate-ai-maintainers@users.noreply.github.com>
Chalk Labs
Need help deploying cmake-build-system?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jordanhubbard-cmake-build-system-7ecc3f
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
cmake-build-system- Description
- CMake build-system design. Use for Literate AI workflow tasks.
- License
- BSD-2-Clause
- Metadata
- author: Literate AI maintainers <literate-ai-maintainers@users.noreply.github.com>
- Instructions
- 142 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# CMake build-system design
Treat CMake as a strong build-system preference, meaning a default recommendation in this prompt rather than a runtime mandate. Explicit Component specification text and selected Flavor requirements always take precedence. If they require or justify another build system, follow them and record an honest coherent build design; an ordered `-cmake` selector removes this Flavor and therefore removes this skill before generation.
Generate a portable, self-contained `CMakeLists.txt` with the following structure and conventions.
## Minimum version and project declaration
Every generated `CMakeLists.txt` MUST begin with `cmake_minimum_required` and `project()`:
```cmake
cmake_minimum_required(VERSION 3.20)
project(litai_component LANGUAGES CXX) # adjust LANGUAGES for the selected language
```
## Framework-supplied cache variables
Declare the framework-supplied variables as cache entries with safe local defaults so a
human operator can configure the project without passing them explicitly:
```cmake
set(OBJECT_ROOT ${CMAKE_BINARY_DIR} CACHE PATH "Framework-owned intermediate object root")
set(OUT "${CMAKE_BINARY_DIR}/artifacts" CACHE PATH "Framework-owned artifact root")
set(EXPORT_PATH "${OUT}/litai_artifact" CACHE FILEPATH "Exact exported artifact path")
set(LITAI_LANGUAGE_TOOL "" CACHE STRING "Framework-observed language tool executable")
```
Treat these as opaque values selected by the framework: do not rewrite, relativize, or
rediscover `LITAI_LANGUAGE_TOOL` from `PATH` when it is set. Human invocations may rely
on the defaults above; lifecycle invocations remain bound to the observed language
toolchain and framework-owned output custody.
## One root executable target
Every generated `CMakeLists.txt` MUST declare exactly one root target named
`litai_artifact` that builds the complete generated application:
```cmake
add_executable(litai_artifact ${SOURCES}) # adjust for the selected language ecosystem
```
After building `litai_artifact`, a `POST_BUILD` custom command MUST copy the built
binary to the exact `EXPORT_PATH` so the target always leaves one self-contained
portable file there, independent of the generator's own output-directory layout:
```cmake
add_custom_command(
TARGET litai_artifact POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:litai_artifact> "${EXPORT_PATH}"
)
```
The lifecycle may invoke `cmake --build <build-dir> --target litai_artifact` repeatedly
against a new `EXPORT_PATH` while intermediate state remains; the `POST_BUILD` copy runs
every time the target's build step runs, so a repeated invocation must leave a verified
regular file at the exact requested `EXPORT_PATH` or fail non-zero.
## Discoverable tests
Register the generated test suite with CTest so `ctest --test-dir <build-dir>` runs
every generated test case and exits non-zero on any failure:
```cmake
enable_testing()
add_test(NAME litai_tests COMMAND litai_artifact --litai-test)
```
Before completing generation, invoke the selected CMake tool to configure an
out-of-source build directory, build the `litai_artifact` target with disposable
overrides for `OBJECT_ROOT`, `OUT`, `EXPORT_PATH`, and `LITAI_LANGUAGE_TOOL`, and run
the registered CTest suite. Require the build to create the exact export and the test
suite to pass with a nonzero discovered-test count, and both framework modes
(`--litai-test`, `--litai-smoke`) to pass against that export. This local validation may
compile or assemble declared source, but it must not fetch dependencies, invoke a
package manager, publish artifacts, or write outside disposable output roots.
## Build output isolation
All derived artifacts MUST be written under `${OBJECT_ROOT}`, `${OUT}`, or the exact
`${EXPORT_PATH}`. The configure step MUST bind the build directory outside the source
tree (`cmake -S source -B build`); never write build output next to source files. This
constraint makes a fresh `${CMAKE_COMMAND} -E rm -rf` of the build directory a reliable
and complete reset without touching any source file.
## Dependencies use standard CMake idioms
Declare third-party and system dependencies with `find_package` and link them with
`target_link_libraries` using the modern imported-target form:
```cmake
find_package(fmt CONFIG REQUIRED)
target_link_libraries(litai_artifact PRIVATE fmt::fmt)
```
Do not hand-roll compiler or linker flags that a `find_package` result or
`target_link_libraries` usage would otherwise provide.
## Host portability
Compose any `add_custom_command`/`add_custom_target` recipe with the selected OS
Flavor. Prefer `${CMAKE_COMMAND} -E` portable file operations (`copy`, `make_directory`,
`rm`, ...) over a platform-specific shell utility so the same target semantics work on
Linux, macOS, and Windows.
## Integration with the selected language ecosystem
This skill covers the build-system layer only. It composes with the language skill
already selected by the project Flavor set. Defer to the language skill for compiler
flags, package manager invocation, test runner selection, and artifact format.
Reference the language skill's declared sources and commands in `CMakeLists.txt` rather
than duplicating them. Route the primary compiler or interpreter invocation through
`${LITAI_LANGUAGE_TOOL}` when the selected language ecosystem exposes one (for example
by setting `CMAKE_CXX_COMPILER` or invoking it directly from a custom command) rather
than letting CMake's own compiler detection silently diverge from the framework's
locked toolchain.
## Generated application CMakeLists.txt stays in source/
This skill generates the detailed `CMakeLists.txt` for a **product** Component. WriteFrom jordanhubbard/project-tracker, BSD-2-Clause.
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 13, 2026 (1 month ago)
- Last release
- Sep 20, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- BSD-2-Clause
- Repository
- github.com/jordanhubbard/project-tracker
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.542score
cmake-build-system
Literate AI maintainers <literate-ai-maintainers@users.noreply.github.com>
CMake build-system design.
SkillAFreshness: A★ 28Claude Code +9 - 0.311score
cmake-build-system
Literate AI maintainers <literate-ai-maintainers@users.noreply.github.com>
CMake build-system design.
SkillAFreshness: A★ 8Claude Code +9 - 0.296score
cmake-build-system
Literate AI maintainers <literate-ai-maintainers@users.noreply.github.com>
CMake build-system design.
SkillAFreshness: A★ 2Claude Code +9 - 0.280score
cmake-build-system
Literate AI maintainers <literate-ai-maintainers@users.noreply.github.com>
CMake build-system design.
SkillAFreshness: AClaude Code +9 - 0.280score
cmake-build-system
Literate AI maintainers <literate-ai-maintainers@users.noreply.github.com>
CMake build-system design.
SkillAFreshness: AClaude Code +9
More from Literate AI maintainers <literate-ai-maintainers@users.noreply.github.com>
- 0.547score
generate-nvidia-cuda-application
Literate AI maintainers <literate-ai-maintainers@users.noreply.github.com>
Generate and test a C++ CUDA or Python CUDA application from a Literate AI specification after an exact NVIDIA stack has been selected.
SkillAFreshness: A★ 28Claude Code +9 - 0.547score
agent
Literate AI maintainers <literate-ai-maintainers@users.noreply.github.com>
Shared rules for Literate AI agent skills nested under skills/agent.
SkillAFreshness: A★ 28Claude Code +9 - 0.546score
repo-man-build-system
Literate AI maintainers <literate-ai-maintainers@users.noreply.github.com>
NVIDIA repo_man build-entrypoint design.
SkillAFreshness: A★ 28Claude Code +9 - 0.544score
backend-application
Literate AI maintainers <literate-ai-maintainers@users.noreply.github.com>
Fundamental back-end generation indexed off selected language Flavors.
SkillAFreshness: A★ 28Claude Code +9 - 0.544score
language-elixir
Literate AI maintainers <literate-ai-maintainers@users.noreply.github.com>
Recover evidence-backed Elixir and Erlang/OTP behavior when translating Elixir source into Literate AI specifications.
SkillAFreshness: A★ 28Claude Code +9 - 0.544score
docker-container-application
Literate AI maintainers <literate-ai-maintainers@users.noreply.github.com>
Docker container image assembly from selected packaging Flavors, declared entrypoints, and parent-container Flavor closure.
SkillAFreshness: A★ 28Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get cmake-build-system running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
cmake-build-system skill. Agent Mart. https://agentmart.dev/skills/jordanhubbard-cmake-build-system-7ecc3f (last updated 2026-10-24)