Skip to content
Back to skills

Conan Basic Usage

ASecurity

Basic operations for the Conan C++ package manager. Use when the user explicitly asks to 'use conan' for tasks like creating projects, installing dependencies, or building packages, or asks for 'how to' guidance on Conan setup.

  • 666 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added February 8, 2026
businessc++bash

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill conan-basic-usage --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Conan Basic Usage?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Conan Basic Usage
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-conan-basic-usage/badge)](https://www.skillsdirectory.com/skills/majiayu000-conan-basic-usage)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: conan-basic-usage
description: Basic operations for the Conan C++ package manager. Use when the user explicitly asks to 'use conan' for tasks like creating projects, installing dependencies, or building packages, or asks for 'how to' guidance on Conan setup.
---

# Conan Basic Usage

## Overview

This skill provides guidance on using Conan, the C/C++ package manager. It covers project initialization, dependency management, and package creation.

## Quick Start

### 1. Initialize a Project

To create a standard project structure for a C++ library using CMake:

```bash
mkdir myproject && cd myproject
conan new cmake_lib -d name=myproject -d version=0.1
```

This generates:
- `conanfile.py`: The package recipe.
- `CMakeLists.txt`: The build script.
- `src/` & `include/`: Source and header files.
- `test_package/`: A consumer project to verify the package.

### 2. Install Dependencies

To install dependencies defined in `conanfile.py` and build missing binaries:

```bash
conan install . --build=missing
```

### 3. Create/Build Package

To build the package and export it to your local Conan cache:

```bash
conan create .
```

This runs the `build()` method in `conanfile.py`, creates the binary package, and runs the tests in `test_package/`.

## Common Tasks

### Managing Dependencies

- **Install**: Use `conan install .` to resolve and install dependencies. Add `--build=missing` to compile from source if binaries aren't available for your configuration.
- **Inspect**: Use `conan graph info .` to see the dependency tree.

### Remote Management

- **List Remotes**: `conan remote list`
- **Add Remote**: `conan remote add <remote_name> <url>`
- **Upload**: `conan upload <package_name> -r <remote_name>`

## Reference



- **Project Structure**: Best practices for directory layout. See [project-structure.md](references/project-structure.md).

- **Configuration**: Core settings, cache location, and profiles. See [configuration.md](references/configuration.md).

- **Runtime & Build Layout**: Build directory structure and how to find shared libraries. See [runtime-layout.md](references/runtime-layout.md).

- **Internal Files**: Understanding `conanmanifest.txt`, `conaninfo.txt`, etc. See [internal-files.md](references/internal-files.md).

- **Commands**: Comprehensive list of common commands. See [commands.md](references/commands.md).






Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.