feature-state

Centralize shared state in a feature state service using signals.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/Zoppy-crm/.github --skill feature-state
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: feature-state
Source: https://github.com/Zoppy-crm/.github/tree/main/skills/frontend/feature-state
Command: npx skills add https://github.com/Zoppy-crm/.github --skill feature-state

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prop drilling in component trees forces passing data through intermediate components; centralize state using a dedicated feature-state service injected where needed to reduce coupling and boilerplate.

Core Features & Use Cases

  • Global or feature-scoped state services providing signals for read/write without prop threading.
  • Avoid prop drilling by injecting the state service into components, enabling direct access to shared data.
  • Use cases include sibling components sharing data or feature components isolating state lifecycle when destroyed.

Quick Start

Inject the feature state service into components and use its signals to read and update state.

Frequently Asked Questions about feature-state

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

FAQPage Schema
How do I eliminate prop drilling in Angular component trees?

Eliminate prop drilling by centralizing shared data in a feature state service and injecting it directly into components. This replaces threading inputs through intermediate layers, allowing siblings and deeply nested components to access shared state directly.

How do I share state across sibling components using signals?

Share state across sibling components using signals by providing a scoped state service at the root or feature level. Inject this service into the sibling components to read and update the signal values directly without passing data through parent inputs.

When should I use a feature-scoped state service instead of passing component inputs?

Use a feature-scoped state service instead of component inputs when siblings or deeply nested components need the same data. It isolates state lifecycle, ensuring proper cleanup when the feature container is destroyed, and reduces intermediate component coupling.

How do I manage state service lifecycle for feature components in Angular?

Manage state service lifecycle by configuring providers in the container component to ensure proper scoping. This setup restricts the service instance to the feature boundary, automatically cleaning up the shared state when the container component is destroyed.

What is the best way to handle component communication without prop threading?

The best way to handle component communication without prop threading is injecting a shared state service into the components. This approach uses signals for direct state reads and writes, reducing boilerplate and decoupling intermediate components from data they do not need.