← ClaudeAtlas

hex-capability-adapterlisted

Use when implementing an `ICan<Verb>` capability against a real external system — the adapter under `infrastructure/<technology>/` wrapping an SDK client, an HTTP gateway or a pure-CPU library, translating the library's own errors into `exception-catalog` classes. Not aggregate CRUD — that is `hex-persistence` or `hex-store-repository`; the protocol is `hex-domain-ports`.
wntic/pyhouse · ★ 3 · Code & Development · score 79
Install: claude install-skill wntic/pyhouse
# Hex — Capability Adapter (infrastructure) Produces one adapter class that adapts a domain `ICan<Verb>` capability protocol to a concrete external system. It is the last place the external library's own exceptions exist: translation happens here, into the classes `exception-catalog` owns. ## When to use vs. neighbours - Aggregate-root CRUD over a relational store → `hex-persistence`, not this skill. - Aggregate-root persistence on a key-value or document store, or an index kept beside it → `hex-store-repository`; an injected SDK client alone does not make something a capability. - The `ICan<Verb>` protocol file this adapter satisfies → `hex-domain-ports`. - The obligations the adapter's settings class must meet → `python-settings`, its name and prefix → `naming`; the HTTP gateway's own is shown here, beside it. - The lifetime and declaration-order rules the adapter's binding follows, and the base composition root it merges into → `hex-wiring`; the binding itself is shown here, beside the adapter. - The catalogue exception classes the SDK's own errors are translated into → `exception-catalog`. - The undo a compensating handler calls on this adapter (`delete` beside `upload`) → an ordinary method that raises on failure, declared on a port by `hex-domain-ports`; the handler-side guard that tolerates its failure is `hex-application`'s (Compensation). - An in-memory test stand-in for this capability (the `Fake<Capability>` flavor) → `hex-test-application-handler`. - Testing th