swift

swift is a skill for Claude Code, Codex from notque/vexjoy-agent. It costs 22 tokens per session (921 once invoked), scanned A, original, MIT.

Guidance for developing Swift software with async/await, actors, task groups, and structured concurrency. It also covers XCTest and Swift Testing, which are tools for checking that code works correctly.

In plain words
What is it for?
Use it to build Swift applications with concurrent tasks, manage cancellation and isolation, and write unit or UI tests.
Why use it?
It helps developers handle concurrent work safely and write tests for asynchronous code.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/notque/vexjoy-agent/swift
Any agent
npx skills add notque/vexjoy-agent --skill swift
Clone the repo
git clone --depth 1 https://github.com/notque/vexjoy-agent

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 swift

README.md
[![agentmods](https://agentmods.dev/badge/skills/notque/vexjoy-agent/swift.svg)](https://agentmods.dev/skills/notque/vexjoy-agent/swift)
Your own site
<a href="https://agentmods.dev/skills/notque/vexjoy-agent/swift"><img src="https://agentmods.dev/badge/skills/notque/vexjoy-agent/swift.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 921 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00022 $0.00921
Opus 5 $0.00011 $0.00461
Sonnet 5 $0.00004 $0.00184
Haiku 4.5 $0.00002 $0.00092

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

Security

Grade A, and why

swift 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 2d 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/engineering/swift/SKILL.md · 108 lines

How it starts

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

Swift Skill

Swift concurrency and testing: async/await, Actors, TaskGroups, Sendable, structured concurrency, XCTest, Swift Testing framework, and async test patterns.

Reference Loading Table

Signal Reference Size
async/await, Task, Sendable references/fundamentals.md ~20 lines
Actor, @MainActor, nonisolated references/actor-isolation.md ~20 lines
TaskGroup, AsyncSequence, AsyncStream, cancellation references/task-patterns.md ~20 lines
Failure modes, common mistakes references/preferred-patterns.md ~20 lines
concurrency overview, structured concurrency patterns references/swift-concurrency.md ~30 lines
XCTest, Swift Testing, test doubles, async tests, UI tests references/swift-testing.md ~250 lines

Loading rule. Read the references whose signals match the task before responding.


Core Rules (Always Apply)

Concurrency

  • Prefer structured concurrency -- use TaskGroup over loose Task { } whenever possible; structured tasks propagate cancellation and errors automatically.
  • Mark types Sendable -- enable strict concurrency checking (-strict-concurrency=complete) and resolve all warnings before they become errors in Swift 6.
  • Use actors for shared mutable state -- avoid manual locks; actors provide compiler-verified safety.
  • Cancel what you create -- every Task stored in a property should have a corresponding cancellation path.
  • Minimize @MainActor surface -- isolate only the UI layer; keep business logic and networking off the main actor.

Testing

  • One assertion per concept -- a single test can have multiple assertions if they verify the same logical behavior, but avoid testing unrelated things together.
  • Arrange-Act-Assert -- structure every test into setup, execution, and verification phases.
  • Name tests descriptively -- testFetchUser_withExpiredToken_throwsAuthError is better than testFetch2.
  • Prefer Swift Testing for new code -- use @Test and #expect when targeting Swift 5.9+; fall back to XCTest for older targets or UI tests.
  • Ensure test independence -- each test must be runnable in isolation; always produce self-contained test state.

Read the full file on GitHub · 108 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 108 lines · 22 tokens per session scan A b5e023461f07

Subscribe to this mod's changes

swift is a skill published in the GitHub repository notque/vexjoy-agent (420 stars, last pushed today), licensed MIT. It adds 22 tokens to every session and 921 once invoked, about $0.0001 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.