Install
$ agentstack add skill-juju-w-safa-mac-develop-swift ✓ 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 Used
- ✓ 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
Develop Swift
Produce small, readable Swift changes that preserve SAFA's trust boundaries. Treat compilation as the first check, not the definition of correctness.
Establish context
Before editing:
- Read
AGENTS.md,ARCHITECTURE.md, and the relevant feature spec. - Inspect
Package.swiftand the touched target's dependency direction. - Read the complete type and its tests; do not infer behavior from one call site.
- Check the working tree and preserve unrelated changes.
- State which module owns the behavior before adding a type or dependency.
If the requested behavior conflicts with a trust boundary, stop that implementation path and explain the conflict. Do not weaken an invariant to make a test or demo pass.
Design the change
- Prefer a value type and pure function for validation, classification, canonicalization, and state
transitions.
- Put I/O behind a narrow protocol and inject the implementation, clock, or process runner.
- Keep parsing, domain decisions, platform adapters, and presentation separate.
- Use one primary type per file. Split a file near 300 lines unless its cohesion is explicit.
- Add a target dependency only when the architecture permits that direction.
- Use explicit versioned request and response DTOs at CLI/XPC boundaries. Define
CodingKeys; do not
expose persistence models or add dynamic [String: JSONValue] payloads.
- Model expected failures with precise error types and stable boundary error codes. Avoid
fatalError, force unwraps, try!, and catch-all success fallbacks.
- Prefer direct, unsurprising names. Avoid
Manager,Helper,Utils, and generic dictionaries
when a domain name or type exists.
Apply Swift 6 concurrency rules
- Preserve Swift 6 language mode and strict concurrency.
- Make immutable value types
Sendablewhen they cross tasks or actors. - Isolate shared mutable state in an actor or a visibly synchronized adapter.
- Use
@unchecked Sendableonly for a small Foundation, Security, XPC, or process bridge whose
synchronization is reviewable in the same file.
- Prefer structured concurrency. Use
Task.detachedonly when actor inheritance would be wrong and
document ownership, cancellation, and lifetime.
- Propagate cancellation and deadlines through subprocess and XPC boundaries.
- Never block an actor executor with process waits, pipe reads, semaphores, or file I/O.
- Ensure continuations resume exactly once on success, failure, cancellation, and invalidation.
Test before implementation
For security-sensitive behavior, add the failing test first.
- Put pure invariants and policy cases in
Tests/Unit. - Put stable CLI/XPC encoding and exit behavior in
Tests/Contract. - Put composition and adapter journeys in
Tests/Integration. - Put trust-boundary, tamper, secret-exposure, and fail-closed cases in
Tests/Security. - Use synthetic resources only. Tests must not contact real infrastructure or read real Keychain
items.
- Test invalid inputs and cancellation, not only the happy path.
- Prefer deterministic fakes over sleeps. When time is the subject, inject a clock where practical.
Keep APIs readable
- Prefer labeled initializers and small methods with one reason to change.
- Keep public surface area minimal; default to internal visibility.
- Use extensions only to group a real conformance or cohesive capability.
- Keep comments focused on invariants, platform quirks, and security rationale. Do not narrate the
syntax.
- Do not hide side effects behind computed properties or innocent names.
- Make resource ownership explicit for file handles, pipes, tasks, XPC connections, and temporary
files; close or invalidate them on every path.
Validate the slice
Run the narrow test while iterating, then the repository gates:
xcrun swift-format lint --recursive --strict Sources Tests Apps/SAFA/Targets Package.swift
swift test --parallel
swift build -c release
xcodebuild -quiet -project Apps/SAFA/SAFA.xcodeproj -scheme "SAFA Runtime" \
-configuration Debug CODE_SIGNING_ALLOWED=NO build
Inspect the final diff for accidental public API, new dependencies, dynamic wire payloads, real infrastructure data, and unbounded output. Follow the repository PR workflow and never publish a tag, Release, signed artifact, or Skill package while the publication hold is active.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: juju-w
- Source: juju-w/safa-runtime
- 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.