PromptVault
CodingProAdvanced

Blocking I/O becomes cancellation-safe asynchronous code

For engineers modernizing a real call path while preserving its observable behavior.

Works with
  • Codex
  • GitHub Copilot
  • Claude
  • Cursor
The prompt141 words · 3 blanks

Refactor [source_code] for [runtime_constraints] under [compatibility_mode] by running this interview before returning

The full prompt is in the app

Included with PromptVault Pro. Fill in the blanks there, then copy it into Claude.

What you fill in

  • Code to refactor[source_code]ExampleService method and its blocking helper calls
  • Runtime constraints[runtime_constraints]Example.NET 8 ASP.NET request path with CancellationToken
  • Compatibility requirement[compatibility_mode]ExamplePublic API unchanged

How to use it

  1. 1Open it in PromptVault. Find it in Coding, or search for “Blocking I/O becomes cancellation-safe asynchronous code”.
  2. 2Fill in the 3 blanks. code to refactor, runtime constraints and compatibility requirement — the only things the prompt cannot know.
  3. 3Copy and paste it into Claude. It also works with Codex, GitHub Copilot and Cursor.

About this prompt

Blocking I/O becomes cancellation-safe asynchronous code” is a advanced coding prompt. For engineers modernizing a real call path while preserving its observable behavior. It is 141 words long and written to get a usable answer on the first message, in Codex, GitHub Copilot and Claude or any other chat assistant. Good for: refactoring, rewrite, deep dive and legacy code. Like every prompt in PromptVault, it was written and edited in-house, and it works offline once the app is installed.