hairyf/skills

valtio-define

Comprehensive skills for working with valtio-define

First seen Jan 29, 2026

Installation

$ npx skills add hairyf/skills --skill valtio-define

Also in this package

Other skills from hairyf/skills · top by installs.

npx skills add hairyf/skills

Browse all from hairyf/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 25
License LICENSE.md
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version2025.01.29
More metadata
author
Hairyf
version
2025.01.29
source
Internal Documentation

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,228 B
  • docs SUMMARY.md 72 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 714 installs

SKILL.md

Based on valtio-define v1.0.1. A Valtio-based state management library with Pinia-like API for React applications.

Overview

valtio-define provides a factory function for creating reactive stores with state, actions, and getters. Built on top of Valtio, it offers a familiar API similar to Pinia with full TypeScript support.

Core References

Topic Description Reference
defineStore Core API for creating reactive stores [core-define-store](references/core-define-store.md)
useStore React hook for accessing store state [core-use-store](references/core-use-store.md)
Types TypeScript types and interfaces [core-types](references/core-types.md)

Advanced Features

Topic Description Reference
Subscriptions Subscribe to state changes [advanced-subscribe](references/advanced-subscribe.md)
Patch Update state with patch operations [advanced-patch](references/advanced-patch.md)
Signal JSX component for inline reactive values [advanced-signal](references/advanced-signal.md)
Store to State Convert store to useState-like hooks [advanced-store-to-state](references/advanced-store-to-state.md)

Features

Topic Description Reference
Plugin System Extend stores with plugins [feature-plugin-system](references/feature-plugin-system.md)
Persistent Plugin Persist state to storage [feature-persistent-plugin](references/feature-persistent-plugin.md)

Quick Start

import { defineStore, useStore } from 'valtio-define'

const store = defineStore({
  state: () => ({ count: 0 }),
  actions: {
    increment() { this.count++ },
  },
  getters: {
    doubled() { return this.count * 2 },
  },
})

function Counter() {
  const state = useStore(store)
  return (
    <div>
      <div>Count: {state.count}</div>
      <div>Doubled: {state.doubled}</div>
      <button onClick={store.increment}>Increment</button>
    </div>
  )
}