Tooluck logoTooluck
SKILL.md

boost-asio-pro

Agent skill fromalirezarezvani/claude-skills

Use for any C++ networking code with Boost.Asio or standalone Asio (TCP/UDP, SSL, timers, strands, io_context, co_spawn, awaitable, completion handlers), before writing or reviewing it. Applies lifetime, strand and cancellation rules that avoid the classic async bugs.

How to install boost-asio-pro

install boost-asio-pro
# install the claude-skills pack with the skills CLI
npx skills add alirezarezvani/claude-skills

# or add only this skill to Claude Code: copy the folder

engineering/boost-asio-pro/

# into

~/.claude/skills/boost-asio-pro/ (all projects)

.claude/skills/boost-asio-pro/ (one project)

engineering/boost-asio-pro/SKILL.md

MITFull file
1# Boost.Asio / standalone Asio
2
3## Overview
4
5Write async C++ networking code that compiles on the *user's* Boost, not the newest one. Asio's API changed shape three times (classic `io_service` → `io_context` → C++20 coroutines) and most Asio code on the internet is from the first era, so **pick the style from the toolchain first**, then follow that style's reference file.
6
7**References:** [Boost.Asio](https://www.boost.org/doc/libs/latest/doc/html/boost_asio.html) · [standalone Asio](https://think-async.com/Asio/)
8
9Use this skill whenever async C++ networking code is being written or reviewed — and especially when the target toolchain is old, where coroutine examples simply will not compile. The three worked implementations it references are CI-verified from Boost 1.62 (2016) through 1.90.
10
11## Step 1: pick the style (do this before writing code)
12
13Determine the Boost (or Asio) version and the C++ standard actually in use — `find_package(Boost)` output, `dpkg -l libboost-dev`, `brew info boost`, `CMAKE_CXX_STANDARD`, or ask. Do not assume the newest.
14
15| Boost | C++ std | Style | Read |
16|-------|---------|-------|------|
17| ≥ 1.77 | C++20 | Coroutines (`co_await` + `awaitable<T>`) — preferred | [references/coroutines.md](references/coroutines.md) |
18| ≥ 1.74 | C++11–17 | Completion handlers (callbacks) — the portable baseline | [references/pre-cpp20.md](references/pre-cpp20.md) |
19…

Excerpt shown under the repository's MIT license.

More skills in claude-skills

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates