skills/cats-effect-resource/SKILL.md
Helps agents write and review Scala Cats Effect Resource code. Use for preventing resource leaks and use-after-release bugs, modeling disposable values with Resource, designing Resource-returning factories and constructor-injected services, wrapping Java AutoCloseable values, composing resources, and handling cancellation-safe release.
npx skillsauth add alexandru/skills cats-effect-resourceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Resource.make, Resource.makeCase, or Resource.fromAutoCloseable..use; it is released when .use completes. Return only values computed inside the scope.Resource[F, Service], then pass acquired private dependencies into constructors.AutoCloseable values with Resource.fromAutoCloseable(Sync[F].blocking(...)) or IO.blocking(...).flatMap, mapN, parMapN, or helper constructors; expose Resource[F, A] from lifecycle-owning APIs.references/resource.md for patterns, best practices, and type-checked samples.Resource[F, A]; suspend side effects in F (Sync[F].delay/blocking, IO.blocking, etc.).resource/create factories that return Resource..use..use at the lifecycle boundary (IOApp, server startup, test fixture), and keep raw handles inside the use scope.allocated only for interop that truly needs separate acquire/release, and guarantee the finalizer is called exactly once.Resource over try/finally or bracket when composition and cancelation safety matter.IO.blocking (or Sync[F].blocking) for acquisition and release when calling blocking JVM APIs.IO.interruptible/Sync[F].interruptible for blocking use-phase operations inside .use.Resource.eval only for effects that do not own a finalizer; it is not a substitute for resource acquisition.use acquires a fresh resource each time. If the same handle must be shared for multiple operations, do those operations inside one .use.Resource, .background, or Supervisor to ensure cleanup on cancelation.scripts/verify-examples.scala script.references/resource.md for API details, patterns, and examples; the representative check is scripts/verify-examples.scala.arrow-resource skill.npx skills add https://github.com/alexandru/skills --skill cats-effect-resource.development
Scala auto-derivation with Kindlings for Circe and PureConfig. Use when replacing circe-generic/circe-generic-extras or PureConfig generic derivation with Kindlings while keeping normal Circe JSON APIs and PureConfig loading/writing APIs.
development
Simplifies code for clarity without changing behavior. Use when code is working but overly complex, deeply nested, duplicated, or unclear.
development
Helps agents design and review Kotlin library APIs for Java consumers. Use when building Kotlin code intended for Java callers, shaping JVM signatures with @JvmName, @JvmOverloads, @JvmStatic, @JvmField, @Throws, @JvmRecord, nullability, records, and backward/binary compatibility rules.
tools
JSpecify nullness annotations for Java APIs and tooling. Use when adopting or migrating JSpecify annotations, designing null-safe Java signatures, fixing generic bounds and type-use placement, or interpreting Kotlin interop, annotation-processor, and tool-conformance behavior.