boost-asio-pro

Installation
SKILL.md

Boost.Asio / standalone Asio

Overview

Write async C++ networking code that compiles on the user's Boost, not the newest one. Asio's API changed shape three times (classic io_serviceio_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.

References: Boost.Asio · standalone Asio

Asio's API changed shape three times, so the same task has three correct answers depending on the Boost version in front of you. This skill makes the agent establish that version first, then apply the rules that are genuinely easy to get wrong — strand versus write serialization, buffer and connection lifetime, composed reads for framing — and finally check its own output against a list before calling it done.

When to Use This Skill

  • Use when writing or reviewing async C++ networking code with Boost.Asio or standalone Asio: TCP/UDP servers and clients, SSL/TLS streams, timers, resolvers.
  • Use when the code involves io_context, io_service, co_spawn, awaitable, async_read, async_write, strand, asio::spawn, yield_context, or completion-handler callbacks.
  • Use when the target toolchain is old: an older Boost or a pre-C++20 standard, where coroutine examples will not compile.
  • Use when async code compiles but misbehaves: interleaved writes, dangling buffers, sockets closing early, operation_aborted treated as an error.

Step 1: pick the style (do this before writing code)

Installs
1
GitHub Stars
46.4K
First Seen
13 days ago
boost-asio-pro — sickn33/agentic-awesome-skills