Skip to content

About

Swift 6 typed throws troubleshooting skill for Codex and other AI coding assistants. Documents current compiler and concurrency edge cases, with practical fixes for `async let`, `Task`, continuations, task groups, cancellation, typed closures, and `Result`-based error tunnels.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Typed Error Throwing Fixes

Typed Error Throwing Fixes

AI Agents - Skill MIT License LinkedIn

Typed Error Throwing Fixes is an agent skill for Codex and other AI coding assistants that helps review and repair Swift 6.4 typed-throws code.

It is useful where Swift's typed throws(E) model meets type-erasing compiler and Concurrency boundaries, including async let, Task, task groups, cancellation, generic closures, do throws(E), and Result-based error tunnels. It also covers Swift 6.4's native typed continuation and async Result APIs.

Installing Typed Error Throwing Fixes

Install the skill with npx:

npx skills add https://github.com/Gucky/TypedErrorThrowingFixes --skill typed-error-throwing-fixes

To install it globally for Codex:

npx skills add https://github.com/Gucky/TypedErrorThrowingFixes --skill typed-error-throwing-fixes --agent codex --global

For a specific agent:

npx skills add https://github.com/Gucky/TypedErrorThrowingFixes --skill typed-error-throwing-fixes --agent claude-code

For all supported agents:

npx skills add https://github.com/Gucky/TypedErrorThrowingFixes --skill typed-error-throwing-fixes --agent '*'

If npx is not available, install Node.js first. On macOS with Homebrew:

brew install node

Using Typed Error Throwing Fixes

In Codex, trigger the skill directly:

$typed-error-throwing-fixes

You can also ask naturally:

Use the Typed Error Throwing Fixes skill to review this Swift typed-throws code.

The skill helps with:

  • Preserving concrete thrown error types across Swift Concurrency boundaries.
  • Replacing accidental any Error widening with typed Result tunnels or explicit mapping.
  • Handling current rough edges in async let, Task, and task groups.
  • Using native typed throwing continuations and async Result.init(catching:).
  • Writing explicit typed-throwing closure signatures at generic boundaries where inference produces any Error.
  • Treating cancellation deliberately inside typed domain error APIs.

Safety Model

This skill is guidance and reference material for Swift code changes. It does not run project-specific migrations on its own. When used to modify a codebase, validate with the active Swift toolchain because typed-throws diagnostics can depend on the compiler version.

Requirements

  • Swift 6.4 typed-throws code or review context
  • Node.js for npx
  • An AI coding assistant that supports agent skills

License

Typed Error Throwing Fixes was created by Wolfgang Muhsal. It is available under the MIT License, which permits commercial use, modification, distribution, and private use.

About

Swift 6 typed throws troubleshooting skill for Codex and other AI coding assistants. Documents current compiler and concurrency edge cases, with practical fixes for `async let`, `Task`, continuations, task groups, cancellation, typed closures, and `Result`-based error tunnels.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages