pattern-iterator
CommunityTraverse collections safely with custom iterators
Authorjohnnystefan
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill keeps traversal logic outside business aggregates by teaching how to sequentially access collection elements without exposing their internal representations, preventing clients from corrupting sensitive domain structures.
Core Features & Use Cases
- Iterator and Collection Interfaces: Define the shared
next()/hasNext()contract plus a method for creating iterators, establishing a uniform traversal API. - Concrete Iterator Implementation: Encapsulate traversal state for specific domain collections, enabling deterministic pagination, filtering, or lazy loading behaviors.
- Use Case: When a club aggregate exposes a roster, apply this pattern to iterate through player entities safely for reporting or batch invitations.
Quick Start
Ask the skill to generate an iterator implementation for your domain collection that keeps the aggregate root’s internal list private while exposing ordered access.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: pattern-iterator Download link: https://github.com/johnnystefan/test-saas-business/archive/main.zip#pattern-iterator Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.