develop-swift
Skill1 starsChanged 3 months agoMITView on GitHub
Develop and review production Swift 6 code with strict concurrency, Swift Package Manager boundaries, typed APIs, and Swift Testing. Use for changes to .swift files, Package.swift, Swift modules, actors or Sendable code, Codable contracts, subprocess/runtime adapters, tests, refactors, and code-quality reviews in this repository.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- hidekitux/skillstheir own version, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- hidekitux/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- build-macos-cliSkill
- speckit-analyzeSkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-constitutionSkill
- speckit-convergeSkill
- speckit-implementSkill
- speckit-planSkill
- speckit-specifySkill
- speckit-tasksSkill
- speckit-taskstoissuesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. About 0 are common, 19 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Read AGENTS.md, ARCHITECTURE.md, and the relevant feature spec.
- Distinctive: line 17
Read the complete type and its tests.
- Distinctive: line 18
Check the working tree and preserve unrelated changes.
- Distinctive: line 21
If the requested behavior conflicts with a trust boundary, stop that implementation path and explain the conflict.
- Distinctive: line 26
Prefer a value type and pure function for validation, classification, canonicalization, and state transitions.
- Distinctive: line 28
Put I/O behind a narrow protocol and inject the implementation, clock, or process runner.
- Distinctive: line 29
Keep parsing, domain decisions, platform adapters, and presentation separate.
- Distinctive: line 30
Use one primary type per file.
- Distinctive: line 31
Add a target dependency only when the architecture permits that direction.
- Very specific: line 32
Use explicit versioned request and response DTOs at CLI/XPC boundaries.
- Very specific: line 36
Prefer direct, unsurprising names.
- Very specific: line 44
Use @unchecked Sendable only for a small Foundation, Security, XPC, or process bridge whose synchronization is reviewable in the same file.
- Very specific: line 46
Prefer structured concurrency.
- Distinctive: line 49
Never block an actor executor with process waits, pipe reads, semaphores, or file I/O.
- Distinctive: line 50
Ensure continuations resume exactly once on success, failure, cancellation, and invalidation.
- Very specific: line 56
Put pure invariants and policy cases in Tests/Unit.
- Very specific: line 57
Put stable CLI/XPC encoding and exit behavior in Tests/Contract.
- Very specific: line 58
Put composition and adapter journeys in Tests/Integration.
- Very specific: line 59
Put trust-boundary, tamper, secret-exposure, and fail-closed cases in Tests/Security.
- Distinctive: line 60
Use synthetic resources only.
- Distinctive: line 62
Test invalid inputs and cancellation, not only the happy path.
- Distinctive: line 63
Prefer deterministic fakes over sleeps.
- Distinctive: line 67
Prefer labeled initializers and small methods with one reason to change.
- Distinctive: line 68
Keep public surface area minimal.
- Distinctive: line 69
Use extensions only to group a real conformance or cohesive capability.
- Distinctive: line 70
Keep comments focused on invariants, platform quirks, and security rationale.
- Distinctive: line 72
Do not hide side effects behind computed properties or innocent names.
- Distinctive: line 78
Run the narrow test while iterating, then the repository gates:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 buildInspect 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

