cancellable-loop SKILL.md skillA
cancellable-loop from dcc-mcp/dcc-mcp-core is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add dcc-mcp/dcc-mcp-core/cancellable-loop@git:20260927.f5cfb64Pins git:20260927.f5cfb64 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- dcc-mcp/dcc-mcp-core
- Path
examples/skills/cancellable-loop/SKILL.md- Versions recorded
- 4
- Latest version
- git:20260927.f5cfb64, committed Sep 27, 2026
- First version recorded
- Apr 21, 2026
- Size
- 2,015 bytes
- Repository stars
- 74
- License
- MIT
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.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 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
- `cancellable_loop__count` — Iterate `iterations` times, sleeping
`sleep_ms` milliseconds per step, checking for cancellation each
iteration.
## Example
```python
{"name": "cancellable_loop__count", "arguments": {"iterations": 100, "sleep_ms": 50}}
# → {"success": true, "message": "Completed 100 iterations", "context": {"iterations": 100}}
```
If the client sends `notifications/cancelled` while the loop is
running, the next `check_cancelled()` call raises `CancelledError` and
the `@skill_entry` wrapper converts it into a standard error dict.
## Related
- `dcc_mcp_core.check_cancelled` — the API this skill demonstrates.
…Read the whole file at its exact version.
How to install
mdr add dcc-mcp/dcc-mcp-core/cancellable-loop@sha256:ffc75f4282670194The line at the top of this page pins the label git:20260927.f5cfb64, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_2tgcscjevclyrbz4)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 4 versions of this file, between Apr 21, 2026 and Sep 27, 2026, about one every 53 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260927.f5cfb64 latest | 2026-09-27 | f5cfb64 | 2,015 B | A | view · diff |
| git:20260505.5c57b27 | 2026-05-05 | 5c57b27 | 1,891 B | A | view · diff |
| git:20260422.2082784 | 2026-04-22 | 2082784 | 1,910 B | A | view · diff |
| v1.0.0 | 2026-04-21 | cc78559 | 1,733 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (2015 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
dcc-mcp/dcc-mcp-core · 74 stars · license MIT · pushed 2026-11-02 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_2tgcscjevclyrbz4 GET https://markdownregistry.com/api/v1/resolve?ref=dcc-mcp/dcc-mcp-core/cancellable-loop GET https://markdownregistry.com/api/v1/blob/ffc75f4282670194cbd8c03e5b977ddbf19088aed99e2ea6cba1077b1aa131e9
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.