Aspnet Core
fanslead/ReverseProxy.Store
Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development.
Guides migration of .NET Framework Thread.Abort usage to cooperative cancellation in modern .NET.
$ npx skills add dotnet/skills --skill thread-abort-migration -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install dotnet/skills thread-abort-migration --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/dotnet-upgrade/skills/thread-abort-migration .claude/skills/thread-abort-migration && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "thread-abort-migration" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-upgrade/skills/thread-abort-migration into .claude/skills/thread-abort-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "thread-abort-migration", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/dotnet/skills/tree/main/plugins/dotnet-upgrade/skills/thread-abort-migrationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add dotnet/skills --skill thread-abort-migration -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install dotnet/skills thread-abort-migration --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/dotnet-upgrade/skills/thread-abort-migration .agents/skills/thread-abort-migration && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "thread-abort-migration" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-upgrade/skills/thread-abort-migration into .agents/skills/thread-abort-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "thread-abort-migration", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dotnet/skills --skill thread-abort-migration -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install dotnet/skills thread-abort-migration --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/dotnet-upgrade/skills/thread-abort-migration .cursor/skills/thread-abort-migration && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "thread-abort-migration" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-upgrade/skills/thread-abort-migration into .cursor/skills/thread-abort-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "thread-abort-migration", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/dotnet/skills.git --path plugins/dotnet-upgrade/skills/thread-abort-migration--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add dotnet/skills --skill thread-abort-migration -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install dotnet/skills thread-abort-migration --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/dotnet-upgrade/skills/thread-abort-migration .gemini/skills/thread-abort-migration && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "thread-abort-migration" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-upgrade/skills/thread-abort-migration into .gemini/skills/thread-abort-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "thread-abort-migration", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install dotnet/skills thread-abort-migrationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add dotnet/skills --skill thread-abort-migration -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/dotnet-upgrade/skills/thread-abort-migration .github/skills/thread-abort-migration && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "thread-abort-migration" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-upgrade/skills/thread-abort-migration into .github/skills/thread-abort-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "thread-abort-migration", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dotnet/skills --skill thread-abort-migration -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install dotnet/skills thread-abort-migration --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/dotnet-upgrade/skills/thread-abort-migration .opencode/skills/thread-abort-migration && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "thread-abort-migration" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-upgrade/skills/thread-abort-migration into .opencode/skills/thread-abort-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "thread-abort-migration", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
thread-abort-migrationGuides migration of .NET Framework Thread.Abort usage to cooperative cancellation in modern .NET.
Thread Abort Migration is an agent skill from dotnet/skills, published by the product's own GitHub organization. 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…
Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It works with .NET and ASP.NET Core. The repository describes itself as: Repository for skills to assist AI coding agents with .NET and C. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 8d670fa. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
learn.microsoft.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Thread Abort Migration loads about 3.2k tokens when it runs. Until then it costs about 198 tokens; SKILL.md has 1,350 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from dotnet/skills at commit 8d670fa, republished under its MIT licence (© dotnet). 1,350 words, ~3,202 tokens.
.claude/skills/thread-abort-migration/SKILL.md (or your agent's skills folder).This 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.
Thread.AbortThreadAbortException catch blocks that use control flow or cleanup logicThread.ResetAbort calls that cancel pending abortsThread.Interrupt for waking blocked threadsResponse.End or Response.Redirect(url, true), which internally call Thread.AbortPlatformNotSupportedException or SYSLIB0006 warnings after a target framework changeThread.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.| Input | Required | Description |
|---|---|---|
| Source project or solution | Yes | The .NET Framework project containing Thread.Abort usage |
| Target framework | Yes | The modern .NET version to target (e.g., net8.0) |
| Thread.Abort usage locations | Recommended | Files or classes that reference Thread.Abort, ThreadAbortException, Thread.ResetAbort, or Thread.Interrupt |
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.
Search the codebase for all thread-termination-related APIs:
Thread.Abort and thread.Abort() (instance calls)ThreadAbortException in catch blocksThread.ResetAbortThread.InterruptResponse.End() (calls Thread.Abort internally in ASP.NET Framework)Response.Redirect(url, true) (the true parameter triggers Thread.Abort)SYSLIB0006 pragma suppressionsRecord each usage location and classify the intent behind the abort.
Categorize every usage into one of the following patterns:
| Pattern | Description | Modern replacement |
|---|---|---|
| Cancellable work loop | Thread running a loop that should stop on demand | CancellationToken checked in the loop |
| Timeout enforcement | Aborting a thread that exceeds a time limit | CancellationTokenSource.CancelAfter or Task.WhenAny with a delay |
| Blocking call interruption | Thread blocked on Sleep, WaitOne, or Join that needs to wake up | WaitHandle.WaitAny with CancellationToken.WaitHandle, or async alternatives |
| ASP.NET request termination | Response.End or Response.Redirect(url, true) | Return from the action method; use HttpContext.RequestAborted |
| ThreadAbortException as control flow | Catch blocks that inspect ThreadAbortException to decide cleanup actions | Catch OperationCanceledException instead, with explicit cleanup |
| Thread.ResetAbort to continue execution | Catching the abort and calling ResetAbort to keep the thread alive | Check CancellationToken.IsCancellationRequested and decide whether to continue |
| 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 |
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.
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().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.Thread.Sleep(ms) with Task.Delay(ms, token) or token.WaitHandle.WaitOne(ms). Replace ManualResetEvent.WaitOne() with WaitHandle.WaitAny(new[] { event, token.WaitHandle }).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.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.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.CancellationToken (e.g., third-party library, native call), move the work to a child process. The host process communicates via stdin/stdout or IPC and calls Process.Kill if a timeout expires.After migrating all patterns, remove or replace any remaining references:
| Removed API | Replacement |
|---|---|
Thread.Abort() | CancellationTokenSource.Cancel() |
ThreadAbortException catch blocks | OperationCanceledException catch blocks |
Thread.ResetAbort() | Check token.IsCancellationRequested and decide whether to continue |
Thread.Interrupt() | Signal via CancellationToken or set a ManualResetEventSlim (also obsolete: SYSLIB0046 in .NET 9) |
Response.End() | Remove the call; return from the method |
Response.Redirect(url, true) | Response.Redirect(url) without endResponse, or return a redirect result |
#pragma warning disable SYSLIB0006 | Remove after replacing the Thread.Abort call |
SYSLIB0006 warnings and no Thread.Abort-related compile errors.Thread.Abort, ThreadAbortException, Thread.ResetAbort, or Thread.Interrupt.Thread.Abort for cleanup or timeout, update them to use CancellationToken.Thread.Abort remain in the migrated codeThreadAbortException catch blocks remainThread.ResetAbort calls remainSYSLIB0006 pragma suppressions remainCancellationToken parameterCancellationTokenSource.CancelAfter or equivalentWaitHandle.WaitAny with token.WaitHandle or async alternatives| Pitfall | Solution |
|---|---|
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. |
| 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. |
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/O with async overloads that accept a CancellationToken. |
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). |
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. |
| 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. |
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. |
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. |
Thread.Abort throws PlatformNotSupportedExceptionCancellationTokenThread.Abort is obsoleteThread.Interrupt is obsolete (added in .NET 9)Task.WaitAsync(CancellationToken) — cancellable waiting for task-based code (.NET 6+)© dotnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/dotnet-upgrade/skills/thread-abort-migration of dotnet/skills.
Open the folder on GitHubat commit 8d670fa
We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in dotnet/skills, which our catalogue first saw on October 7, 2026.
Thread Abort Migration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Thread Abort Migration this skilldotnet/skills | 5.6k | 1 repos | ~3.2k | Automated safety check: Pass | MIT | |
| Aspnet Corefanslead/ReverseProxy.Store | 163 | 2 repos | ~1.4k | Automated safety check: Pass | Apache-2.0 | |
| Prepare Releasemicrosoft/FeatureManagement-Dotnet | 1.2k | — | ~1.3k | Automated safety check: Pass | MIT | |
| Aspire Integration TestingDevBetterCom/DevBetterWeb | 157 | 2 repos | ~2.3k | Automated safety check: Pass | None | |
| Tsp Csharpquerylenshq/ef-querylens | 225 | — | ~1.3k | Automated safety check: Pass | MIT | |
| Verify Authendpointsmadeyoga/AuthEndpoints | 121 | — | ~2.6k | Automated safety check: Pass | MIT |
fanslead/ReverseProxy.Store
Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development.
microsoft/FeatureManagement-Dotnet
Prepare a release for the Feature Management .NET SDK. An agent skill from microsoft/FeatureManagement-Dotnet.
DevBetterCom/DevBetterWeb
Write integration tests using .NET Aspire's testing facilities with xUnit.
querylenshq/ef-querylens
Comprehensive C and .NET development skill for TSP projects.
madeyoga/AuthEndpoints
Drive the AuthEndpoints HTTP API via the in-repo test host (cookie sessions, Identity bearer, Simple JWT, CSRF, ReAuth).
niltor/DeepSeekSDK-NET
Work on this repository's .NET/C SDK code, including API models, HTTP behavior, Microsoft.Extensions.AI adapters, ASP.NET Core DI, builds, and tests.
dotnet/skills
Resolves .NET runtime frames in Apple .ips crash logs to function names, source files and line numbers using dSYM symbols, atos and the Microsoft symbol server.
dotnet/skills
Resolves native crash frames from .NET Android tombstones to function names, source files and line numbers using BuildIds, Microsoft's symbol server and llvm-symbolizer.
dotnet/skills
Scans C# and .NET code for about 50 performance anti-patterns and reports prioritized findings with concrete fixes, at a scan depth you choose.
dotnet/skills
Statically pairs source files with test files to list code that no test references, using Roslyn for C# or tree-sitter for many languages, with no build.
dotnet/skills
Activate this skill when BenchmarkDotNet (BDN) is involved in the task — creating, running, configuring, or reviewing BDN benchmarks.
dotnet/skills
Makes .NET projects compatible with Native AOT and trimming by resolving IL trim and AOT analyzer warnings through annotations rather than suppressions.
Works with
Guides migration of .NET Framework Thread.Abort usage to cooperative cancellation in modern .NET. Thread Abort Migration is an agent skill from dotnet/skills, published by the product's own GitHub organization.NET.
Thread Abort Migration fits situations like: : modernizing code that calls Thread.Abort; catching ThreadAbortException; replacing Thread.ResetAbort; replacing Thread.Interrupt for thread termination.
Run `npx skills add dotnet/skills --skill thread-abort-migration -a claude-code`. Or copy the skill folder (plugins/dotnet-upgrade/skills/thread-abort-migration in dotnet/skills) into .claude/skills/thread-abort-migration in your project. Claude Code loads it when a task matches its description.
Run `npx skills add dotnet/skills --skill thread-abort-migration -a codex`. Or copy the skill folder (plugins/dotnet-upgrade/skills/thread-abort-migration in dotnet/skills) into .agents/skills/thread-abort-migration in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dotnet/skills --skill thread-abort-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/thread-abort-migration, .gemini/skills/thread-abort-migration, .github/skills/thread-abort-migration and .opencode/skills/thread-abort-migration in your project.
SKILL.md names no scripts, command-line tools or credentials: Thread Abort Migration is instructions for the agent only.
SKILL.md names 1 domain. As links in the text: learn.microsoft.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Thread Abort Migration is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Thread Abort Migration: Aspnet Core (fanslead/ReverseProxy.Store, 163 stars), Prepare Release (microsoft/FeatureManagement-Dotnet, 1.2k stars), Aspire Integration Testing (DevBetterCom/DevBetterWeb, 157 stars) and Tsp Csharp (querylenshq/ef-querylens, 225 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
dotnet (a GitHub organization, an official publisher) maintains it in dotnet/skills, which has 5,568 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 7, 2026.
Source: dotnet/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.