Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

fix(skills): improve code examples in iOS 26 skills

Okmin300b6715f960
diff --git a/skills/foundation-models-on-device/SKILL.md b/skills/foundation-models-on-device/SKILL.md
index 074598f05..2304ca0e8 100644
--- a/skills/foundation-models-on-device/SKILL.md
+++ b/skills/foundation-models-on-device/SKILL.md
@@ -178,6 +178,7 @@ for try await partial in stream {
```swift
@State private var partialResult: TripIdeas.PartiallyGenerated?
+@State private var errorMessage: String?
var body: some View {
List {
@@ -185,10 +186,17 @@ var body: some View {
Text(idea)
}
}
+ .overlay {
+ if let errorMessage { Text(errorMessage).foregroundStyle(.red) }
+ }
.task {
- let stream = session.streamResponse(to: prompt, generating: TripIdeas.self)
- for try await partial in stream {
- partialResult = partial
+ do {
+ let stream = session.streamResponse(to: prompt, generating: TripIdeas.self)
+ for try await partial in stream {
+ partialResult = partial
+ }
+ } catch {
+ errorMessage = error.localizedDescription
}
}
}
diff --git a/skills/liquid-glass-design/SKILL.md b/skills/liquid-glass-design/SKILL.md
index 03a49b404..60551c2a2 100644
--- a/skills/liquid-glass-design/SKILL.md
+++ b/skills/liquid-glass-design/SKILL.md
@@ -138,13 +138,27 @@ glassEffect.tintColor = UIColor.systemBlue.withAlphaComponent(0.3)
glassEffect.isInteractive = true
let visualEffectView = UIVisualEffectView(effect: glassEffect)
+visualEffectView.translatesAutoresizingMaskIntoConstraints = false
visualEffectView.layer.cornerRadius = 20
visualEffectView.clipsToBounds = true
+view.addSubview(visualEffectView)
+NSLayoutConstraint.activate([
+ visualEffectView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
+ visualEffectView.centerYAnchor.constraint(equalTo: view.centerYAnchor),
+ visualEffectView.widthAnchor.constraint(equalToConstant: 200),
+ visualEffectView.heightAnchor.constraint(equalToConstant: 120)
+])
+
// Add content to contentView
let label = UILabel()
label.text = "Liquid Glass"
+label.translatesAutoresizingMaskIntoConstraints = false
visualEffectView.contentView.addSubview(label)
+NSLayoutConstraint.activate([
+ label.centerXAnchor.constraint(equalTo: visualEffectView.contentView.centerXAnchor),
+ label.centerYAnchor.constraint(equalTo: visualEffectView.contentView.centerYAnchor)
+])
```
### UIGlassContainerEffect for Multiple Elements
diff --git a/skills/swift-concurrency-6-2/SKILL.md b/skills/swift-concurrency-6-2/SKILL.md
index 9fff71daa..d9864cc40 100644
--- a/skills/swift-concurrency-6-2/SKILL.md
+++ b/skills/swift-concurrency-6-2/SKILL.md
@@ -136,10 +136,9 @@ This mode is opt-in and recommended for apps, scripts, and other executable targ
When you need actual parallelism, explicitly offload with `@concurrent`:
+> **Important:** This example requires Approachable Concurrency build settings — SE-0466 (MainActor default isolation) and SE-0461 (NonisolatedNonsendingByDefault). With these enabled, `extractSticker` stays on the caller's actor, making mutable state access safe. **Without these settings, this code has a data race** — the compiler will flag it.
+
```swift
-// Assumes Approachable Concurrency build settings are enabled:
-// SE-0466 (MainActor default isolation) and SE-0461 (NonisolatedNonsendingByDefault).
-// Safe mutation of cachedStickers via await depends on these compiler options.
nonisolated final class PhotoProcessor {
private var cachedStickers: [String: Sticker] = [:]