axiom-codable

axiom-codable is a skill for Claude Code, Codex from ComeOnOliver/skillshub. It costs 59 tokens per session (5,535 once invoked), scanned A, original, MIT.

A reference for Swift's Codable system, which converts Swift values to and from formats such as JSON. It covers custom field names, dates, enums, nested data, and decoding errors.

In plain words
What is it for?
Use it to encode requests, decode JSON responses, customise serialization, or resolve Encodable and Decodable errors.
Why use it?
It helps explain and fix errors when the data returned by an API does not match the Swift types in your app.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to encode requests, decode JSON responses, customise serialization, or resolve Encodable and Decodable errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/comeonoliver/skillshub/axiom-codable
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ComeOnOliver/skillshub --skill axiom-codable
Clone the repo
git clone --depth 1 https://github.com/ComeOnOliver/skillshub

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for axiom-codable

README.md
[![agentmods](https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-codable/github.svg)](https://agentmods.dev/skills/comeonoliver/skillshub/axiom-codable)
Your own site
<a href="https://agentmods.dev/skills/comeonoliver/skillshub/axiom-codable"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-codable/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for axiom-codable

Your own site · 80×15
<a href="https://agentmods.dev/skills/comeonoliver/skillshub/axiom-codable"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-codable.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,535 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.05535
Opus 5 $0.00030 $0.02767
Sonnet 5 $0.00012 $0.01107
Haiku 4.5 $0.00006 $0.00553

Measured 9d ago against content hash 585c52a2358f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

axiom-codable scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/CharlesWiltgen/Axiom/axiom-codable/SKILL.md · 834 lines

How it starts

The opening of the file, as written. The whole thing — 834 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Swift Codable Patterns

Comprehensive guide to Codable protocol conformance for JSON and PropertyList encoding/decoding in Swift 6.x.

Quick Reference

Decision Tree: When to Use Each Approach

Has your type...
├─ All properties Codable? → Automatic synthesis (just add `: Codable`)
├─ Property names differ from JSON keys? → CodingKeys customization
├─ Needs to exclude properties? → CodingKeys customization
├─ Enum with associated values? → Check enum synthesis patterns
├─ Needs structural transformation? → Manual implementation + bridge types
├─ Needs data not in JSON? → DecodableWithConfiguration (iOS 15+)
└─ Complex nested JSON? → Manual implementation + nested containers

Common Triggers

Error Solution
"Type 'X' does not conform to protocol 'Decodable'" Ensure all stored properties are Codable
"No value associated with key X" Check CodingKeys match JSON keys
"Expected to decode X but found Y instead" Type mismatch; check JSON structure or use bridge type
"keyNotFound" JSON missing expected key; make property optional or provide default
"Date parsing failed" Configure dateDecodingStrategy on decoder

Part 1: Automatic Synthesis

Swift automatically synthesizes Codable conformance when all stored properties are Codable.

Struct Synthesis

// ✅ Automatic synthesis
struct User: Codable {
    let id: UUID              // Codable
    var name: String          // Codable
    var membershipPoints: Int // Codable
}

// JSON: {"id":"...", "name":"Alice", "membershipPoints":100}

Requirements:

  • All stored properties must conform to Codable
  • Properties use standard Swift types or other Codable types
  • No custom initialization logic needed

Enum Synthesis Patterns

Pattern 1: Raw Value Enums
enum Direction: String, Codable {
    case north, south, east, west
}

// Encodes as: "north"

The raw value itself becomes the JSON representation.

Pattern 2: Enums Without Associated Values

Read the full file on GitHub · 834 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 834 lines · 59 tokens per session scan A 585c52a2358f

Subscribe to this mod's changes

axiom-codable is a skill published in the GitHub repository ComeOnOliver/skillshub (63 stars, last pushed 2mo ago), licensed MIT. It adds 59 tokens to every session and 5,535 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.