holepunch-dev

Guides API discovery and development across the Holepunch P2P ecosystem libraries.

Updated May 11, 2026
One-click install
npx skills add https://github.com/thachrocky12345/local-agent-train-workstation --skill holepunch-dev-thachrocky12345
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: holepunch-dev
Source: https://github.com/thachrocky12345/local-agent-train-workstation/tree/main/qvac/.cursor/skills/holepunch-dev
Command: npx skills add https://github.com/thachrocky12345/local-agent-train-workstation --skill holepunch-dev-thachrocky12345

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Holepunch, Bare, and Pear libraries evolve quickly and their APIs are spread across dozens of repositories, making it hard to find accurate, current documentation when building P2P applications. ## Core Features & Use Cases - Discovery Playbook: An 8-step workflow for learning any Holepunch library on-the-fly via docs.pears.com, GitHub READMEs, test files, workshops, and dependency traversal using the gh CLI. - Composition Patterns: Ready-made code patterns for common stacks like Corestore + Hyperswarm + Hyperbee (KV database), Autobase + HyperDB multi-writer setups, and Hyperdrive file sharing. - Verified Gotchas: Production-verified pitfalls such as Protomux RPC registration order, Corestore storage locking, and Autobase addWriter constraints. - Use Case: When building a Pear desktop app that syncs data between peers, use this Skill to discover the right hypercore/autobase APIs and avoid known integration bugs. ## Quick Start Use the holepunch-dev skill to show me how to build a multi-writer P2P database with Autobase and HyperDB.

Frequently Asked Questions about holepunch-dev

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find API documentation for Holepunch libraries?

Start at docs.pears.com, the canonical module index, then fetch the GitHub README with gh api repos/holepunchto/{repo}/readme. If unclear, check the repo's test files, example repos, and workshop repositories for real usage patterns.

How to build a P2P key-value database with Hyperbee?

Combine Corestore, Hyperswarm, and Hyperbee: create a core from the store, wrap it in a Hyperbee with utf-8 encodings, then replicate over Hyperswarm connections by joining the core's discovery key.

What is the difference between Hyperbee and HyperDB?

Hyperbee is a single-writer key-value database built on a Hypercore. HyperDB is a schema-defined database used with Hyperschema and Hyperdispatch, typically paired with Autobase for multi-writer setups.

Why does Protomux reject sessions with CHANNEL_CLOSED errors?

This happens when the RPC handler is registered after store.replicate(conn). Replicate creates a Protomux that immediately processes buffered data, so register the protocol handler before calling replicate.

Can I use Node.js Buffer in Bare runtime modules?

Use b4a (buffer-to-anything) instead of Node.js Buffer for cross-runtime compatibility. Most bare-* modules mirror Node.js standard library equivalents, with Node.js-compat shims available in bare-node.

Why does Corestore fail when two writers share a storage path?

Corestore's RocksDB backend acquires an exclusive lock per directory. Each writer process needs its own storage path to avoid lock conflicts.