Individual skill
cancellable-loop
Example skill — demonstrates cooperative cancellation inside a skill script loop using check_cancelled(). Use as a reference when writing long-running domain skills that must respond to notifications/cancelled. Not intended for production use.
examples/skills/cancellable-loop/SKILL.md
Source commit bcd69852790ee657b7543e83b122ea2cb965beb5
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 7, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 73
- Repository last updated
- Nov 7, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 2,015 bytesSKILL.mdcore · 2,015 bytesSKILL.mdcore · 2,015 bytesSKILL.mdcore · 2,015 bytesscripts/count.pyruns · 2,449 bytes
Read excerpt
# Cancellable Loop
A minimal example that shows how to write a skill script that honours
`notifications/cancelled` from the MCP client.
The pattern is simple: call `check_cancelled()` at the top of every
iteration of a long-running loop. When the dispatcher installs a
`CancelToken` and the client cancels the request, `check_cancelled()`
raises `CancelledError` and the script unwinds cleanly. Outside of a
request context (REPL, unit tests) `check_cancelled()` is a no-op, so
the same script remains easy to run in isolation.
## Tools