agentleFS
christopherkaranichristopherkarani/rv/.claude/skills/swift-64-concurrency/SKILL.md

swift-64-concurrency

Skill8 starsChanged 6 days agoApache-2.0View on GitHub

Use when Swift 6.4 concurrency APIs appear: async defer, withTaskCancellationShield, Continuation / withContinuation, ~Sendable, unused throwing Task warnings, async Result, UnownedTaskExecutor Hashable. Do not invoke for ordinary actor/Sendable work that swift-concurrency-63 already covers.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Test success, throw, cancel, and double-resume / drop-without-resume paths.

    line 21
  2. Very specific:

    Prefer Continuation / withContinuation(of:) when resume-once is a compile-time invariant.

    line 27
  3. Very specific:

    Write ~Sendable on the type declaration.

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Swift 6.4 concurrency

Prove isolation and lifetime first (swift-concurrency-63). This skill only covers APIs that shipped in 6.4.

Procedure

  1. Confirm Swift 6.4 (swift --version). Stop if the project is on 6.3 or Xcode's /usr/bin/swift.
  2. Classify the work: cleanup-on-exit, resume-once bridge, Sendable audit, unstructured task, or storing an outcome.
  3. Pick the 6.4 tool from the table in references/concurrency-64.md.
  4. Compile the smallest example. Treat new warnings on unused throwing Task { } as real bugs, not noise.
  5. Test success, throw, cancel, and double-resume / drop-without-resume paths.

Guardrails

  • defer { await … } still observes cancellation. Wrap teardown in withTaskCancellationShield when the work must finish after cancel.
  • withTaskCancellationShield is for short cleanup. Do not hide a long operation from cancellation.
  • Prefer Continuation / withContinuation(of:) when resume-once is a compile-time invariant. Convert to CheckedContinuation only when two escaping callbacks may fire and the library promises exactly one.
  • Write ~Sendable on the type declaration. Do not combine it with Sendable on the same type. A subclass may still opt in.
  • _ = Task { try await … } is allowed but means "ignore failure on purpose." Prefer handling inside the task.
  • await Result { try await … } is for storing an outcome. Do not wrap every try await.

Completion contract

Report isolation domains, which 6.4 API was chosen and why, cancel/resume proof, and compiler evidence under Swift 6.4.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.