CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

statelyai/state-management

Model, review, and refactor application state so source state stays minimal, derived state is computed instead of synchronized, impossible states are not representable, and each piece of state lives in the right place. Use this whenever the user mentions state management, reducers, stores, Redux, Zustand, React state, Vue state, Pinia, selectors, derived state, duplicated state, boolean flags, invalid states, async status, useEffect soup, forms, wizards, filters, URL state, server state, or confusing UI logic, even if they do not explicitly ask for a "state model."

Quality

87%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

vue-pinia.mdreferences/

Vue and Pinia

Use this reference for Vue state management with local reactive state, composables, or Pinia stores.

Strong defaults

  • Keep authoritative state in reactive state or store state.
  • Put derived values in computed(...) or Pinia getters.
  • Centralize writes in methods or actions when transitions matter.
  • Use one explicit status for mutually exclusive modes.

What belongs in state vs computed

Prefer state for:

  • user input
  • current IDs and durable facts
  • explicit workflow status
  • authoritative local settings

Prefer computed or getters for:

  • filtered and sorted collections
  • isEmpty, canSubmit, hasErrors, and similar booleans
  • totals and summaries
  • selected entity lookup from IDs

Do not keep writing computed values back into state.

Pinia guidance

Pinia getters are the natural home for derived state. Pinia actions are the place for transitions and side effects that belong to the store boundary.

Be careful with stores that:

  • act like global dumping grounds
  • expose raw state mutations from many places
  • duplicate state that could be recomputed

Common Vue and Pinia smells

  • watchers that synchronize derivable state
  • multiple request booleans instead of one status
  • storing whole selected objects instead of IDs
  • mixing server cache concerns and UI-local concerns in one store
  • using a store for state that belongs inside a component or composable

LICENSE

README.md

SKILL.md

tile.json