スキル一覧に戻る
mgreenly

patternsiterator

by mgreenly

An AI Coding Agent

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

SKILL.md


name: patterns/iterator description: Iterator Pattern pattern for C development

Iterator Pattern

Provide sequential access to collection elements without exposing underlying structure. In C, typically a struct with next() function or index-based traversal.

ikigai Application

Scrollback traversal: Iterate visible lines for rendering without exposing ring buffer internals.

Message iteration: Walk session messages for LLM context building.

Implementation options:

// Index-based (simple)
for (size_t i = 0; i < scrollback->count; i++) { ... }

// Iterator struct (encapsulated)
ik_iter_t *iter = ik_scrollback_iter(scrollback);
while (ik_iter_next(iter, &line)) { ... }

Current approach: Index-based iteration is sufficient. Iterator struct adds value when traversal logic is complex or needs to hide internals.

スコア

総合スコア

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

レビュー

💬

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