スキル一覧に戻る
mgreenly

patternsfactory

by mgreenly

An AI Coding Agent

1🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: patterns/factory description: Factory Pattern pattern for C development

Factory Pattern

Function that encapsulates object creation, returning an allocated and initialized struct. Centralizes construction logic and hides allocation details from callers.

ikigai Application

Current usage:

  • ik_scrollback_create() - creates scrollback buffer
  • ik_mark_create() - creates checkpoint marks
  • ik_input_parser_create() - creates input parser

Convention: Use *_create() for heap allocation (caller owns), *_init() for initializing pre-allocated memory.

With ik_env_t: Factories should receive ik_env_t *env as first parameter for access to logger, config, and clock during construction.

Testing: Factories enable injecting dependencies at creation time rather than reaching for globals.

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

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

レビュー

💬

レビュー機能は近日公開予定です