Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/maragudk-swift
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/swift
What's inside
- Skill name
swift- Description
- Always use when creating and editing Swift files (*.swift)
- License
- MIT
- Instructions
- 121 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Swift Style Guide
## Naming
- Use UpperCamelCase for type and protocol names, and lowerCamelCase for everything else.
- Name booleans like `isSpaceship`, `hasSpacesuit`, etc. This makes it clear that they are booleans and not other types.
- Acronyms in names (`ID`, `URL`, etc) should be all-caps except when it’s the start of a name that would otherwise be lowerCamelCase, in which case it should be uniformly lower-cased.
- Event-handling functions should be named like past-tense sentences (e.g. `didTap`, not `handleTap`). The subject can be omitted if it's not needed for clarity.
- Avoid Objective-C-style acronym prefixes. This is not needed to avoid naming conflicts in Swift.
## Style
- Don't include types where they can be easily inferred.
- Prefer letting the type of a variable or property be inferred from the right-hand-side value rather than writing the type explicitly on the left-hand side.
- Don't use `self` unless it's necessary for disambiguation or required by the language.
- Name members of tuples for extra clarity. Rule of thumb: if you've got more than 3 fields, you should probably be using a struct.
- When unwrapping an optional, prefer reusing the existing identifier rather than introducing a new one. However, it's fine to introduce a new name when doing so improves clarity at the use site.
- Prefer `if` expressions over ternary operators for single-expression return values. Use ternary operators for conditions nested in other expressions, such as SwiftUI modifier conditions. Generally prefer `if` expressions for assignments after `=` operators.
- Prefer using `for` loops over the functional `forEach(…)` method, unless using `forEach(…)` as the last element in a functional chain.
### Functions
- Avoid using `unowned` captures. Instead prefer safer alternatives like `weak` captures, or capturing variables directly.
### Operators
- When extending bound generic types, prefer using generic bracket syntax (`extension Collection<Planet>`), or sugared syntax for applicable standard library types (`extension [Planet]`) instead of generic type constraints.
## Patterns
- Prefer initializing properties at `init` time whenever possible, rather than using implicitly unwrapped optionals. A notable exception is UIViewController's `view` property.
- Avoid performing any meaningful or time-intensive work in `init()`. Avoid doing things like opening database connections, making network requests, reading large amounts of data from disk, etc. Create something like a `start()` method if these things need to be done before an object is ready for use.
- Omit redundant memberwise initializers. The compiler synthesizes `internal` memberwise initializers for structs, so explicit `internal` initializers equivalent to the synthesized initializer should be omitted.
- Extract complex property observers into methods. This reduces nestedness and separates side-effects from property declarations.
- Extract complex callback blocks into methods to reduced nestedness.
- When validating preconditions at the start of a scope, prefer using `guard` statements over `if` statements. This reduces nesting, and allows the compiler to verify that the `return` statement is present.
- Avoid global functions whenever possible. Prefer methods within type definitions.
- Prefer immutable values whenever possible. Use `map` and `compactMap` instead of appending to a new collection. Use `filter` instead of removing elements from a mutable collection.
- Prefer immutable or computed static properties over mutable ones whenever possible. Use stored `static let` properties or computed `static var` properties over stored `static var` properties whenever possible, as stored `static var` properties are global mutable state.
- Handle an unexpected but recoverable condition with an `assert` method combined with the appropriate logging in production. If the unexpected condition is not recoverable, prefer a `precondition` method or `fatalError()`. This strikes a balance between crashing and providing insight into unexpected conditions in the wild. Only prefer `fatalError` over a `precondition` method when the failure message is dynamic, since a `precondition` method won't report the message in the crash report.
- Default classes to `final`.
- When defining type functions in classes, prefer `static func` over `class func`.
- When switching over an enum, generally prefer enumerating all cases rather than using the `default` case.
- Check for nil rather than using optional binding if you don't need to use the value.
- Prefer dedicated logging systems like `os_log` or `swift-log` over writing directly to standard out using `print(…)`, `debugPrint(…)`, or `dump(…)`.
- Don't use `#file`. Use `#fileID` or `#filePath` as appropriate.
- Don't use `#filePath` in production code. Use `#fileID` instead.
- Prefer using opaque generic parameters (with `some`) over verbose named generic parameter syntax where possible.
- Prefer to avoid using `@unchecked Sendable`. Use a standard `Sendable` conformance instead where possible. If working with a type from a module that has not yet been updated to support Swift Concurrency, suppress concurrency-related errors using `@preconcurrency import`.
- Prefer using a generated Equatable implementation when comparing all properties of a type. For structs, prefer using the compiler-synthesized Equatable implementation when possible.
- If available in your project, prefer using a `#URL(_:)` macro instead of force-unwrapping URL(string:)! initializer.
## SwiftUI
- For internal SwiftUI views, prefer using the synthesized memberwise init by defining internal properties rather than private properties. However, SwiftUI dynamic properties like `@State` should stay private.
## Testing
- In Swift Testing, name test cases as sentences using raw identifiers, rather than using lowerCamelCase. Don't prefix test case names with "`test`". Use UpperCamelCase for test suite names. Always omit the display name string from the `@Test` or `@Suite` macro.
- In Swift Testing, avoid expectation message strings that restate the expectation without adding additional context. Unlike `XCTAssert`, the Swift Testing `#expect` macro generates detailed failure messages that include the expectation condition.
- Avoid `guard` statements in unit tests. XCTest and Swift Testing have APIs for unwrapping an optional and failing the test, which are much simpler than unwrapping the optionals yourself. Use assertions instead of guarding on boolean conditions.
- In test suites, test cases should be `internal`, and helper methods and properties should be `private`.
- Avoid force-unwrapping in unit tests. Force-unwrapping (!) will crash your test suite. Use safe alternatives like `try XCTUnwrap` or `try #require`, which will throw an error instead, or standard optional unwrapping (`?`).
## Performance
- Prefer using `count(where: { ... })` over `filter { ... }.count`.
- Prefer using `isEmpty` over comparing `count` against zero.
- Prefer using `flatMap { ... }` over `map { ... }.reduce([], +)`.
- Prefer using `contains` over `filter(_:).isEmpty`, `first(where:) != nil`, and `range(of:) != nil`.
- Prefer using `first(where: { ... })` over `filter { ... }.first`.
- Prefer using `min()` over `sorted().first`.
- Prefer `lazy.map` over `map` when the chain reduces to a single result (`joined(separator:)`, `min`, `max`, `reduce`, `contains`, etc).
## Apple Frameworks
- Use constructors instead of Make() functions for NSRange and others.
* Prefer CIFilter's typed factory methods (via `CIFilterBuiltins`) over the string-based `CIFilter(name:)` initializer and KVO `setValue(_:forKey:)`.From maragudk/fabrik, MIT.
More from maragudk/fabrik
- 0.652score
ableton-live
maragudk
Guide for making music in Ableton Live 12 on macOS.
SkillAFreshness: A★ 30Claude Code +9 - 0.616score
observability
maragudk
Guide for instrumenting and operating observable software systems.
SkillBFreshness: B★ 30Claude Code +9 - 0.616score
security-review
maragudk
Perform a thorough security review of the project, starting from a randomly selected file.
SkillBFreshness: B★ 30Claude Code +9 - 0.616score
swiftui-pro
Paul Hudson
Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance.
SkillBFreshness: B★ 30Claude Code +9 - 0.616score
simple-english
maragudk
Write or rewrite technical text with the rules of ASD-STE100 Simplified Technical English so it is clear, unambiguous, and free of AI slop.
SkillBFreshness: B★ 30Claude Code +9 - 0.616score
macos-design
maragudk
Design and build native-feeling macOS application UIs.
SkillBFreshness: B★ 30Claude Code +9 - 0.616score
xbrl
maragudk
Guide for working with XBRL, the standard for digital business and financial reporting -- reading and writing instance documents, Inline XBRL (iXBRL)…
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
distill-book
maragudk
Distill a long book into a concise, structured set of learnings by processing it chapter by chapter with parallel subagents, then synthesizing the result --…
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
decisions
maragudk
Guide for recording high-level architectural, design, and product decisions in docs/decisions.md.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
address-code-review
maragudk
Address code review feedback by walking through comments one at a time with the user.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
garden
maragudk
Autonomous project gardening.
SkillBFreshness: B★ 30Claude Code +9 - 0.611score
gardeners
maragudk
Autonomous project gardening by a coordinated team of agents.
SkillBFreshness: B★ 30Claude Code +9
Signals
- Stars
- 30
- Forks
- 2
- Open issues
- 0
- Last commit (this folder)
- Aug 25, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/maragudk/fabrik
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from maragudk
- 0.652score
ableton-live
maragudk
Guide for making music in Ableton Live 12 on macOS.
SkillAFreshness: A★ 30Claude Code +9 - 0.616score
security-review
maragudk
Perform a thorough security review of the project, starting from a randomly selected file.
SkillBFreshness: B★ 30Claude Code +9 - 0.616score
xbrl
maragudk
Guide for working with XBRL, the standard for digital business and financial reporting -- reading and writing instance documents, Inline XBRL (iXBRL)…
SkillBFreshness: B★ 30Claude Code +9 - 0.616score
macos-design
maragudk
Design and build native-feeling macOS application UIs.
SkillBFreshness: B★ 30Claude Code +9 - 0.616score
observability
maragudk
Guide for instrumenting and operating observable software systems.
SkillBFreshness: B★ 30Claude Code +9 - 0.616score
simple-english
maragudk
Write or rewrite technical text with the rules of ASD-STE100 Simplified Technical English so it is clear, unambiguous, and free of AI slop.
SkillBFreshness: B★ 30Claude Code +9
Cite this page
swift skill. Agent Mart. https://agentmart.dev/skills/maragudk-swift (last updated 2026-10-24)