add-global

Derive reactive global variables from source atoms with subscription APIs.

3|1|Updated Dec 11, 2025
One-click install
npx skills add https://github.com/Ariedam64/Gemini --skill add-global
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: add-global
Source: https://github.com/Ariedam64/Gemini/tree/main/.claude/skills/add-global
Command: npx skills add https://github.com/Ariedam64/Gemini --skill add-global

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Derive and expose reactive global state from existing atoms, with subscription support for live UI updates.

Core Features & Use Cases

  • Reactive globals that automatically derive from source atoms
  • Public API to get, subscribe, and subscribeImmediate, with lazy singleton semantics
  • Lightweight integration for component codebases to share derived state

Quick Start

Use get<GlobalName>() to obtain the reactive global and subscribe to changes.

Frequently Asked Questions about add-global

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

FAQPage Schema
How do I create a reactive global variable from existing atoms in TypeScript?▼

A reactive global variable is created by using a derive function that watches source atomKeys, allowing your application state to automatically update whenever those atoms change.

What is the best way to subscribe UI components to derived global state?▼

The best way to subscribe to derived global state is by using the public subscribe or subscribeImmediate APIs, which enable UI components to receive live updates whenever the underlying atom-backed global changes.

How does a lazy singleton getter work for global state management?▼

A lazy singleton getter for global state management instantiates the derived global variable only when it is first requested, avoiding unnecessary computations until the state is actually needed by subscribers.

Can I integrate atom-backed globals into an existing React component codebase?▼

Yes, you can integrate atom-backed globals into an existing component codebase by calling the getter within your components and using the subscription APIs to ensure live state updates across your app.

Why do I need to derive global state from multiple source atoms?▼

Deriving global state from multiple source atoms is needed to maintain a cohesive, unified state representation that automatically reflects changes across different parts of your application without manual synchronization.