pybind11-best-practices

Community

Master C++/Python bindings with pybind11.

AuthorVoldemortGin
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides a comprehensive guide to building robust and production-ready C++/Python binding projects using pybind11, streamlining the development of high-performance extensions.

Core Features & Use Cases

  • Project Structure: Demonstrates an optimal directory layout for clarity and maintainability.
  • Build System Integration: Guides through setting up scikit-build-core and CMake for seamless compilation and wheel creation.
  • Binding Patterns: Covers essential techniques like class bindings, STL container conversion, NumPy integration, smart pointers, and trampoline classes for virtual functions.
  • Error Handling & GIL Management: Explains best practices for exception translation and efficient GIL handling.
  • Use Case: You need to expose a complex C++ data processing library to Python for use in a data science project, ensuring efficient execution and easy integration.

Quick Start

Follow the pybind11 best practices to create a new C++ extension module for Python.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: pybind11-best-practices
Download link: https://github.com/VoldemortGin/claude-skills/archive/main.zip#pybind11-best-practices

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.