Claude-skill-registry patterns/adapter
Adapter (Wrapper) Pattern pattern for C development
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/adapter" ~/.claude/skills/majiayu000-claude-skill-registry-patterns-adapter && rm -rf "$T"
manifest:
skills/data/adapter/SKILL.mdsource content
Adapter (Wrapper) Pattern
Convert interface of one module to interface expected by another. Enables integration of incompatible interfaces without modifying either.
ikigai Application
wrapper.h: Adapts system calls to mockable interface:
wrapsposix_read_()read()
wraps libcurlcurl_easy_perform_()
wraps yyjsonyyjson_read_file_()
Purpose: Real implementations in production, mock implementations in tests via weak symbol linking.
LLM providers: Adapt different API formats (OpenAI, Anthropic) to unified internal message format.
Benefit: External dependencies isolated behind stable internal interface. Swap implementations without changing callers.
Testing: Inject failures, control responses, verify calls.