Agent skill · Data & Analytics

swift-codable

Implement Swift Codable models for JSON and property-list encoding and decoding with JSONDecoder, JSONEncoder, CodingKeys, and custom init(from:) or encode(to:). Use when parsing API responses, remapping keys, flattening nested JSON, handling date or data decoding strategies, decoding heterogeneous arrays, or integrating Codable with URLSession, SwiftData, or UserDefaults.

Derek Pearson935★ · +23/wk · 1 repos on radarProfile →
claude-codecodexcursorNOASSERTION
Install
npx skills add dpearson2699/swift-ios-skills --skill swift-codable --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 13 KB
Bundled scripts: none
Path: skills/swift-codable/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 963 · +28 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Swift Codable Encode and decode Swift types using `Codable` (`Encodable & Decodable`) with `JSONEncoder`, `JSONDecoder`, and related APIs. Targets Swift 6.3 / iOS 26+. ## Contents - [Decode and Verify Workflow](#decode-and-verify-workflow) - [Basic Conformance](#basic-conformance) - [Custom CodingKeys](#custom-codingkeys) - [Custom Decoding and Encoding](#custom-decoding-and-encoding) - [Nested and Flattened Containers](#nested-and-flattened-containers) - [Heterogeneous Arrays](#heterogeneous-arrays) - [Date Decoding Strategies](#date-decoding-strategies) - [Data and Key Strategies](#data-and-key-strategies) - [Lossy Array Decoding](#lossy-array-decoding) - [Single Value Containers](#single-value-containers) - [Default Values for Missing Keys](#default-values-for-missing-keys) - [Encoder and Decoder Configuration](#encoder-and-decoder-configuration) - [Codable with URLSession](#codable-with-urlsession) - [Codable with SwiftData](#codable-with-swiftdata) - [Codable with UserDefaults](#codable-with-userdefaults) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Decode and Verify Workflow 1. Decode representative success, mi

What's inside
Steps it walks through
  1. Contents
  2. Decode and Verify Workflow
  3. Basic Conformance
  4. Custom CodingKeys
  5. Custom Decoding and Encoding
  6. Nested and Flattened Containers
  7. Heterogeneous Arrays
  8. Date Decoding Strategies
  9. Data and Key Strategies
  10. Lossy Array Decoding
  11. Single Value Containers
  12. Default Values for Missing Keys
  13. Encoder and Decoder Configuration
  14. Codable with URLSession
Ships with 2 files
  • evals/evals.json
  • references/codable-advanced-patterns.md
More from swift-ios-skills
All skills →
About this skill
What does the swift-codable skill do?

Implement Swift Codable models for JSON and property-list encoding and decoding with JSONDecoder, JSONEncoder, CodingKeys, and custom init(from:) or encode(to:). Use when parsing API responses, remapping keys, flattening nested JSON, handling date or data decoding strategies, decoding heterogeneous arrays, or integrating Codable with URLSession, SwiftData, or UserDefaults.

How do I install it?

Run `npx skills add dpearson2699/swift-ios-skills --skill swift-codable --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From dpearson2699/swift-ios-skills, a repository with 963 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going