pfw-perception

Back-port Swift Observation API to earlier platforms using Perception.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a way to use the modern Swift Observation framework on older Swift versions and platforms where it is not natively supported, by leveraging the Perception library.

Core Features & Use Cases

  • Back-porting @Observable: Replaces @Observable with @Perceptible and @ObservationIgnored with @PerceptionIgnored.
  • SwiftUI Integration: Guides users on how to integrate Perception with SwiftUI views using WithPerceptionTracking and @Perception.Bindable.
  • Use Case: Developers working on projects that cannot yet upgrade to the latest Swift versions can use this Skill to adopt the benefits of the Observation API without a full platform upgrade.

Quick Start

Add the swift-perception package dependency from 2.0.0 and import Perception as needed.

Frequently Asked Questions about pfw-perception

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

FAQPage Schema
How do I use Swift Observation on older platforms that do not support it natively?

You can back-port the Swift Observation API to older platforms by using the Perception library, which provides drop-in replacements like `@Perceptible` for `@Observable` to achieve native-like observation tracking.

How do I integrate the Perception library with SwiftUI views?

To integrate Perception with SwiftUI views, you wrap your view body in `WithPerceptionTracking` and use `@Perception.Bindable` to derive perceptible bindings, ensuring your UI reacts to state changes on older platforms.

What is the replacement for @ObservationIgnored when back-porting to earlier Swift versions?

When back-porting to earlier Swift versions, the replacement for `@ObservationIgnored` is `@PerceptionIgnored`, which prevents specific properties from triggering observation updates in your models.

Can I use the modern Swift Observation framework without upgrading my project to the latest Swift version?

Yes, you can adopt the benefits of the modern Observation framework without a full platform upgrade by adding the swift-perception package dependency from version 2.0.0 and importing Perception.

Does back-porting Swift Observation affect how withObservationTracking functions?

Back-porting Swift Observation replaces `withObservationTracking` with its Perception equivalent, allowing you to manually track property access and trigger updates on platforms lacking native Observation support.

What are the limitations of using Perception to back-port Observation APIs?

The Perception library requires explicit wrapping of SwiftUI views in `WithPerceptionTracking` to detect changes, adding a slight syntactic overhead compared to the native Swift Observation framework which handles this tracking automatically.