Roslyn-Backed-MCP: Skill for Claude Code

.claude/skills/recover-stalled-subagent/SKILL.md

recover-stalled-subagent is a skill for Claude Code from darylmcd/Roslyn-Backed-MCP. It costs 131 tokens per session (3,930 once invoked), scanned C, original, MIT.

A recovery procedure for work left behind by a stalled coding subagent. It saves uncommitted changes in a separate work-in-progress branch and cleans up the abandoned worktree, a separate checkout of the repository.

In plain words
What is it for?
Use it after a malformed or incomplete subagent run to preserve its changes and provide a handoff for the main agent.
Why use it?
It prevents useful edits from being stranded when a subagent stops before returning a usable result.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths; mentions subagents.

This is darylmcd/Roslyn-Backed-MCP's own configuration. It tells Claude Code how to work on Roslyn-Backed-MCP itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Roslyn-Backed-MCP configures →

Part of the roslyn-mcp plugin — 44 skills, 5 agents, 2 hooks, 2 MCP servers shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to darylmcd/Roslyn-Backed-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.

Copy the file
curl -O https://raw.githubusercontent.com/darylmcd/Roslyn-Backed-MCP/main/.claude/skills/recover-stalled-subagent/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/darylmcd/Roslyn-Backed-MCP

Made for: Claude Code.

Or install roslyn-mcp, the plugin that ships this one along with the rest of its 44 skills, 5 agents, 2 hooks, 2 MCP servers.

Wrote 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.

agentmods badge for recover-stalled-subagent

README.md
[![agentmods](https://agentmods.dev/badge/skills/darylmcd/roslyn-backed-mcp/recover-stalled-subagent/github.svg)](https://agentmods.dev/skills/darylmcd/roslyn-backed-mcp/recover-stalled-subagent)
Your own site
<a href="https://agentmods.dev/skills/darylmcd/roslyn-backed-mcp/recover-stalled-subagent"><img src="https://agentmods.dev/badge/skills/darylmcd/roslyn-backed-mcp/recover-stalled-subagent/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.

agentmods 80×15 button for recover-stalled-subagent

Your own site · 80×15
<a href="https://agentmods.dev/skills/darylmcd/roslyn-backed-mcp/recover-stalled-subagent"><img src="https://agentmods.dev/badge/skills/darylmcd/roslyn-backed-mcp/recover-stalled-subagent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 131 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,930 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00131 $0.03930
Opus 5 $0.00066 $0.01965
Sonnet 5 $0.00026 $0.00786
Haiku 4.5 $0.00013 $0.00393

Measured 3d ago against content hash a75465b74443, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade C, and why

recover-stalled-subagent scanned grade C with 1 finding 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 3d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

6. `dotnet build-server shutdown` **before** `git worktree remove --force`, or the Windows testhost/VBCSCompiler file lock on `tests/RoslynMcp.Tests/bin/{Debug,Release}/net10.0/` leaves a stale `.worktrees/<id>` director
.claude/skills/recover-stalled-subagent/SKILL.md · 217 lines

How it starts

The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Recover Stalled Subagent

You are a recovery operator. Your job is to take a single stalled subagent's branch name, salvage any uncommitted work in its worktree into a WIP commit pushed to origin, then remove the worktree cleanly — leaving the orchestrator a 6-line STATE_HANDOFF block it can drop into state.json's notes field for the affected initiative.

This skill does not query GitHub, reconcile plan state, edit state.json / plan.md / backlog.md / CHANGELOG.md, or decide whether the initiative should be retried / deferred. Those are orchestrator decisions. This is a worktree-rescue primitive.

Why this exists

Cold-subagent stalls (~1 in 10 spawn rate observed across 2026-04-17+18 passes) can emit a thought-fragment final message without the <<<RESULT>>> sentinel — see ~/.claude/prompts/_subagent-result-protocol.md Appendix B's malformed-result detection. The orchestrator then cannot parse a PR URL, but the subagent may have already produced real edits in its worktree. 2026-04-18 pass-3 init-5 stranded 729 insertions across 4 prod files + 1 test file before a 3-turn manual recovery dance.

Manual recovery steps (each with its own foot-gun):

  1. cd .worktrees/<id> and git status --porcelain — fine.
  2. Stage files. If the operator reaches for git add -A, they pick up stray .vs/ caches, bin/, obj/, or other ignored-but-dirty paths. Explicit per-file git add -- <path> is mandatory.
  3. Commit with a well-formed WIP message citing the original branch.
  4. Push to origin (so the WIP is durable before worktree removal).
  5. cd back to primary repo root — NOT from inside the worktree, or the next step fails.
  6. dotnet build-server shutdown before git worktree remove --force, or the Windows testhost/VBCSCompiler file lock on tests/RoslynMcp.Tests/bin/{Debug,Release}/net10.0/ leaves a stale .worktrees/<id> directory that the orchestrator must rm -rf manually (Device or resource busy on git worktree remove). This is the fix shipped by initiative 5 in PR #288; see ~/.claude/prompts/backlog-remediate.md for the canonical cleanup discipline.
  7. git worktree remove --force .worktrees/<id>.
  8. Emit a STATE_HANDOFF block the orchestrator can paste into state.json.initiatives[n].notes.

Read the full file on GitHub · 217 lines

Changes

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.

  1. 3d ago Changed a75465b74443
  2. 12d ago First seen · 217 lines · 131 tokens per session scan C 925c3c26b8a2

Subscribe to this mod's changes

recover-stalled-subagent is a skill published in the GitHub repository darylmcd/Roslyn-Backed-MCP (1 stars, last pushed today), licensed MIT. It adds 131 tokens to every session and 3,930 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

prowler-commit

Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.

prowler-cloud/prowler · 33 tokens

gh-auth-isolation

Safely manage multiple GitHub identities (EMU + personal) in agent workflows.

github/gh-aw · 20 tokens

comet-github

A routing guide for Comet-related GitHub work. It directs requests about pull requests, issues, CI failures, ideas, and fixes to the appropriate review or implementation process.

rpamis/comet · 72 tokens

github-skill

Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.

zeenie-ai/OpenCompany · 51 tokens

changelog-composer

Generates structured changelogs and release notes from git history and PRs, classifying breaking changes, features, fixes, performance, docs. Triggers on: "generate changelog", "write release notes", "what changed since", "prepare release", "release notes for", "diff since tag".

Mathews-Tom/armory · 67 tokens

re0-merge

Review and land an external contribution the way this suite does: gate it against the thesis, land it with the author's credit intact, complete a new skill rather than merging it raw, then approve, credit, and explain before closing. Use when reviewing a pull request, as any collaborator or maintainer, not only the…

LilMGenius/paperthin · 70 tokens