effect-atom-state

effect-atom-state is a skill for Claude Code, Codex from mpsuesser/pi-effect-harness. It costs 15 tokens per session (4,179 once invoked), scanned A, original, MIT.

A way to manage changing application data in React using Effect Atom, a library of shared reactive state containers. React components can read the same atom and update when its value changes.

In plain words
What is it for?
Use it for shared counters, settings, form data, and other application state in React projects built with Effect.
Why use it?
It avoids manually synchronising shared state between components. It also handles whether state should reset when no component is using it or persist longer.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for shared counters, settings, form data, and other application state in React projects built with Effect.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mpsuesser/pi-effect-harness/effect-atom-state
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mpsuesser/pi-effect-harness --skill effect-atom-state
Clone the repo
git clone --depth 1 https://github.com/mpsuesser/pi-effect-harness

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for effect-atom-state

README.md
[![agentmods](https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-atom-state.svg)](https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-atom-state)
Your own site
<a href="https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-atom-state"><img src="https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-atom-state.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,179 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.04179
Opus 5 $0.00008 $0.02090
Sonnet 5 $0.00003 $0.00836
Haiku 4.5 $0.00002 $0.00418

Measured 8d ago against content hash cf4b22e60841, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

effect-atom-state scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

harnesses/effect/skills/effect-atom-state/SKILL.md · 621 lines

How it starts

The opening of the file, as written. The whole thing — 621 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Effect Atom State Management

Effect Atom is a reactive state management library for Effect that seamlessly integrates with React.

Effect Source Reference

The Effect v4 source is available at ~/.cache/effect-v4/. Browse and read files there directly to look up APIs, types, and implementations.

Reference this for:

  • Atom reactivity: packages/effect/src/unstable/reactivity/
  • AsyncResult source: packages/effect/src/unstable/reactivity/AsyncResult.ts
  • Effect source: packages/effect/src/

Core Concepts

Atoms as References

Atoms work by reference - they are stable containers for reactive state:

import * as Atom from 'effect/unstable/reactivity/Atom';

// Atoms are created once and referenced throughout the app
export const counterAtom = Atom.make(0);

// Multiple components can reference the same atom
// All update when the atom value changes

Automatic Cleanup

Atoms automatically reset when no subscribers remain (unless marked with keepAlive):

// Resets when last subscriber unmounts
export const temporaryState = Atom.make(initialValue);

// Persists across component lifecycles
export const persistentState = Atom.make(initialValue).pipe(Atom.keepAlive);

Lazy Evaluation

Atom values are computed on-demand when subscribers access them.

Pattern: Basic Atoms

import * as Atom from 'effect/unstable/reactivity/Atom';

// Simple atom
export const count = Atom.make(0);

// Atom with object state
export interface CartState {
	readonly items: ReadonlyArray<Item>;
	readonly total: number;
}

export const cart = Atom.make<CartState>({
	items: [],
	total: 0
});

Pattern: Derived Atoms

Use Atom.map or computed atoms with the get parameter:

// Derived via map
export const itemCount = Atom.map(cart, (c) => c.items.length);
export const isEmpty = Atom.map(cart, (c) => c.items.length === 0);

// Computed atom accessing other atoms
export const cartSummary = Atom.make((get) => {
	const cartData = get(cart);
	const count = get(itemCount);

	return {
		itemCount: count,
		total: cartData.total,
		isEmpty: count === 0
	};
});

Read the full file on GitHub · 621 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 621 lines · 15 tokens per session scan A cf4b22e60841

Subscribe to this mod's changes

effect-atom-state is a skill published in the GitHub repository mpsuesser/pi-effect-harness (24 stars, last pushed 2mo ago), licensed MIT. It adds 15 tokens to every session and 4,179 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

algolia-search-v2

Algolia Search Integration workflow skill. Use this skill when the user needs Expert patterns for Algolia search implementation, indexing and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.

diegosouzapw/awesome-omni-skills · 50 tokens

composition-patterns

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

PracticalSwan/agent-skills · 55 tokens

typescript-style

Validate TypeScript/React code against style and architectural conventions.

peteski22/agent-pragma · 14 tokens

effect-best-practices

Enforces Effect-TS patterns for services, errors, layers, and atoms. Use when writing code with Effect.Service, Schema.TaggedError, Layer composition, or effect-atom React components.

betalyra/effect-skills · 45 tokens

dhpk-react-18-notes

Use when working on React 18 guidance for ^18 projects, root setup, concurrent rendering, StrictMode, or 17→18/18→19 upgrades. Not for ordinary application logic. Remains a separate React 18 route; pair with dhpk-react-19-notes for 18→19 changes and dhpk-nextjs-15-5-notes or dhpk-nextjs-16-notes for Next integration.…

hmj1026/dhpk · 109 tokens

dhpk-react-19-notes

Use when working on React 19 guidance for Actions, new hooks, refs, providers, Server Components, or 18→19 upgrades. Not for ordinary application logic. Remains a separate React 19 route; pair with dhpk-react-18-notes for the 18 baseline and dhpk-nextjs-16-notes for Next integration. Output: migration traps and…

hmj1026/dhpk · 90 tokens