registry-autobase-patterns

Reference Autobase, HyperDB, and multi-writer patterns for the QVAC registry server.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building and debugging multi-writer distributed databases on the Holepunch stack involves many non-obvious pitfalls—Corestore locking, Protomux connection ordering, Hyperbee extension incompatibility with Autobase, and writer/indexer management. This Skill consolidates the QVAC registry server's architecture patterns and hard-won implementation knowledge into one reference. ## Core Features & Use Cases - Multi-Writer Architecture Reference: Covers Autobase configuration, apply functions, Hyperdispatch routers, and 3-writer deployment with disaster recovery procedures. - HyperDB Schema & Query Patterns: Documents schema definition, collections, secondary indexes, transactions, and query patterns with code examples. - Registry-Specific Gotchas: Captures codebase-specific knowledge like named keypairs ('rpc-key', 'writer-key'), RPC-before-replication ordering, and blind peering setup. - Use Case: When debugging a CHANNEL_CLOSED error on peer connections, consult the implementation knowledge base to discover that ProtomuxRPC must be registered before calling store.replicate(conn). ## Quick Start Ask the AI to explain how to add a new writer to the QVAC registry's Autobase multi-writer setup using the registry-autobase-patterns reference.

Frequently Asked Questions about registry-autobase-patterns

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

FAQPage Schema
How do I set up a multi-writer Autobase database with HyperDB?

Create an Autobase instance with open, apply, and close callbacks where open returns a HyperDB view with extension set to false. Define operations with Hyperdispatch, route them through a Router in the apply function, and bootstrap additional writers using the autobase key.

How do I add writers to an Autobase instance?

Call base.addWriter only from within the apply function by appending an add-writer operation encoded with Hyperdispatch. Wait for the new writer's is-indexer event before it can participate in consensus and accept writes.

Why does Protomux RPC fail with CHANNEL_CLOSED on new connections?

This happens when store.replicate(conn) runs before the ProtomuxRPC handler is registered, causing the remote's session message to arrive before the protocol handler exists. Always create the ProtomuxRPC instance first, then call store.replicate(conn).

Can HyperDB use the Hyperbee extension with Autobase?

No, Autobase is incompatible with the Hyperbee extension. Initialize the view with extension set to false and autoUpdate set to true, otherwise the multi-writer linearization will not work correctly.

What is the difference between blind pairing and blind peering?

Blind pairing uses invite codes to add new writers to an Autobase, while blind peering synchronizes read-only mirrors without write access. The QVAC registry server uses blind peering for mirror synchronization, not blind pairing.

Why can't I back up a Corestore directory by copying files?

Copying a live Corestore corrupts the underlying hypercores because RocksDB holds an exclusive lock and data may be mid-write. Use blind peers or read-only replicas that replicate the view over Hyperswarm as the safe backup strategy.