axiom-swift-modern

axiom-swift-modern is a skill for Claude Code, Codex from ComeOnOliver/skillshub. It costs 41 tokens per session (1,050 once invoked), scanned A, original, MIT.

A guide to writing modern Swift code with current APIs and common language patterns. It identifies older approaches that still work but have clearer or more suitable replacements.

In plain words
What is it for?
Use it when reviewing or generating Swift code, replacing legacy APIs, and checking whether code follows modern Swift conventions.
Why use it?
It helps prevent generated or reviewed code from relying on outdated Swift and Foundation practices.

Skill for Claude CodeCodex

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

Good fit Use it when reviewing or generating Swift code, replacing legacy APIs, and checking whether code follows modern Swift conventions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/comeonoliver/skillshub/axiom-swift-modern
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-swift-modern
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-swift-modern

README.md
[![agentmods](https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-swift-modern/github.svg)](https://agentmods.dev/skills/comeonoliver/skillshub/axiom-swift-modern)
Your own site
<a href="https://agentmods.dev/skills/comeonoliver/skillshub/axiom-swift-modern"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-swift-modern/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-swift-modern

Your own site · 80×15
<a href="https://agentmods.dev/skills/comeonoliver/skillshub/axiom-swift-modern"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-swift-modern.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,050 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.00041 $0.01050
Opus 5 $0.00020 $0.00525
Sonnet 5 $0.00008 $0.00210
Haiku 4.5 $0.00004 $0.00105

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

Security

Grade A, and why

axiom-swift-modern 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-swift-modern/SKILL.md · 69 lines

How it starts

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

Modern Swift Idioms

Purpose

Claude frequently generates outdated Swift patterns from its training data. This skill corrects the most common ones — patterns that compile fine but use legacy APIs when modern equivalents are clearer, more efficient, or more correct.

Philosophy: "Don't repeat what LLMs already know — focus on edge cases, surprises, soft deprecations." (Paul Hudson)

Modern API Replacements

Old Pattern Modern Swift Since Why
Date() Date.now 5.6 Clearer intent
filter { }.count count(where:) 5.0 Single pass, no intermediate allocation
replacingOccurrences(of:with:) replacing(_:with:) 5.7 Swift native, no Foundation bridge
CGFloat Double 5.5 Implicit bridging; exceptions: optionals, inout, ObjC-bridged APIs
Task.sleep(nanoseconds:) Task.sleep(for: .seconds(1)) 5.7 Type-safe Duration API
DateFormatter() .formatted() / FormatStyle 5.5 No instance management, localizable by default
String(format: "%.2f", val) val.formatted(.number.precision(.fractionLength(2))) 5.5 Type-safe, localized
localizedCaseInsensitiveContains() localizedStandardContains() 5.0 Handles diacritics, ligatures, width variants
"\(firstName) \(lastName)" PersonNameComponents with .formatted() 5.5 Respects locale name ordering
"yyyy-MM-dd" with DateFormatter try Date(string, strategy: .iso8601) 5.6 Modern parsing (throws); use "y" not "yyyy" for display
contains() on user input localizedStandardContains() 5.0 Required for correct text search/filtering

Modern Syntax

Old Pattern Modern Swift Since
if let value = value { if let value { 5.7
Explicit return in single-expression Omit return; if/switch are expressions 5.9
Circle() in modifiers .circle (static member lookup) 5.5
import UIKit alongside import SwiftUI Often not needed — SwiftUI re-exports most UIKit/AppKit types. Retain for UIKit-only APIs (UIApplication, etc.) 5.5

Read the full file on GitHub · 69 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 · 69 lines · 41 tokens per session scan A d77237f0df7d

Subscribe to this mod's changes

axiom-swift-modern is a skill published in the GitHub repository ComeOnOliver/skillshub (63 stars, last pushed 2mo ago), licensed MIT. It adds 41 tokens to every session and 1,050 once invoked, about $0.0002 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.