Borrowing it
Nothing to install: this file belongs to lewing/helix.mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/lewing/helix.mcp/main/.copilot/skills/cancellation-vs-timeout/SKILL.mdgit clone --depth 1 https://github.com/lewing/helix.mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/lewing/helix.mcp/cancellation-vs-timeout)<a href="https://agentmods.dev/skills/lewing/helix.mcp/cancellation-vs-timeout"><img src="https://agentmods.dev/badge/skills/lewing/helix.mcp/cancellation-vs-timeout/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/lewing/helix.mcp/cancellation-vs-timeout"><img src="https://agentmods.dev/badge/skills/lewing/helix.mcp/cancellation-vs-timeout.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00352 |
| Opus 5 | $0.00000 | $0.00176 |
| Sonnet 5 | $0.00000 | $0.00070 |
| Haiku 4.5 | $0.00000 | $0.00035 |
Grade A, and why
cancellation-vs-timeout scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Skill: Distinguishing HTTP Timeout from Cancellation in .NET
Confidence: low Source: earned
Problem
When wrapping async HTTP calls with CancellationToken support, both HTTP timeouts and intentional cancellation throw TaskCanceledException. You need to distinguish them to provide different error messages (e.g., "request timed out" vs. letting cancellation propagate).
Wrong Pattern
catch (TaskCanceledException ex) when (ex.CancellationToken == cancellationToken)
{
throw; // Intended as "real cancellation"
}
catch (TaskCanceledException ex)
{
throw new MyException("Request timed out.", ex); // Intended as timeout
}
Why it fails: When cancellationToken is CancellationToken.None (from = default) and the TaskCanceledException is constructed without a token (also CancellationToken.None), the equality check matches — treating a timeout as cancellation.
Correct Pattern
catch (TaskCanceledException) when (cancellationToken.IsCancellationRequested)
{
throw; // Real cancellation — the caller's token was triggered
}
catch (TaskCanceledException ex)
{
throw new MyException("Request timed out.", ex); // HTTP timeout
}
Why it works: IsCancellationRequested checks whether the caller's token was actually signaled. If it wasn't, the TaskCanceledException must have come from an HTTP timeout. This is semantically correct regardless of how the exception was constructed.
When to Apply
Any time you're catching TaskCanceledException in a method with a CancellationToken cancellationToken = default parameter and need to distinguish timeout from cancellation.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 43 lines · 0 tokens per session scan A 12d3a770a9ca
cancellation-vs-timeout is a skill published in the GitHub repository lewing/helix.mcp (4 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 352 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
debug
Systematic 4-phase debugging with escalation protocol. Use when saying "debug", "investigate bug", "find root cause", "why is this failing", or "fix this bug".
argot-refresh
Refresh Argot's committed fit snapshot safely — first diagnose why maintenance is recommended, re-audit corpus scope and structural path changes, review stale mutes and policy entries with the user, then fit locally, verify, and prepare the reviewed .argot/ update. Use when argot status, argot check, MCP, or CI…
docverity
Check whether a project's documentation still matches its code, and report stale or wrong claims with suggested fixes. Use this after editing, renaming, moving, or deleting source files, CLI flags, environment variables, or functions, to catch docs you may have just made inaccurate; when the user asks whether the…
code_explorer
Explores the repository to locate primary source files, coupled UI components, and test files for bug reports or feature requests.
session-investigator
Investigate fast-agent session and history files to diagnose issues. Use when a session ended unexpectedly, when debugging tool loops, when correlating sub-agent traces with main sessions, or when analyzing conversation flow and timing. Covers session.json metadata, history JSON format, message structure, tool…
smiles-validation
Strict SMILES validation, structural comparison, and modification verification. Catches invalid LLM-generated molecules.