pfw-sharing

Share and persist Swift values across modules with property wrappers.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Mp2025-cmd/ScrollKitty --skill pfw-sharing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pfw-sharing
Source: https://github.com/Mp2025-cmd/ScrollKitty/tree/main/.claude/skills/pfw-Sharing
Command: npx skills add https://github.com/Mp2025-cmd/ScrollKitty --skill pfw-sharing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies sharing and persisting values across different parts of an application, ensuring data consistency and ease of access.

Core Features & Use Cases

  • Cross-component value sharing: Seamlessly share state between different modules or views.
  • Persistence: Persist values to UserDefaults or the file system.
  • Type-safe defaults: Define default values for shared properties in a type-safe manner.
  • Use Case: Imagine you need to store a user's preference for dark mode that should be accessible from anywhere in your app and persist even after the app closes. This Skill allows you to define @Shared(.appStorage("isDarkModeEnabled")) var isDarkModeEnabled = false and use it everywhere.

Quick Start

Use the pfw-sharing skill to persist a boolean value named 'isDarkModeEnabled' to user defaults, defaulting to false.

Frequently Asked Questions about pfw-sharing

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

FAQPage Schema
How do I share app state across different Swift views?

Persist app values in Swift using a declarative property wrapper that supports both `UserDefaults` and file system storage. This Skill enables type-safe defaults and integrates with Apple's Observation framework for reactive updates across your application.

How do I persist app values to UserDefaults with a type-safe default?

Persist a boolean value to `UserDefaults` with a type-safe default by declaring a shared property using the `.appStorage` strategy. You can define the default value directly in the declaration, ensuring type safety and automatic persistence across app sessions.

Can I use Swift property wrappers for file system storage?

Yes, you can use Swift property wrappers for file system storage. This Skill supports multiple persistence strategies, allowing you to choose between `UserDefaults` for lightweight preferences and the file system for more complex shared data structures.

Does this state management approach work with Apple's Observation framework?

Yes, this state management approach integrates directly with Apple's Observation framework. It enables reactive updates, automatically reflecting changes to shared parent values across all observing modules and views in your application.

What is the best way to transform shared parent values into shared children in Swift?

The best way to transform shared parent values into shared children in Swift is by using a declarative property wrapper designed for state management. This allows you to maintain persistent shared state while deriving child values reactively from the parent.