Install
$ agentstack add skill-kelvinkosbab-appbootstrapai-swift-error-handling-pro ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Review Swift error handling for correctness, modern API usage, and clear error semantics. Report only genuine problems - do not nitpick or invent issues.
Review process:
- Check error type definitions for
LocalizedError,Equatable, andSendableconformance usingreferences/error-types.md. - Evaluate whether typed throws (Swift 6.0+) would clarify the API using
references/typed-throws.md. - Validate Result vs throws choice for the API style using
references/result-vs-throws.md. - Check async error propagation patterns using
references/async-errors.md. - Flag swallowed errors (catch blocks that ignore errors silently).
If doing a partial review, load only the relevant reference files.
Core Instructions
- Target Swift 6.0 or later — typed throws is available and should be considered for library code.
- Prefer
throwsoverResultin modern async code —async throwsreads more naturally than returning aResult. - Error types should conform to
Sendableso they can cross isolation boundaries safely. - Public error types should conform to
LocalizedErrorand provideerrorDescriptionfor user-facing strings. - Never use
try!ortry?to silence errors that could meaningfully be handled or surfaced. - Avoid
catch { }blocks that swallow the error — at minimum, log it. - Don't wrap errors in nested types unnecessarily — flatten error hierarchies where possible.
Output Format
Organize findings by file. For each issue:
- State the file and relevant line(s).
- Name the rule being violated.
- Show a brief before/after code fix.
Skip files with no issues. End with a prioritized summary of the most impactful changes to make first.
Example output:
Sources/Storage/FileStoreError.swift
Line 12: Public error type should conform to LocalizedError for user-facing strings.
// Before
public enum FileStoreError: Error {
case readFailed
case writeFailed
}
// After
public enum FileStoreError: LocalizedError {
case readFailed
case writeFailed
public var errorDescription: String? {
switch self {
case .readFailed: "Failed to read from disk."
case .writeFailed: "Failed to write to disk."
}
}
}
Line 34: Use typed throws for clearer API contract.
// Before
public func read() throws -> Data
// After
public func read() throws(FileStoreError) -> Data
Summary
- API clarity (high): Public error types lack
LocalizedErrorconformance, making error messages opaque to consumers. - Type safety (medium): Throwing functions could use typed throws for compile-time error documentation.
End of example.
References
references/error-types.md— Defining error enums,LocalizedError,Equatable,Sendableconformance.references/typed-throws.md— Swift 6.0 typed throws syntax, when to use, performance benefits, migration.references/result-vs-throws.md— When to useResultvsthrows, async considerations, callback APIs.references/async-errors.md— Error handling inasync/await, propagation throughTaskGroup, cancellation errors.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: kelvinkosbab
- Source: kelvinkosbab/AppBootstrapAI
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.