/conan-vcpkg
C/C++ package manager skill covering Conan and vcpkg. Use when adding third-party library dependencies to C/C++ projects, managing binary compatibility, integrating with CMake, or choosing between Conan and vcpkg. Activates on queries about Conan, vcpkg, C++ dependency
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill conan-vcpkg --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/conan-vcpkg
Context preview
The summary Claude sees to decide when to auto-load this skill.
C/C++ package manager skill covering Conan and vcpkg. Use when adding third-party library dependencies to C/C++ projects, managing binary compatibility, integrating with CMake, or choosing between Conan and vcpkg. Activates on queries about Conan, vcpkg, C++ dependency
SKILL.md
conan-vcpkg.SKILL.mdname: conan-vcpkg
description: C/C++ package manager skill covering Conan and vcpkg. Use when adding third-party library dependencies to C/C++ projects, managing binary compatibility, integrating with CMake, or choosing between Conan and vcpkg. Activates on queries about Conan, vcpkg, C++ dependency management, conanfile.txt, vcpkg.json, CMake package integration, or C++ package managers.
Conan and vcpkg
Purpose
Guide agents through C/C++ dependency management with Conan and vcpkg: declaring dependencies, integrating with CMake, managing binary compatibility, and choosing the right tool for a given project.
Triggers
- "How do I add a C++ library dependency with Conan?"
- "How do I use vcpkg with CMake?"
- "What's the difference between Conan and vcpkg?"
- "How do I add zlib/openssl/fmt with a package manager?"
- "How do I create a vcpkg.json manifest?"
- "My Conan package build is failing — how do I debug it?"
Workflow
1. Conan vs vcpkg decision
Which package manager?
├── Team uses MSVC on Windows primarily → vcpkg (better MSVC integration)
├── Need binary packages (no source builds in CI) → Conan (binary cache)
├── Need cross-compilation support → Conan (profiles) or Zig-based builds
├── Need a specific version of a package → Conan (flexible versioning)
├── Quick project setup, just need it to work → vcpkg (simpler)
└── Open-source project, broad audience → vcpkg (GitHub-integrated)
2. vcpkg setup
# Clone vcpkg
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh # Linux/macOS
./vcpkg/bootstrap-vcpkg.bat # Windows
# Install packages (classic mode)
./vcpkg/vcpkg install zlib curl openssl
# Integrate with CMake
cmake -S . -B build \
-DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake3. vcpkg manifest mode (recommended)
// vcpkg.json — place at project root
{
"name": "myapp",
"version": "1.0.0",
"dependencies": [
"zlib",
"curl",
{ "name": "openssl", "version>=": "3.0.0" },
{ "name": "boost-filesystem", "platform": "!windows" },
{
"name": "fmt",
"features": ["core"]
}
],
"builtin-baseline": "abc123..."
}# CMakeLists.txt
cmake_minimum_required(VERSION 3.20)
project(myapp)
find_package(ZLIB REQUIRED)
find_package(CURL REQUIRED)
find_package(fmt REQUIRED)
add_executable(myapp src/main.cpp)
target_link_libraries(myapp PRIVATE ZLIB::ZLIB CURL::libcurl fmt::fmt)
# Build — vcpkg automatically installs dependencies
cmake -S . -B build \
-DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build4. Conan setup
# Install Conan
pip install conan
# Set up default profile (detects compiler, OS)
conan profile detect
# Check your profile
conan profile show
5. Conan with CMake (Conan 2.x)
# conanfile.txt
[requires]
zlib/1.3
fmt/10.2.1
openssl/3.2.0
[generators]
CMakeDeps
CMakeToolchain
[options]
openssl/*:shared=False
# Install dependencies
conan install . --output-folder=build --build=missing
# Configure and build
cmake -S . -B build \
-DCMAKE_TOOLCHAIN_FILE=build/conan_toolchain.cmake \
-DCMAKE_BUILD_TYPE=Release
cmake --build build# CMakeLists.txt
find_package(ZLIB REQUIRED)
find_package(fmt REQUIRED)
find_package(OpenSSL REQUIRED)
add_executable(myapp src/main.cpp)
target_link_libraries(myapp PRIVATE
ZLIB::ZLIB
fmt::fmt
OpenSSL::SSL OpenSSL::Crypto
)6. Conan profiles for cross-compilation
# ~/.conan2/profiles/linux-arm64
[settings]
os=Linux
arch=armv8
compiler=gcc
compiler.version=12
compiler.libcxx=libstdc++11
build_type=Release
[buildenv]
CC=aarch64-linux-gnu-gcc
CXX=aarch64-linux-gnu-g++
[tool_requires]
# Tools that run on build machine (x86)
# Cross-compile
conan install . \
--profile:build=default \
--profile:host=linux-arm64 \
--output-folder=build-arm \
--build=missing7. conanfile.py (advanced)
# conanfile.py
from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake
class MyAppConan(ConanFile):
name = "myapp"
version = "1.0"
settings = "os", "compiler", "build_type", "arch"
def requirements(self):
self.requires("zlib/1.3")
self.requires("fmt/10.2.1")
if self.settings.os == "Linux":
self.requires("openssl/3.2.0")
def generate(self):
tc = CMakeToolchain(self)
tc.generate()
deps = CMakeDeps(self)
deps.generate()
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()8. Common dependency lookup
| Library | vcpkg name | Conan name | |---------|-----------|-----------| | zlib | `zlib` | `zlib/1.3` | | OpenSSL | `openssl` | `openssl/3.2.0` | | libcurl | `curl` | `libcurl/8.4.0` | | {fmt} | `fmt` | `fmt/10.2.1` | | spdlog | `spdlog` | `spdlog/1.12.0` | | Boost | `boost` | `boost/1.83.0` | | nlohmann-json | `nlohmann-json` | `nlohmann_json/3.11.3` | | googletest | `gtest` | `gtest/1.14.0` | | Google Benchmark | `benchmark` | `benchmark/1.8.3` | | SQLite | `sqlite3` | `sqlite3/3.44.0` | | protobuf | `protobuf` | `protobuf/4.25.1` |
For vcpkg baseline pinning and Conan binary cache setup, see [references/package-manager-patterns.md](references/package-manager-patterns.md).
Related skills
- Use `skills/build-systems/cmake` for CMake integration with both Conan and vcpkg
- Use `skills/compilers/cross-gcc` for cross-compilation with Conan profiles
- Use `skills/build-systems/ninja` as the backend for package-managed projects
Read more
name: conan-vcpkg description: C/C++ package manager skill covering Conan and vcpkg. Use when adding third-party library dependencies to C/C++ projects, managing binary compatibility, integrating with CMake, or choosing between Conan and vcpkg. Activates on queries about Conan, vcpkg, C++ dependency management, conanfile.txt, vcpkg.json, CMake package integration, or C++ package managers.
Conan and vcpkg
Purpose
Guide agents through C/C++ dependency management with Conan and vcpkg: declaring dependencies, integrating with CMake, managing binary compatibility, and choosing the right tool for a given project.
Triggers
- "How do I add a C++ library dependency with Conan?"
- "How do I use vcpkg with CMake?"
- "What's the difference between Conan and vcpkg?"
- "How do I add zlib/openssl/fmt with a package manager?"
- "How do I create a vcpkg.json manifest?"
- "My Conan package build is failing — how do I debug it?"
Workflow
1. Conan vs vcpkg decision
Which package manager? ├── Team uses MSVC on Windows primarily → vcpkg (better MSVC integration) ├── Need binary packages (no source builds in CI) → Conan (binary cache) ├── Need cross-compilation support → Conan (profiles) or Zig-based builds ├── Need a specific version of a package → Conan (flexible versioning) ├── Quick project setup, just need it to work → vcpkg (simpler) └── Open-source project, broad audience → vcpkg (GitHub-integrated)
2. vcpkg setup
# Clone vcpkg
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh # Linux/macOS
./vcpkg/bootstrap-vcpkg.bat # Windows
# Install packages (classic mode)
./vcpkg/vcpkg install zlib curl openssl
# Integrate with CMake
cmake -S . -B build \
-DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake3. vcpkg manifest mode (recommended)
// vcpkg.json — place at project root
{
"name": "myapp",
"version": "1.0.0",
"dependencies": [
"zlib",
"curl",
{ "name": "openssl", "version>=": "3.0.0" },
{ "name": "boost-filesystem", "platform": "!windows" },
{
"name": "fmt",
"features": ["core"]
}
],
"builtin-baseline": "abc123..."
}# CMakeLists.txt cmake_minimum_required(VERSION 3.20) project(myapp) find_package(ZLIB REQUIRED) find_package(CURL REQUIRED) find_package(fmt REQUIRED) add_executable(myapp src/main.cpp) target_link_libraries(myapp PRIVATE ZLIB::ZLIB CURL::libcurl fmt::fmt)
# Build — vcpkg automatically installs dependencies
cmake -S . -B build \
-DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build4. Conan setup
# Install Conan pip install conan # Set up default profile (detects compiler, OS) conan profile detect # Check your profile conan profile show
5. Conan with CMake (Conan 2.x)
# conanfile.txt [requires] zlib/1.3 fmt/10.2.1 openssl/3.2.0 [generators] CMakeDeps CMakeToolchain [options] openssl/*:shared=False
# Install dependencies
conan install . --output-folder=build --build=missing
# Configure and build
cmake -S . -B build \
-DCMAKE_TOOLCHAIN_FILE=build/conan_toolchain.cmake \
-DCMAKE_BUILD_TYPE=Release
cmake --build build# CMakeLists.txt
find_package(ZLIB REQUIRED)
find_package(fmt REQUIRED)
find_package(OpenSSL REQUIRED)
add_executable(myapp src/main.cpp)
target_link_libraries(myapp PRIVATE
ZLIB::ZLIB
fmt::fmt
OpenSSL::SSL OpenSSL::Crypto
)6. Conan profiles for cross-compilation
# ~/.conan2/profiles/linux-arm64 [settings] os=Linux arch=armv8 compiler=gcc compiler.version=12 compiler.libcxx=libstdc++11 build_type=Release [buildenv] CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ [tool_requires] # Tools that run on build machine (x86)
# Cross-compile
conan install . \
--profile:build=default \
--profile:host=linux-arm64 \
--output-folder=build-arm \
--build=missing7. conanfile.py (advanced)
# conanfile.py
from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake
class MyAppConan(ConanFile):
name = "myapp"
version = "1.0"
settings = "os", "compiler", "build_type", "arch"
def requirements(self):
self.requires("zlib/1.3")
self.requires("fmt/10.2.1")
if self.settings.os == "Linux":
self.requires("openssl/3.2.0")
def generate(self):
tc = CMakeToolchain(self)
tc.generate()
deps = CMakeDeps(self)
deps.generate()
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()8. Common dependency lookup
| Library | vcpkg name | Conan name | |---------|-----------|-----------| | zlib | `zlib` | `zlib/1.3` | | OpenSSL | `openssl` | `openssl/3.2.0` | | libcurl | `curl` | `libcurl/8.4.0` | | {fmt} | `fmt` | `fmt/10.2.1` | | spdlog | `spdlog` | `spdlog/1.12.0` | | Boost | `boost` | `boost/1.83.0` | | nlohmann-json | `nlohmann-json` | `nlohmann_json/3.11.3` | | googletest | `gtest` | `gtest/1.14.0` | | Google Benchmark | `benchmark` | `benchmark/1.8.3` | | SQLite | `sqlite3` | `sqlite3/3.44.0` | | protobuf | `protobuf` | `protobuf/4.25.1` |
For vcpkg baseline pinning and Conan binary cache setup, see [references/package-manager-patterns.md](references/package-manager-patterns.md).
Related skills
- Use `skills/build-systems/cmake` for CMake integration with both Conan and vcpkg
- Use `skills/compilers/cross-gcc` for cross-compilation with Conan profiles
- Use `skills/build-systems/ninja` as the backend for package-managed projects
A curated suite of AI agent skills for systems and low-level programming — C/C++, Rust, Zig, GPU, bare-metal firmware, Linux kernel/driver development, computer architecture, compiler internals, HPC, and more.
Repo: mohitmishra786/low-level-dev-skills
Other skills on low-level-dev-skills.
- /custom-allocators
Custom allocator skill for memory allocation strategies. Use when implementing pool/slab/arena allocators, tuning jemalloc/mimalloc, writing Rust GlobalAlloc, or benchmarking allocator performance. Activates on queries about jemalloc, mimalloc, tcmalloc, arena allocator,
Open skill - /numa-programming
NUMA programming skill for multi-socket memory locality. Use when detecting NUMA topology, binding processes with numactl, using libnuma API, building NUMA-aware data structures, or measuring remote access penalties. Activates on queries about numactl, libnuma, NUMA topology,
Open skill - /af-xdp
AF_XDP skill for high-performance XDP sockets. Use when creating AF_XDP sockets, configuring UMEM and XSK rings, XDP_REDIRECT programs, copy vs zero-copy mode, or comparing with DPDK. Activates on queries about AF_XDP, xsk_umem, XDP_REDIRECT, libbpf xsk, or zero-copy XDP.
Open skill - /dpdk
DPDK skill for userspace packet I/O. Use when initializing EAL, configuring PMD drivers, using mbuf pools and rte_ring, setting up huge pages, RSS, or testpmd validation. Activates on queries about DPDK, EAL, rte_eth_rx_burst, hugepages, PMD, or testpmd.
Open skill - /io-uring
io_uring skill for Linux async I/O. Use when building high-performance servers with liburing, multi-shot operations, provided buffers, fixed files, zero-copy send, or tokio-uring. Activates on queries about io_uring, SQE/CQE, liburing, IORING_OP_PROVIDE_BUFFERS, or io_uring vs
Open skill - /adc-dac-baremetal
Bare-metal ADC and DAC skill. Use when configuring analog sampling, DMA-driven ADC, calibration, or DAC output on MCUs. Activates on queries about ADC bare-metal, sampling time, DMA ADC, or DAC channel setup.
Open skill

