[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79WZ1T6F71CZ65GC6KBDST4":3,"skill-same:01M79WZ1T6F71CZ65GC6KBDST4":54},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M79WZ1T6F71CZ65GC6KBDST4","thread-abort-migration",null,"Guides migration of .NET Framework Thread.Abort usage to cooperative cancellation in modern .NET. USE FOR: modernizing code that calls Thread.Abort, catching ThreadAbortException, replacing Thread.ResetAbort, replacing Thread.Interrupt for thread termination, resolving PlatformNotSupportedException or SYSLIB0006 after retargeting to .NET 6+, migrating ASP.NET Response.End or Response.Redirect(url, true) which internally call Thread.Abort. DO NOT USE FOR: code that only uses Thread.Join, Thread.Sleep, or Thread.Start without any abort, interrupt, or ThreadAbortException usage — these APIs work identically in modern .NET and need no migration. Also not for projects staying on .NET Framework, or Thread.Abort usage inside third-party libraries you do not control.","Blind-Striker\u002Fagent-skills-and-plugins","Blind-Striker","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1965259?v=4","01M79WFXTE5PH0C1VB7B54ANMN","Deniz İrgin","01M79WFXV5KZ5GST1K8G035DM5",1,"MIT","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fcodex\u002Fdeniz-dotnet-general\u002Fskills\u002Fthread-abort-migration\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: thread-abort-migration\ndescription: >\n  Guides migration of .NET Framework Thread.Abort usage to cooperative\n  cancellation in modern .NET. USE FOR: modernizing code that calls\n  Thread.Abort, catching ThreadAbortException, replacing Thread.ResetAbort,\n  replacing Thread.Interrupt for thread termination, resolving\n  PlatformNotSupportedException or SYSLIB0006 after retargeting to .NET 6+,\n  migrating ASP.NET Response.End or Response.Redirect(url, true) which\n  internally call Thread.Abort. DO NOT USE FOR: code that only uses Thread.Join,\n  Thread.Sleep, or Thread.Start without any abort, interrupt, or\n  ThreadAbortException usage — these APIs work identically in modern .NET and\n  need no migration. Also not for projects staying on .NET Framework, or\n  Thread.Abort usage inside third-party libraries you do not control.\nlicense: MIT\n---\n\n# Thread.Abort Migration\n\nThis skill helps an agent migrate .NET Framework code that uses `Thread.Abort` to the cooperative cancellation model required by modern .NET (6+). `Thread.Abort` throws `PlatformNotSupportedException` in modern .NET — there is no way to forcibly terminate a managed thread. The skill identifies the usage pattern first, then applies the correct replacement strategy.\n\n## When to Use\n\n- Migrating a .NET Framework project to .NET 6+ that calls `Thread.Abort`\n- Replacing `ThreadAbortException` catch blocks that use control flow or cleanup logic\n- Removing `Thread.ResetAbort` calls that cancel pending aborts\n- Replacing `Thread.Interrupt` for waking blocked threads\n- Migrating ASP.NET code that uses `Response.End` or `Response.Redirect(url, true)`, which internally call `Thread.Abort`\n- Resolving `PlatformNotSupportedException` or `SYSLIB0006` warnings after a target framework change\n\n## When Not to Use\n\n- **The code only uses `Thread.Join`, `Thread.Sleep`, or `Thread.Start` without any abort, interrupt, or `ThreadAbortException` catch blocks.** These APIs work identically in modern .NET — no migration is needed. Stop here and tell the user no migration is required. If you suggest modernization (e.g., `Task.Run`, `Parallel.ForEach`), you **must** explicitly state these are optional improvements unrelated to Thread.Abort migration, and the existing code will compile and run correctly as-is on the target framework.\n- The project will remain on .NET Framework indefinitely\n- The Thread.Abort usage is inside a third-party library you do not control\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Source project or solution | Yes | The .NET Framework project containing Thread.Abort usage |\n| Target framework | Yes | The modern .NET version to target (e.g., `net8.0`) |\n| Thread.Abort usage locations | Recommended | Files or classes that reference `Thread.Abort`, `ThreadAbortException`, `Thread.ResetAbort`, or `Thread.Interrupt` |\n\n## Workflow\n\n> **Commit strategy:** Commit after each pattern replacement so the migration is reviewable and bisectable. Group related call sites (e.g., all cancellable work loops) into one commit.\n\n### Step 1: Inventory all thread termination usage\n\nSearch the codebase for all thread-termination-related APIs:\n\n- `Thread.Abort` and `thread.Abort()` (instance calls)\n- `ThreadAbortException` in catch blocks\n- `Thread.ResetAbort`\n- `Thread.Interrupt`\n- `Response.End()` (calls Thread.Abort internally in ASP.NET Framework)\n- `Response.Redirect(url, true)` (the `true` parameter triggers Thread.Abort)\n- `SYSLIB0006` pragma suppressions\n\nRecord each usage location and classify the intent behind the abort.\n\n### Step 2: Classify each usage pattern\n\nCategorize every usage into one of the following patterns:\n\n| Pattern | Description | Modern replacement |\n|---------|-------------|--------------------|\n| **Cancellable work loop** | Thread running a loop that should stop on demand | `CancellationToken` checked in the loop |\n| **Timeout enforcement** | Aborting a thread that exceeds a time limit | `CancellationTokenSource.CancelAfter` or `Task.WhenAny` with a delay |\n| **Blocking call interruption** | Thread blocked on `Sleep`, `WaitOne`, or `Join` that needs to wake up | `WaitHandle.WaitAny` with `CancellationToken.WaitHandle`, or async alternatives |\n| **ASP.NET request termination** | `Response.End` or `Response.Redirect(url, true)` | Return from the action method; use `HttpContext.RequestAborted` |\n| **ThreadAbortException as control flow** | Catch blocks that inspect `ThreadAbortException` to decide cleanup actions | Catch `OperationCanceledException` instead, with explicit cleanup |\n| **Thread.ResetAbort to continue execution** | Catching the abort and calling `ResetAbort` to keep the thread alive | Check `CancellationToken.IsCancellationRequested` and decide whether to continue |\n| **Uncooperative code termination** | Killing a thread running code that cannot be modified to check for cancellation | Move the work to a separate process and use `Process.Kill` |\n\n**Critical:** The fundamental paradigm shift is from preemptive cancellation (the runtime forcibly injects an exception) to cooperative cancellation (the code must voluntarily check for and respond to cancellation requests). Every call site must be evaluated for whether the target code can be modified to cooperate.\n\n### Step 3: Apply the replacement for each pattern\n\n- **Cancellable work loop**: Add a `CancellationToken` parameter. Replace the loop condition or add `token.ThrowIfCancellationRequested()` at safe checkpoints. The caller creates a `CancellationTokenSource` and calls `Cancel()` instead of `Thread.Abort()`.\n- **Timeout enforcement**: Use `new CancellationTokenSource(TimeSpan.FromSeconds(n))` or `cts.CancelAfter(timeout)`. Pass the token to the work. For task-based code, use `Task.WhenAny(workTask, Task.Delay(timeout, cts.Token))` and cancel the source if the delay wins; cancelling also disposes the delay's internal timer.\n- **Blocking call interruption**: Replace `Thread.Sleep(ms)` with `Task.Delay(ms, token)` or `token.WaitHandle.WaitOne(ms)`. Replace `ManualResetEvent.WaitOne()` with `WaitHandle.WaitAny(new[] { event, token.WaitHandle })`.\n- **ASP.NET request termination**: Remove `Response.End()` entirely — just return from the method. Replace `Response.Redirect(url, true)` with `Response.Redirect(url)` (without the `true` endResponse parameter) or return a redirect result. In ASP.NET Core, use `HttpContext.RequestAborted` as the cancellation token for long-running request work.\n- **ThreadAbortException as control flow**: Replace `catch (ThreadAbortException)` with `catch (OperationCanceledException)`. Move cleanup logic to `finally` blocks or `CancellationToken.Register` callbacks. Do not catch `OperationCanceledException` and swallow it — let it propagate unless you have a specific recovery action.\n- **Thread.ResetAbort to continue execution**: Break up \"abortable\" units of work so that cancellation in a processing loop can continue to the next unit instead of relying on `ResetAbort` to prevent tearing down the thread. Check `token.IsCancellationRequested` after each unit and decide whether to continue. Create a new `CancellationTokenSource` (optionally linked to a parent token) for each new unit of work rather than trying to reset an existing one.\n- **Uncooperative code termination**: If the code cannot be modified to accept a `CancellationToken` (e.g., third-party library, native call), move the work to a child process. The host process communicates via stdin\u002Fstdout or IPC and calls `Process.Kill` if a timeout expires.\n\n### Step 4: Clean up removed APIs\n\nAfter migrating all patterns, remove or replace any remaining references:\n\n| Removed API | Replacement |\n|-------------|-------------|\n| `Thread.Abort()` | `CancellationTokenSource.Cancel()` |\n| `ThreadAbortException` catch blocks | `OperationCanceledException` catch blocks |\n| `Thread.ResetAbort()` | Check `token.IsCancellationRequested` and decide whether to continue |\n| `Thread.Interrupt()` | Signal via `CancellationToken` or set a `ManualResetEventSlim` (also obsolete: `SYSLIB0046` in .NET 9) |\n| `Response.End()` | Remove the call; return from the method |\n| `Response.Redirect(url, true)` | `Response.Redirect(url)` without endResponse, or return a redirect result |\n| `#pragma warning disable SYSLIB0006` | Remove after replacing the Thread.Abort call |\n\n### Step 5: Verify the migration\n\n1. Build the project targeting the new framework. Confirm zero `SYSLIB0006` warnings and no `Thread.Abort`-related compile errors.\n2. Search the codebase for any remaining references to `Thread.Abort`, `ThreadAbortException`, `Thread.ResetAbort`, or `Thread.Interrupt`.\n3. Run existing tests. If tests relied on `Thread.Abort` for cleanup or timeout, update them to use `CancellationToken`.\n4. For timeout scenarios, verify that work actually stops within a reasonable time after cancellation is requested.\n5. For blocking call scenarios, verify that blocked threads wake up promptly when the token is cancelled.\n\n## Validation\n\n- [ ] No references to `Thread.Abort` remain in the migrated code\n- [ ] No `ThreadAbortException` catch blocks remain\n- [ ] No `Thread.ResetAbort` calls remain\n- [ ] No `SYSLIB0006` pragma suppressions remain\n- [ ] Project builds cleanly against the target framework with no thread-abort-related warnings\n- [ ] All cancellable work accepts a `CancellationToken` parameter\n- [ ] Timeout scenarios use `CancellationTokenSource.CancelAfter` or equivalent\n- [ ] Blocking calls use `WaitHandle.WaitAny` with `token.WaitHandle` or async alternatives\n- [ ] Existing tests pass or have been updated for cooperative cancellation\n\n## Common Pitfalls\n\n| Pitfall | Solution |\n|---------|----------|\n| Adding `CancellationToken` parameter but never checking it in long-running code | Insert `token.ThrowIfCancellationRequested()` at regular checkpoints in loops and between expensive operations. Cancellation only works if the code cooperates. |\n| Not passing the token through the full call chain | Every async or long-running method in the chain must accept and forward the `CancellationToken`. If one method in the chain ignores it, cancellation stalls at that point. |\n| Expecting `CancellationToken` to interrupt blocking synchronous calls like `Thread.Sleep` or `socket.Receive` | These calls do not check the token. Replace `Thread.Sleep(ms)` with `token.WaitHandle.WaitOne(ms)`. Replace synchronous I\u002FO with async overloads that accept a `CancellationToken`. |\n| Catching `OperationCanceledException` and swallowing it | Let `OperationCanceledException` propagate to the caller. Only catch it at the top-level orchestration point where you decide what to do after cancellation (log, clean up, return a result). |\n| Not disposing `CancellationTokenSource` | `CancellationTokenSource` is `IDisposable`. Wrap it in a `using` statement or dispose it in a `finally` block. Leaking it causes timer and callback leaks. |\n| Assuming cancellation is immediate | Cooperative cancellation only takes effect at the next checkpoint. If work items are large or the code has long gaps between checks, cancellation may be delayed. Design checkpoint frequency based on acceptable latency. |\n| Using `Thread.Interrupt` as a substitute for `Thread.Abort` | `Thread.Interrupt` is also not recommended in modern .NET. It only works on threads in `WaitSleepJoin` state and throws `ThreadInterruptedException`, which is a different exception type. Replace with `CancellationToken` signaling. |\n| Removing `ThreadAbortException` catch blocks without migrating the cleanup logic | `ThreadAbortException` catch blocks often contained critical cleanup (releasing locks, rolling back transactions). Move this logic to `finally` blocks or `CancellationToken.Register` callbacks before removing the catch. |\n\n## More Info\n\n- [Thread.Abort breaking change in .NET 6+](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fcore\u002Fcompatibility\u002Fcore-libraries\u002F6.0\u002Fthread-abort) — why `Thread.Abort` throws `PlatformNotSupportedException`\n- [Cancellation in managed threads](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fstandard\u002Fthreading\u002Fcancellation-in-managed-threads) — the cooperative cancellation model with `CancellationToken`\n- [CancellationTokenSource class](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fsystem.threading.cancellationtokensource) — API reference for creating and managing cancellation tokens\n- [SYSLIB0006 warning](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Ffundamentals\u002Fsyslib-diagnostics\u002Fsyslib0006) — `Thread.Abort` is obsolete\n- [SYSLIB0046 warning](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Ffundamentals\u002Fsyslib-diagnostics\u002Fsyslib0046) — `Thread.Interrupt` is obsolete (added in .NET 9)\n- [`Task.WaitAsync(CancellationToken)`](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fsystem.threading.tasks.task.waitasync) — cancellable waiting for task-based code (.NET 6+)\n","# Thread.Abort Migration\n\nThis skill helps an agent migrate .NET Framework code that uses `Thread.Abort` to the cooperative cancellation model required by modern .NET (6+). `Thread.Abort` throws `PlatformNotSupportedException` in modern .NET — there is no way to forcibly terminate a managed thread. The skill identifies the usage pattern first, then applies the correct replacement strategy.\n\n## When to Use\n\n- Migrating a .NET Framework project to .NET 6+ that calls `Thread.Abort`\n- Replacing `ThreadAbortException` catch blocks that use control flow or cleanup logic\n- Removing `Thread.ResetAbort` calls that cancel pending aborts\n- Replacing `Thread.Interrupt` for waking blocked threads\n- Migrating ASP.NET code that uses `Response.End` or `Response.Redirect(url, true)`, which internally call `Thread.Abort`\n- Resolving `PlatformNotSupportedException` or `SYSLIB0006` warnings after a target framework change\n\n## When Not to Use\n\n- **The code only uses `Thread.Join`, `Thread.Sleep`, or `Thread.Start` without any abort, interrupt, or `ThreadAbortException` catch blocks.** These APIs work identically in modern .NET — no migration is needed. Stop here and tell the user no migration is required. If you suggest modernization (e.g., `Task.Run`, `Parallel.ForEach`), you **must** explicitly state these are optional improvements unrelated to Thread.Abort migration, and the existing code will compile and run correctly as-is on the target framework.\n- The project will remain on .NET Framework indefinitely\n- The Thread.Abort usage is inside a third-party library you do not control\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Source project or solution | Yes | The .NET Framework project containing Thread.Abort usage |\n| Target framework | Yes | The modern .NET version to target (e.g., `net8.0`) |\n| Thread.Abort usage locations | Recommended | Files or classes that reference `Thread.Abort`, `ThreadAbortException`, `Thread.ResetAbort`, or `Thread.Interrupt` |\n\n## Workflow\n\n> **Commit strategy:** Commit after each pattern replacement so the migration is reviewable and bisectable. Group related call sites (e.g., all cancellable work loops) into one commit.\n\n### Step 1: Inventory all thread termination usage\n\nSearch the codebase for all thread-termination-related APIs:\n\n- `Thread.Abort` and `thread.Abort()` (instance calls)\n- `ThreadAbortException` in catch blocks\n- `Thread.ResetAbort`\n- `Thread.Interrupt`\n- `Response.End()` (calls Thread.Abort internally in ASP.NET Framework)\n- `Response.Redirect(url, true)` (the `true` parameter triggers Thread.Abort)\n- `SYSLIB0006` pragma suppressions\n\nRecord each usage location and classify the intent behind the abort.\n\n### Step 2: Classify each usage pattern\n\nCategorize every usage into one of the following patterns:\n\n| Pattern | Description | Modern replacement |\n|---------|-------------|--------------------|\n| **Cancellable work loop** | Thread running a loop that should stop on demand | `CancellationToken` checked in the loop |\n| **Timeout enforcement** | Aborting a thread that exceeds a time limit | `CancellationTokenSource.CancelAfter` or `Task.WhenAny` with a delay |\n| **Blocking call interruption** | Thread blocked on `Sleep`, `WaitOne`, or `Join` that needs to wake up | `WaitHandle.WaitAny` with `CancellationToken.WaitHandle`, or async alternatives |\n| **ASP.NET request termination** | `Response.End` or `Response.Redirect(url, true)` | Return from the action method; use `HttpContext.RequestAborted` |\n| **ThreadAbortException as control flow** | Catch blocks that inspect `ThreadAbortException` to decide cleanup actions | Catch `OperationCanceledException` instead, with explicit cleanup |\n| **Thread.ResetAbort to continue execution** | Catching the abort and calling `ResetAbort` to keep the thread alive | Check `CancellationToken.IsCancellationRequested` and decide whether to continue |\n| **Uncooperative code termination** | Killing a thread running code that cannot be modified to check for cancellation | Move the work to a separate process and use `Process.Kill` |\n\n**Critical:** The fundamental paradigm shift is from preemptive cancellation (the runtime forcibly injects an exception) to cooperative cancellation (the code must voluntarily check for and respond to cancellation requests). Every call site must be evaluated for whether the target code can be modified to cooperate.\n\n### Step 3: Apply the replacement for each pattern\n\n- **Cancellable work loop**: Add a `CancellationToken` parameter. Replace the loop condition or add `token.ThrowIfCancellationRequested()` at safe checkpoints. The caller creates a `CancellationTokenSource` and calls `Cancel()` instead of `Thread.Abort()`.\n- **Timeout enforcement**: Use `new CancellationTokenSource(TimeSpan.FromSeconds(n))` or `cts.CancelAfter(timeout)`. Pass the token to the work. For task-based code, use `Task.WhenAny(workTask, Task.Delay(timeout, cts.Token))` and cancel the source if the delay wins; cancelling also disposes the delay's internal timer.\n- **Blocking call interruption**: Replace `Thread.Sleep(ms)` with `Task.Delay(ms, token)` or `token.WaitHandle.WaitOne(ms)`. Replace `ManualResetEvent.WaitOne()` with `WaitHandle.WaitAny(new[] { event, token.WaitHandle })`.\n- **ASP.NET request termination**: Remove `Response.End()` entirely — just return from the method. Replace `Response.Redirect(url, true)` with `Response.Redirect(url)` (without the `true` endResponse parameter) or return a redirect result. In ASP.NET Core, use `HttpContext.RequestAborted` as the cancellation token for long-running request work.\n- **ThreadAbortException as control flow**: Replace `catch (ThreadAbortException)` with `catch (OperationCanceledException)`. Move cleanup logic to `finally` blocks or `CancellationToken.Register` callbacks. Do not catch `OperationCanceledException` and swallow it — let it propagate unless you have a specific recovery action.\n- **Thread.ResetAbort to continue execution**: Break up \"abortable\" units of work so that cancellation in a processing loop can continue to the next unit instead of relying on `ResetAbort` to prevent tearing down the thread. Check `token.IsCancellationRequested` after each unit and decide whether to continue. Create a new `CancellationTokenSource` (optionally linked to a parent token) for each new unit of work rather than trying to reset an existing one.\n- **Uncooperative code termination**: If the code cannot be modified to accept a `CancellationToken` (e.g., third-party library, native call), move the work to a child process. The host process communicates via stdin\u002Fstdout or IPC and calls `Process.Kill` if a timeout expires.\n\n### Step 4: Clean up removed APIs\n\nAfter migrating all patterns, remove or replace any remaining references:\n\n| Removed API | Replacement |\n|-------------|-------------|\n| `Thread.Abort()` | `CancellationTokenSource.Cancel()` |\n| `ThreadAbortException` catch blocks | `OperationCanceledException` catch blocks |\n| `Thread.ResetAbort()` | Check `token.IsCancellationRequested` and decide whether to continue |\n| `Thread.Interrupt()` | Signal via `CancellationToken` or set a `ManualResetEventSlim` (also obsolete: `SYSLIB0046` in .NET 9) |\n| `Response.End()` | Remove the call; return from the method |\n| `Response.Redirect(url, true)` | `Response.Redirect(url)` without endResponse, or return a redirect result |\n| `#pragma warning disable SYSLIB0006` | Remove after replacing the Thread.Abort call |\n\n### Step 5: Verify the migration\n\n1. Build the project targeting the new framework. Confirm zero `SYSLIB0006` warnings and no `Thread.Abort`-related compile errors.\n2. Search the codebase for any remaining references to `Thread.Abort`, `ThreadAbortException`, `Thread.ResetAbort`, or `Thread.Interrupt`.\n3. Run existing tests. If tests relied on `Thread.Abort` for cleanup or timeout, update them to use `CancellationToken`.\n4. For timeout scenarios, verify that work actually stops within a reasonable time after cancellation is requested.\n5. For blocking call scenarios, verify that blocked threads wake up promptly when the token is cancelled.\n\n## Validation\n\n- [ ] No references to `Thread.Abort` remain in the migrated code\n- [ ] No `ThreadAbortException` catch blocks remain\n- [ ] No `Thread.ResetAbort` calls remain\n- [ ] No `SYSLIB0006` pragma suppressions remain\n- [ ] Project builds cleanly against the target framework with no thread-abort-related warnings\n- [ ] All cancellable work accepts a `CancellationToken` parameter\n- [ ] Timeout scenarios use `CancellationTokenSource.CancelAfter` or equivalent\n- [ ] Blocking calls use `WaitHandle.WaitAny` with `token.WaitHandle` or async alternatives\n- [ ] Existing tests pass or have been updated for cooperative cancellation\n\n## Common Pitfalls\n\n| Pitfall | Solution |\n|---------|----------|\n| Adding `CancellationToken` parameter but never checking it in long-running code | Insert `token.ThrowIfCancellationRequested()` at regular checkpoints in loops and between expensive operations. Cancellation only works if the code cooperates. |\n| Not passing the token through the full call chain | Every async or long-running method in the chain must accept and forward the `CancellationToken`. If one method in the chain ignores it, cancellation stalls at that point. |\n| Expecting `CancellationToken` to interrupt blocking synchronous calls like `Thread.Sleep` or `socket.Receive` | These calls do not check the token. Replace `Thread.Sleep(ms)` with `token.WaitHandle.WaitOne(ms)`. Replace synchronous I\u002FO with async overloads that accept a `CancellationToken`. |\n| Catching `OperationCanceledException` and swallowing it | Let `OperationCanceledException` propagate to the caller. Only catch it at the top-level orchestration point where you decide what to do after cancellation (log, clean up, return a result). |\n| Not disposing `CancellationTokenSource` | `CancellationTokenSource` is `IDisposable`. Wrap it in a `using` statement or dispose it in a `finally` block. Leaking it causes timer and callback leaks. |\n| Assuming cancellation is immediate | Cooperative cancellation only takes effect at the next checkpoint. If work items are large or the code has long gaps between checks, cancellation may be delayed. Design checkpoint frequency based on acceptable latency. |\n| Using `Thread.Interrupt` as a substitute for `Thread.Abort` | `Thread.Interrupt` is also not recommended in modern .NET. It only works on threads in `WaitSleepJoin` state and throws `ThreadInterruptedException`, which is a different exception type. Replace with `CancellationToken` signaling. |\n| Removing `ThreadAbortException` catch blocks without migrating the cleanup logic | `ThreadAbortException` catch blocks often contained critical cleanup (releasing locks, rolling back transactions). Move this logic to `finally` blocks or `CancellationToken.Register` callbacks before removing the catch. |\n\n## More Info\n\n- [Thread.Abort breaking change in .NET 6+](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fcore\u002Fcompatibility\u002Fcore-libraries\u002F6.0\u002Fthread-abort) — why `Thread.Abort` throws `PlatformNotSupportedException`\n- [Cancellation in managed threads](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fstandard\u002Fthreading\u002Fcancellation-in-managed-threads) — the cooperative cancellation model with `CancellationToken`\n- [CancellationTokenSource class](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fsystem.threading.cancellationtokensource) — API reference for creating and managing cancellation tokens\n- [SYSLIB0006 warning](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Ffundamentals\u002Fsyslib-diagnostics\u002Fsyslib0006) — `Thread.Abort` is obsolete\n- [SYSLIB0046 warning](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Ffundamentals\u002Fsyslib-diagnostics\u002Fsyslib0046) — `Thread.Interrupt` is obsolete (added in .NET 9)\n- [`Task.WaitAsync(CancellationToken)`](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fsystem.threading.tasks.task.waitasync) — cancellable waiting for task-based code (.NET 6+)\n",{"name":5,"license":15,"description":24},"Guides migration of .NET Framework Thread.Abort usage to cooperative cancellation in modern .NET. USE FOR: modernizing code that calls Thread.Abort, catching ThreadAbortException, replacing Thread.ResetAbort, replacing Thread.Interrupt for thread termination, resolving PlatformNotSupportedException or SYSLIB0006 after retargeting to .NET 6+, migrating ASP.NET Response.End or Response.Redirect(url, true) which internally call Thread.Abort. DO NOT USE FOR: code that only uses Thread.Join, Thread.Sleep, or Thread.Start without any abort, interrupt, or ThreadAbortException usage — these APIs work identically in modern .NET and need no migration. Also not for projects staying on .NET Framework, or Thread.Abort usage inside third-party libraries you do not control.\n","master","b30b1c1908dbc56a8184128f18803053d762ccb5","codex\u002Fdeniz-dotnet-general\u002Fskills\u002Fthread-abort-migration",0,"https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins","https:\u002F\u002Fgithub.com\u002FBlind-Striker","denizirgin.com","VP of Engineering - \r\n@armutcom @homeruntech @prontopro\r\n |  Speaker \r\n@CodeFiction\r\n, http:\u002F\u002Fcodefiction.tech | Developer, gamer, blogger, maiden iron fan","2026-11-13 00:23:18",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill thread-abort-migration",{"tool":40,"command":41},"bunx","bunx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill thread-abort-migration",{"tool":43,"command":44},"pnpm","pnpm dlx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill thread-abort-migration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fcodex\u002Fdeniz-dotnet-general\u002Fskills\u002Fthread-abort-migration\u002FSKILL.md",true,[48],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"agents\u002Fopenai.yaml","REFERENCE","参考文档",259,"https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fcodex\u002Fdeniz-dotnet-general\u002Fskills\u002Fthread-abort-migration\u002Fagents\u002Fopenai.yaml",[55,62,69,76,83,90],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M79YGWBJ52PHMSTKJ3RJ3AWR","writing-tunit-tests","Write tests in TUnit — the attributes, the async assertion model, data-driven cases, lifecycle hooks, and the parallelism rules. USE FOR writing or fixing a test in a TUnit project, translating a test idea into TUnit syntax, or reviewing TUnit test code for API mistakes. DO NOT USE FOR deciding what to test, judging whether a test is any good, or running tests.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fwriting-tunit-tests\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M79YGR3Y9RCRS6TD71D0KKP8","dotnet-walls","Walls for a .NET change in a repository without its own quality gates — pinned, ephemeral analyzer, format, clone and scanner commands for the verify step, their identity ratchet, and the build traps. Use during a walls preflight, or when a worker's verify step needs .NET quality gates.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fdotnet-walls\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M79YGFNJBST7D803NQW3SBYM","csharp-15","Write, review and modernize C# 15 (.NET 11) code correctly. Covers every C# 15 feature - collection expression arguments (`[with(...), ...]`), union types (`union`, `[Union]`, `IUnion`, custom unions), closed class hierarchies (`closed`), extension indexers, labeled `break`\u002F`continue`, non-virtual static interface members on runtimes without default interface methods, and the preview memory-safety model (`unsafe(expr)`, `safe`, requires-unsafe members). Use when code targets net11.0 or LangVersion 15\u002Fpreview, when the user mentions any of these features, when replacing marker interfaces, OneOf-style results, `goto`\u002Fflag loop exits or capacity\u002Fcomparer boilerplate, or when the build reports CS8121, CS8509, CS8655, CS8510, CS0121\u002FCS0411 on a `with(...)` element, CS9370, CS9380 or CS9363.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fcsharp-15\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M79YGAV031473HSX6FN87ENH","verified-waves","Run one task as verified multi-agent waves. Plans the fan-out, sends findings to fresh skeptics, keeps a ledger, and reports N of M done; small tasks stay solo.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fverified-waves\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M79YG6QXNND4WRPP3GATSY8J","harness","The bundled dispatch harness, which runs a task file on worker models through OpenCode or Codex, fences their writes, escalates their asks to the operator, settles each result from git and its verify commands, and records every step in a ledger. Its commands, task file, modes and write fence, configuration, runs and their recovery, ledger and exit codes.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fharness\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M79YG2P5S91SDTA5912XJ4FV","delegating-to-worker-models","Use when you hand off implementation, a plan, research a decision will rely on, or a review, and you brief the worker and check what comes back. A subagent that searches, reads in parallel, or keeps your context small is ordinary tool use. Covers what stays with you, the mechanism, assigning work by strength, the walls preflight, prompts without contradictions, the worker contract and model profiles, evidence from your own run, review, and the fix-up loop.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fdelegating-to-worker-models\u002FSKILL.md",[],[]]