rimitive-behavior

Compose portable Rimitive state logic with injectable services and signals.

Updated Jul 18, 2025
One-click install
npx skills add https://github.com/hejhi/rimitive --skill rimitive-behavior
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rimitive-behavior
Source: https://github.com/hejhi/rimitive/tree/main/plugins/rimitive-behavior/skills
Command: npx skills add https://github.com/hejhi/rimitive --skill rimitive-behavior

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers need portable, reusable state logic that can be shared across components, apps, and contexts without tying to any UI framework.

Core Features & Use Cases

  • Portable pattern for encapsulating reactive logic using Rimitive primitives (signal, computed, effect) with a service-injected factory.
  • Composable across contexts (testing/mocks, SSR, multi-app reuse) and across patterns like disclosure, dropdown, and modals.
  • React-friendly integration via dedicated adapters, enabling clean separation between state logic and UI.

Quick Start

Import primitives from your service and return a ready-to-use API for components to consume.

Frequently Asked Questions about rimitive-behavior

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create reusable state logic for signals that works across different apps?

Reusable state logic for signals is created by composing behaviors with injectable services, returning an API of signals, computeds, and actions. This pattern enables sharing logic across apps, tests, and UI integrations without tying to a specific framework.

What is a headless behavior pattern for state management?

A headless behavior pattern encapsulates reactive logic using primitives like signal, computed, and effect within a service-injected factory. It separates state logic from UI, allowing components to consume the returned API directly.

Can I use these reactive behaviors in SSR and client components?

Yes, reactive behaviors support reuse in both SSR and client components. The portable pattern uses injectable services to ensure state logic operates correctly across different rendering contexts.

How do I test state management logic that relies on signals?

Testing signal-based state logic is handled by injecting mock services into the behavior factory. This allows you to isolate and test the returned signals, computeds, and actions without requiring a full UI setup.

Do I need a specific service to build Rimitive behaviors?

Yes, building Rimitive behaviors requires a SignalsSvc-like service. This injectable service provides the necessary primitives to construct the API of signals, computeds, and actions.

Can I compose multiple behaviors like dropdowns and modals together?

Yes, behaviors support optional composition with other behaviors. This allows developers to combine patterns like disclosure, dropdown, and modals into a single reusable API.