fvtt-performance-safe-updates

Enforce safe update patterns for Foundry VTT multi-client modules.

1|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/ImproperSubset/hh-agentics --skill fvtt-performance-safe-updates
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fvtt-performance-safe-updates
Source: https://github.com/ImproperSubset/hh-agentics/tree/main/fvtt-dev/skills/fvtt-performance-safe-updates
Command: npx skills add https://github.com/ImproperSubset/hh-agentics --skill fvtt-performance-safe-updates

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Foundry VTT module development often suffers from update storms and unnecessary re-renders when multiple clients sync changes across sessions. This skill provides a structured pattern to guard updates, batch changes, and let Foundry handle renders to keep all clients in sync.

Core Features & Use Cases

  • Ownership guards to ensure only authorized users perform updates on shared documents.
  • No-op detection and batched updates to minimize database writes and UI churn.
  • Queueing updates with a dedicated wrapper to prevent race conditions in multi-client environments.
  • Atomic embedded document updates to avoid delete+create flicker when replacing items or abilities.
  • Guard rerenders to refresh only owned or visible sheets without causing spurious redraws.

Quick Start

Use this skill when updating documents in a Foundry VTT module, e.g., update an actor's item or swap an embedded document, and rely on queueUpdate for safe persistence.

Frequently Asked Questions about fvtt-performance-safe-updates

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

FAQPage Schema
How do I prevent multi-client update storms in Foundry VTT?

To prevent multi-client update storms in Foundry VTT, apply safe update patterns using ownership checks, no-op guards, and batched updates via a dedicated queueUpdate wrapper to avoid database write conflicts.

What is the best way to handle embedded document updates without causing UI flicker?

The best way to handle embedded document updates without UI flicker is to perform atomic operations that replace items or abilities directly, preventing the delete and create sequence from triggering spurious redraws.

How do I stop unnecessary sheet re-renders during Foundry VTT module development?

To stop unnecessary sheet re-renders during Foundry VTT module development, guard your rerenders to refresh only owned or visible sheets and let Foundry handle renders to keep all clients in sync.

Why do race conditions happen when updating actors across multiple Foundry clients?

Race conditions happen when updating actors across multiple Foundry clients because synchronous database writes clash during session syncing, requiring queued updates to enforce safe persistence and preserve synchronization.

Do I need ownership checks before updating shared documents in Foundry VTT?

Yes, you need ownership checks before updating shared documents in Foundry VTT to ensure only authorized users perform updates, which prevents unauthorized data modification and reduces unnecessary database writes.

Can I batch updates in Foundry VTT to minimize database writes?

Yes, you can batch updates in Foundry VTT to minimize database writes by detecting no-op changes and queuing updates, ensuring that only necessary data modifications are persisted across the session.