just-works: Skill for Claude Code

.claude/skills/swift-coding/SKILL.md

swift-coding is a skill for Claude Code from Dynokostya/just-works. It costs 49 tokens per session (3,186 once invoked), scanned A, original, Apache-2.0.

A set of coding rules for writing and editing Swift programs, including safer error handling, concurrency, memory use, types, and security.

In plain words
What is it for?
Use it when creating or reviewing Swift files and when checking their project settings and dependencies.
Why use it?
It helps avoid crashes, ignored errors, unsafe defaults, and code that conflicts with the project's existing Swift conventions.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is Dynokostya/just-works's own configuration. It tells Claude Code how to work on just-works itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything just-works configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Dynokostya/just-works. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Dynokostya/just-works/main/.claude/skills/swift-coding/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Dynokostya/just-works

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/dynokostya/just-works/swift-coding.svg)](https://agentmods.dev/skills/dynokostya/just-works/swift-coding)
Your own site
<a href="https://agentmods.dev/skills/dynokostya/just-works/swift-coding"><img src="https://agentmods.dev/badge/skills/dynokostya/just-works/swift-coding.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,186 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.00049 $0.03186
Opus 5 $0.00024 $0.01593
Sonnet 5 $0.00010 $0.00637
Haiku 4.5 $0.00005 $0.00319

Measured yesterday against content hash e89361a2ed1c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

swift-coding 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 yesterday.

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.

.claude/skills/swift-coding/SKILL.md · 305 lines

How it starts

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

Swift Coding

Match the project's existing conventions. When uncertain, read 2-3 existing files to infer the local style. Check Package.swift or .xcodeproj/.xcworkspace for Swift version, platform targets, and dependencies. New Xcode 26+ app projects default to Approachable Concurrency (Swift 6.2+) with main-actor isolation for app module code — assume this default unless the project explicitly disables it. These defaults apply only when the project has no established convention.

Never rules

These are unconditional. They prevent bugs and vulnerabilities regardless of project style.

  • Never force unwrap (!) outside tests and controlled contexts — crashes at runtime with no recovery path. Use guard let, if let, ??, or optional chaining. Force unwrap is acceptable in tests, @IBOutlet, and when failure is provably a programmer error with an explaining comment.
  • Never try! outside tests — crashes on any error. Use do-catch, try?, or propagate with throws. A network timeout, a missing file, a malformed response — any of these kill your process silently with no chance to recover or report.
  • Never bare catch { } without handling — silently swallows errors. Catch specific error types, or log and rethrow. A decode failure looks the same as a permission error, and you'll never know which one is happening in production.
  • Never [weak self] without checking for nil — accessing self after capture without guard let self leads to silent no-ops or partial execution. Half-completed operations are worse than failures because they corrupt state without raising errors.
  • Never mutable global or static state — shared mutable state causes data races. Use actors, @MainActor, or dependency injection. The Swift 6 concurrency model will flag these as compile errors, so fix them now.
  • Never blocking calls on MainActor — no Thread.sleep(), synchronous network calls, or heavy computation on the main thread. Use Task, async/await, or dispatch to a background context. Blocking main freezes the UI and triggers watchdog kills on iOS.
  • Never x = x + y to build strings in loops — use += or append(contentsOf:), which grow the buffer in place (amortized, via copy-on-write), or joined(separator:) for collections. x = x + y allocates and copies a fresh string every iteration.
  • Never hand-roll cryptographic key material — use CryptoKit (SymmetricKey(size:)) or SecRandomCopyBytes for keys, tokens, and session IDs. For general randomness, Int.random(in:) and SystemRandomNumberGenerator are fine — the system RNG is cryptographically secure.
  • Never print() in production code — use os.Logger or OSLog. print is not filterable, not structured, and persists in release builds. It cannot be searched in Console.app and adds noise to device logs.
  • Never class when struct suffices — default to value types. Use class only when you need reference semantics, inheritance, or identity. Value types avoid retain/release overhead and are safe to copy across threads — though closure captures, existential boxes, and CoW buffers can still put struct storage on the heap.
  • Never retain cycles in closures — escaping closures capturing self in classes must use [weak self] or [unowned self]. Retain cycles cause silent memory leaks that accumulate over app lifetime, eventually triggering OOM kills.
  • Never Any or AnyObject when a protocol or generic suffices — type erasure disables compile-time checking. Use generics, some, or any with specific protocols. A runtime cast failure is always worse than a compile error.

Read the full file on GitHub · 305 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. yesterday First seen · 305 lines · 49 tokens per session scan A e89361a2ed1c

Subscribe to this mod's changes

swift-coding is a skill published in the GitHub repository Dynokostya/just-works (14 stars, last pushed 2d ago), licensed Apache-2.0. It adds 49 tokens to every session and 3,186 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-04.

Related

Other skills, from other repositories

kotlin-specialist

Provides idiomatic Kotlin implementation patterns including coroutine concurrency, Flow stream handling, multiplatform architecture, Compose UI construction, Ktor server setup, and type-safe DSL design. Use when building Kotlin applications requiring coroutines, multiplatform development, or Android with Compose.…

Jeffallan/claude-skills · 86 tokens

swiftui-dev

Use this skill for SwiftUI development, architecture, structure, performance, and Apple native app profiling. It combines.

Orkas-AI/Orkas · 3 tokens

developing-genkit-dart

Generates code and provides documentation for the Genkit Dart SDK. Use when the user asks to build AI agents in Dart, use Genkit flows, or integrate LLMs into Dart/Flutter applications.

google/skills · 48 tokens

wax

Swift framework guidance for Wax on-device memory/RAG. Use when writing Swift code with the public Memory facade, experimental PhotoMemory / VideoMemory, BuiltInMultimodalEmbeddings, embedding providers, retrieval modes, or hybrid search. For agent operators using the Wax MCP server tools, use the separate wax-mcp…

christopherkarani/Wax · 68 tokens

mobiai-kmp

Use when working on a Kotlin Multiplatform project — shared code, expect/actual declarations, platform-specific implementations, building and testing.

ArisGuimera/MobiAI-Core · 32 tokens

kotlin-concurrency-expert

Kotlin Coroutines review and remediation for Android. Use when asked to review concurrency usage, fix coroutine-related bugs, improve thread safety, or resolve lifecycle issues in Kotlin/Android code.

new-silvermoon/awesome-android-agent-skills · 44 tokens