pfw-case-paths

Applies @CasePathable macro to Rust enums for functional pattern matching and zero-cost abstractions, enabling elegant and efficient code.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies working with Swift enums and their associated values, reducing verbose pattern matching and enabling more expressive, generic code.

Core Features & Use Cases

  • Enum Ergonomics: Add key path-like access to enum cases and associated values.
  • Generic Algorithms: Write functions that operate generically over enums.
  • Use Case: When dealing with complex state machines represented by enums, use CasePaths to concisely update or query the current state without extensive switch statements.

Quick Start

Apply the @CasePathable macro to your Swift enums to enable CasePaths functionality.

Frequently Asked Questions about pfw-case-paths

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

FAQPage Schema
How do I access Swift enum associated values without verbose pattern matching?

You can access Swift enum associated values concisely by applying the @CasePathable macro, which enables key path-like syntax to extract and modify values without extensive switch statements.

What are CasePaths in Swift and how do they work with enums?

CasePaths provide key path capabilities for Swift enums, allowing ergonomic embedding and extraction of associated values through expressive syntax to reduce boilerplate pattern matching.

How do I update complex state machines in Swift without writing switch statements?

You can update complex enum-based state machines by using CasePaths to concisely query and modify the current state, bypassing the need for extensive switch statements.

Can I write generic algorithms that operate over Swift enums?

Yes, you can write functions that operate generically over Swift enums by using CasePaths to facilitate expressive access and modification of associated values across different enum types.

Does the CasePaths library support macros for Swift enums?

Yes, the CasePaths library supports macros, allowing you to apply the @CasePathable macro to your Swift enums to enable key path functionality for associated values.