# Craft Registry

> Crafting Registries. Multi-provider handler dispatch.

- Skill: `attac-t/craft-registry` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add attac-t/craft-registry`
- Raw SKILL.md: https://api.skillmd.com/api/skills/attac-t/craft-registry/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: attac-t (https://skillmd.com/u/attac-t)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/attac-t/craft-registry

---


# Skill: Craft Registry

> "A registry knows who handles what. Nothing more."

## The Standard

1. **Interface Contract**: All handlers implement same interface.
2. **Registration**: Handlers register by key (provider name, type, etc.).
3. **Resolution**: Registry returns correct handler for key.
4. **Fail Loud**: Throw on unknown key. No silent nulls.

## The Anti-Patterns

| ❌ Don't              | ✅ Do                       | Why                        |
|----------------------|----------------------------|----------------------------|
| Switch statements    | Registry lookup            | Open for extension         |
| Return null          | Throw on missing           | Fail fast, debug easy      |
| Hard-coded handlers  | Register via config/tagged | Configurable, testable     |
| God class            | Handlers do the work       | Registry only dispatches   |

## Real-World Examples

See [examples/](examples/).

