Agent skill
patterns/composite
Composite Pattern pattern for C development
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/patternscomposite
SKILL.md
Composite Pattern
Compose objects into tree structures. Individual objects and compositions treated uniformly through common interface.
ikigai Application
Layer system: Layers (scrollback, separator, input, spinner) compose into layer stack. Each implements same render interface:
typedef struct {
void (*render)(void *layer, ik_render_ctx_t *render);
void (*resize)(void *layer, int width, int height);
} ik_layer_vtable_t;
Rendering: REPL iterates layers, calls render on each. Doesn't care if layer is simple or composite.
Future uses:
- Nested UI components
- Tool result trees
- Message threading/nesting
Benefit: Add new layer types without changing render loop.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?