agentsclimarketplace

Meson setup configuration

Skill krxecs/meson-skills/skills/meson-setup-configuration

Configure Meson build directories, set compiler options, define build types, and manage build-time options. Use this skill when setting up a new build, switching compilers, enabling debug or release modes, setting sanitizers, changing optimization levels, or modifying any build option via `-D` flags or `meson configure`.From its SKILL.md

Install
npx -y skills add krxecs/meson-skills --skill meson-setup-configuration

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.1 KB, 638 tokens by cl100k_base, as published. Nobody here has run it

Meson Setup and Configuration

meson setup creates the build directory and locks in the compiler, toolchain, and option set. Use meson configure for later edits and meson setup --reconfigure when the build state should be refreshed.

Useful defaults

meson setup builddir -Dwarning_level=3

Common configuration goals

  • switch between debug and release
  • turn warnings into errors
  • enable or disable optional features
  • set the install prefix and directories
  • choose sanitizers or LTO
  • adjust the language standard
  • choose native or cross machine files

Build-type guidance

Use build types as workflow choices, not as hidden policy inside every project example.

  • debug for day-to-day development
  • debugoptimized for a practical developer build
  • release for shipping binaries
  • minsize when footprint matters
  • plain when the build should avoid Meson-imposed defaults

Practical rules

  • set compiler selection before the first meson setup
  • edit options with meson configure instead of rewriting the build tree by hand
  • wipe or reconfigure when the toolchain changes
  • keep project options in meson_options.txt and project(default_options: ...)
  • use built-in options for standards and warning levels rather than manual -std= flags

Modern baseline

All examples in this repository assume meson_version: '>=1.7.0' and the following standard project header:

project(
  'my-project',
  'c',
  'cpp',
  version: '0.1.0',
  meson_version: '>=1.7.0',
  license: 'MIT',
  license_files: ['LICENSE'],
  default_options: [
    'c_std=c17',
    'cpp_std=c++20',
    'warning_level=3',
  ],
)

Common mistakes

  • changing compiler variables after setup and expecting them to take effect automatically
  • editing the build tree by hand instead of reconfiguring
  • putting language standards in random target arguments instead of built-in options
  • forcing production-only settings into beginner examples
  • confusing project defaults with per-build workflow decisions

Language Standard Selection Guidance

When migrating a project to Meson:

  1. Inspect CMakeLists.txt for CMAKE_C_STANDARD and CMAKE_CXX_STANDARD.
  2. Inspect Autotools files such as configure.ac and Makefile.am, plus any compiler flags like -std=c17 or -std=c++20.
  3. Inspect plain Makefiles for -std= flags.
  4. Inspect CI configurations and compiler invocation scripts.
  5. If the standards still cannot be deduced, ask the user directly which C and C++ standards they want.
  6. If the project is being created from scratch and the user has no preference, default to the default_options block in the project header above.

Do not silently change language standards during Meson migration.

What ships with it: 2 files

6.2 KB alongside SKILL.md

Gives 0 of the 12 instructions most project setup skills give in 638 tokens

Counted across 999 of the 1,637 authors here whose files we hold, read 2026-08-07

  • Ask one question at a timein 29 of 999, across 28 files
  • Detect the package manager from lockfilesin 28 of 999, across 9 files
  • Present findings to the userin 26 of 999, across 5 files
  • Explore current repo statein 24 of 999, across 3 files
  • Update the agent skills block in place if it existsin 24 of 999, across 3 files
  • Install husky lint-staged and prettierin 23 of 999, across 4 files
  • Create the lintstagedrc filein 22 of 999, across 3 files
  • Commit all changed filesin 22 of 999, across 3 files
  • Run lint-staged to verify it worksin 22 of 999, across 3 files
  • Create the husky pre-commit filein 21 of 999, across 2 files
  • Create a prettierrc file if missingin 21 of 999, across 2 files
  • Initialize huskyin 21 of 999, across 2 files

Said here and by no other author read

  • use meson setup to create the build directory
  • use meson configure for later edits
  • set compiler selection before the first meson setup
  • wipe or reconfigure when the toolchain changes
  • use built-in options for language standards
  • keep project options in meson options files

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,871. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.