axiom-swift-performance

axiom-swift-performance is a skill for Claude Code, Codex from ComeOnOliver/skillshub. It costs 36 tokens per session (8,345 once invoked), scanned A, original, MIT.

Guidance for making Swift code run faster and use less memory. It explains how value types, reference counting, generics, and collections affect runtime cost.

In plain words
What is it for?
Use it to optimize performance-critical algorithms, tight loops, large collections, framework code, and Swift code identified as a bottleneck during profiling.
Why use it?
It helps address measured slow code, excessive memory allocation, and unnecessary reference-counting work without relying on guesswork or premature small optimizations.

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 optimize performance-critical algorithms, tight loops, large collections, framework code, and Swift code identified as a bottleneck during profiling.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/comeonoliver/skillshub/axiom-swift-performance"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-swift-performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,345 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.00036 $0.08345
Opus 5 $0.00018 $0.04172
Sonnet 5 $0.00007 $0.01669
Haiku 4.5 $0.00004 $0.00834

Measured 7d ago against content hash 1b0ea92ff63f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

axiom-swift-performance 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 7d 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-performance/SKILL.md · 1,238 lines

How it starts

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

Swift Performance Optimization

Purpose

Core Principle: Optimize Swift code by understanding language-level performance characteristics—value semantics, ARC behavior, generic specialization, and memory layout—to write fast, efficient code without premature micro-optimization.

Swift Version: Swift 6.2+ (for InlineArray, Span, @concurrent) Xcode: 16+ Platforms: iOS 18+, macOS 15+

Related Skills:

  • axiom-performance-profiling — Use Instruments to measure (do this first!)
  • axiom-swiftui-performance — SwiftUI-specific optimizations
  • axiom-build-performance — Compilation speed
  • axiom-swift-concurrency — Correctness-focused concurrency patterns

When to Use This Skill

✅ Use this skill when

  • App profiling shows Swift code as the bottleneck (Time Profiler hotspots)
  • Excessive memory allocations or retain/release traffic
  • Implementing performance-critical algorithms or data structures
  • Writing framework or library code with performance requirements
  • Optimizing tight loops or frequently called methods
  • Dealing with large data structures or collections
  • Code review identifying performance anti-patterns

Quick Decision Tree

Performance issue identified?
│
├─ Profiler shows excessive copying?
│  └─ → Part 1: Noncopyable Types
│  └─ → Part 2: Copy-on-Write
│
├─ Retain/release overhead in Time Profiler?
│  └─ → Part 4: ARC Optimization
│
├─ Generic code in hot path?
│  └─ → Part 5: Generics & Specialization
│
├─ Collection operations slow?
│  └─ → Part 7: Collection Performance
│
├─ Async/await overhead visible?
│  └─ → Part 8: Concurrency Performance
│
├─ Struct vs class decision?
│  └─ → Part 3: Value vs Reference
│
└─ Memory layout concerns?
   └─ → Part 9: Memory Layout

The Four Principles of Swift Performance

From WWDC 2024-10217: Swift's low-level performance characteristics come down to four areas. Each maps to a Part in this skill.

Principle What It Costs Skill Coverage
Function Calls Dispatch overhead, optimization barriers Part 5 (Generics), Part 6 (Inlining)
Memory Allocation Stack vs heap, allocation frequency Part 3 (Value vs Reference), Part 7 (Collections)
Memory Layout Cache locality, padding, contiguity Part 9 (Memory Layout), Part 11 (Span)
Value Copying COW triggers, defensive copies, ARC traffic Part 1 (Noncopyable), Part 2 (COW), Part 4 (ARC)

Read the full file on GitHub · 1,238 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. 7d ago First seen · 1,238 lines · 36 tokens per session scan A 1b0ea92ff63f

Subscribe to this mod's changes

axiom-swift-performance is a skill published in the GitHub repository ComeOnOliver/skillshub (63 stars, last pushed 2mo ago), licensed MIT. It adds 36 tokens to every session and 8,345 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.