swift-codable

Define Swift Codable patterns for JSON and TOON encoding with configurable strategies.

4|1|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/AutisticAF/claude-code-apple-dev-plugin --skill swift-codable-autisticaf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swift-codable
Source: https://github.com/AutisticAF/claude-code-apple-dev-plugin/tree/main/skills/swift-codable
Command: npx skills add https://github.com/AutisticAF/claude-code-apple-dev-plugin --skill swift-codable-autisticaf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Complex Swift serialization tasks are error-prone without standardized Codable patterns; this skill provides a cohesive approach to encoding and decoding data across JSON and TOON formats, including key mapping, date handling, and polymorphism.

Core Features & Use Cases

  • Provides automatic and manual coding strategies for JSONEncoder/JSONDecoder and TOONEncoder/TOONDecoder.
  • Supports custom CodingKeys, date and data strategies, non-conforming floats, and polymorphic types across common app data models.
  • Use cases include simple conformance, nested structures, dynamic keys, and migrations between JSON and TOON.

Quick Start

Try encoding a simple Swift struct with Codable using JSONEncoder and TOONEncoder to observe both formats.

Frequently Asked Questions about swift-codable

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

FAQPage Schema
How do I handle custom key mapping and date decoding strategies in Swift Codable?

Swift Codable handles custom key mapping and date decoding strategies by applying configurable CodingKeys alongside JSONEncoder/JSONDecoder date strategies to reliably serialize data across JSON and TOON formats.

What is the best way to decode polymorphic types in Swift using Codable?

Decoding polymorphic types in Swift using Codable requires manual coding strategies to identify and instantiate correct subclasses, ensuring reliable serialization workflows across nested JSON and TOON data structures.

Can I use Swift Codable to migrate data models between JSON and TOON formats?

Swift Codable supports data model migrations between JSON and TOON formats by applying consistent encoding and decoding patterns with configurable key, date, and data strategies across both format encoders.

How do I manage dynamic keys and non-conforming floats when decoding JSON in Swift?

Managing dynamic keys and non-conforming floats during Swift JSON decoding involves defining custom CodingKeys and applying specific decoder strategies to handle edge-case data robustly.

Does Swift Codable require manual conformance for complex nested structures?

Swift Codable provides automatic conformance for basic nested structures, but complex polymorphic decoding, dynamic keys, and custom data strategies require manual implementation for reliable serialization.

Why does my Swift Codable serialization fail on edge-case data handling?

Swift Codable serialization fails on edge-case data when configurable date, data, or non-conforming float strategies are not applied, requiring manual coding patterns to handle mismatches robustly.