agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when writing Swift for iOS, macOS, or server-side. Covers value semantics, optionals, protocol-oriented design, structured concurrency with async/await and actors, and SwiftUI state management. Trigger on "migrate this completion handler to async/await", "sendable warnings
Claude Code
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill swift --agent claude-code
Codex
$ npx skills add nimadorostkar/Claude-Skills-collection --skill swift -a codex -y
Cursor
$ npx skills add nimadorostkar/Claude-Skills-collection --skill swift -a cursor -y
Gemini CLI
$ npx skills add nimadorostkar/Claude-Skills-collection --skill swift -a gemini-cli -y
GitHub Copilot
$ npx skills add nimadorostkar/Claude-Skills-collection --skill swift -a github-copilot -y
OpenCode
$ npx skills add nimadorostkar/Claude-Skills-collection --skill swift -a opencode -y
Windsurf
$ npx skills add nimadorostkar/Claude-Skills-collection --skill swift -a windsurf -y
name: swift description: Use when writing Swift for iOS, macOS, or server-side. Covers value semantics, optionals, protocol-oriented design, structured concurrency with async/await and actors, and SwiftUI state management. Trigger on "migrate this completion handler to async/await", "sendable warnings under strict concurrency", "retain cycle in my closure", "where should this state live". Do not use for app architecture, navigation, or App Store submission — see the ios skill. metadata: category: languages version: 1.0.0 tags: [swift, ios, concurrency, actors, swiftui]
Write Swift that leans on value semantics and the concurrency model rather than fighting them: structs by default, actors for shared mutable state, and no force-unwrapping.
1. **Prefer structs** — Reach for a class only when identity or shared mutation is required. 2. **Eliminate optionals early** — Unwrap once at the boundary with `guard`; the rest of the function works with non-optionals. 3. **Isolate mutable state** — Any shared mutable state becomes an actor or is confined to the main actor. 4. **Model async explicitly** — Replace completion handlers with `async` functions; use task groups for concurrency. 5. **Gate** — Build with strict concurrency checking and treat warnings as errors.
**Actor-isolated cache with concurrent loading:**
actor ImageCache {
private var cache: [URL: UIImage] = [:]
private var inFlight: [URL: Task<UIImage, Error>] = [:]
func image(for url: URL) async throws -> UIImage {
if let cached = cache[url] { return cached }
if let existing = inFlight[url] { return try await existing.value }
let task = Task<UIImage, Error> {
let (data, _) = try await URLSession.shared.data(from: url)
guard let image = UIImage(data: data) else { throw CacheError.decodeFailed(url) }
return image
}
inFlight[url] = task
defer { inFlight[url] = nil }
let image = try await task.value
cache[url] = image
return image
}
}A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory,…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling,…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.