Back to list
mgreenly

patternsstrategy

by mgreenly

An AI Coding Agent

1🍴 0📅 Jan 24, 2026

SKILL.md


name: patterns/strategy description: Strategy Pattern pattern for C development

Strategy Pattern

Define a family of algorithms as interchangeable function pointers. Clients select which algorithm to use at runtime without changing calling code.

ikigai Application

LLM Provider abstraction: Each provider (OpenAI, Anthropic, Google) implements same interface:

typedef struct {
    res_t (*send)(void *ctx, ik_message_t **msgs, size_t count);
    res_t (*stream)(void *ctx, ik_message_t **msgs, chunk_cb cb);
} ik_llm_provider_t;

Selection: Config determines which provider vtable is used. REPL calls through interface, unaware of provider.

Testing: Inject mock provider that returns canned responses.

Future: Tool execution strategies, different database backends.

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon