swift-docs

swift-docs is a skill for Claude Code, Codex from pledgeandgrow/pledge-skills. It costs 32 tokens per session (1,626 once invoked), scanned A, original, MIT.

Reference material for Swift 6, Apple's programming language for building apps and other software. It covers core language features, data types, concurrency, protocols, and package management.

In plain words
What is it for?
Use it while writing or reviewing Swift code, learning the language, or checking details about concurrency and packages.
Why use it?
It gives developers one place to check how Swift syntax and standard features work.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it while writing or reviewing Swift code, learning the language, or checking details about concurrency and packages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pledgeandgrow/pledge-skills/swift
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 pledgeandgrow/pledge-skills --skill swift
Clone the repo
git clone --depth 1 https://github.com/pledgeandgrow/pledge-skills

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-docs

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/pledgeandgrow/pledge-skills/swift"><img src="https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/swift.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,626 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.00032 $0.01626
Opus 5 $0.00016 $0.00813
Sonnet 5 $0.00006 $0.00325
Haiku 4.5 $0.00003 $0.00163

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

Security

Grade A, and why

swift-docs 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 6d 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/swift/SKILL.md · 101 lines

How it starts

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

Swift

Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns.

Version: Swift 6.0
Documentation: swift.org/documentation
Language Reference: The Swift Programming Language (TSPL)

Quick Reference

Topic File
Introduction (what is Swift, installation, features, platform support) introduction.md
Guided Tour (quick tour of all Swift features) guided-tour.md
Syntax Basics (constants, variables, types, operators, control flow) syntax-basics.md
Strings and Characters (literals, interpolation, Unicode, indexing) strings-and-characters.md
Collection Types (Array, Set, Dictionary, collection protocols) collection-types.md
Functions and Closures (parameters, return types, closures, higher-order) functions-and-closures.md
Enumerations (raw values, associated values, recursive enums, patterns) enumerations.md
Structures and Classes (properties, methods, subscripts, value vs reference) structures-and-classes.md
Inheritance and Initialization (subclassing, init delegation, deinit, optional chaining) inheritance-and-initialization.md
Optionals and Error Handling (optional binding, try/catch, defer, Result) optionals-and-error-handling.md
Concurrency (async/await, Tasks, Actors, Sendable, structured concurrency) concurrency.md
Type Casting and Extensions (is, as?, nested types, protocol extensions) type-casting-and-extensions.md
Protocols and Generics (associated types, constraints, opaque/boxed types) protocols-and-generics.md
Access Control (private, fileprivate, internal, public, open) access-control.md
Advanced Operators (bitwise, overflow, custom operators, precedence, result builders) advanced-operators.md
Macros (freestanding, attached, custom macros, SwiftSyntax, compile-time codegen) macros.md
Memory Safety and ARC (reference counting, weak/unowned, ownership, noncopyable) memory-safety-and-arc.md
API Design Guidelines (naming, conventions, argument labels, documentation) api-design-guidelines.md
Standard Library and Core Libraries (Foundation, Dispatch, XCTest, Swift Testing) standard-library-and-core-libraries.md
Package Manager (SwiftPM, Package.swift, dependencies, targets, resources) package-manager.md
Swift on Server (Vapor, Hummingbird, SwiftNIO, deployment, Docker) server.md
C++ Interoperability (importing C++, exposing Swift, containers, reference types) cxx-interop.md
Value and Reference Types (semantics, copy-on-write, choosing, composing) value-and-reference-types.md
DocC Documentation (documentation comments, articles, tutorials, hosting) docc.md
Compiler and Tools (architecture, REPL, LLDB, SourceKit-LSP, profiling) compiler-and-tools.md
Cross-Platform Development (Linux, Windows, Android, WebAssembly, Embedded) cross-platform.md
Swift Evolution and Contributing (proposals, source code, community) evolution-and-contributing.md

Read the full file on GitHub · 101 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. 6d ago First seen · 101 lines · 32 tokens per session scan A 9aca092301b0

Subscribe to this mod's changes

swift-docs is a skill published in the GitHub repository pledgeandgrow/pledge-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 32 tokens to every session and 1,626 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.