stagnation-recovery

stagnation-recovery is a skill for Claude Code from yhy0/CHYing-agent. It costs 71 tokens per session (2,266 once invoked), scanned A, original, MIT.

A recovery guide for situations where an agent is stuck, repeating attempts, facing errors, or missing information.

In plain words
What is it for?
It is used during failed commands, repeated permission or timeout errors, uncertain API work, and other stalled tasks.
Why use it?
It helps identify why progress has stopped and directs the agent to check prerequisites or try a different approach.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit It is used during failed commands, repeated permission or timeout errors, uncertain API work, and other stalled tasks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yhy0/chying-agent/stagnation-recovery
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add yhy0/CHYing-agent --skill stagnation-recovery
Clone the repo
git clone --depth 1 https://github.com/yhy0/CHYing-agent

Made for: Claude Code.

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 stagnation-recovery

README.md
[![agentmods](https://agentmods.dev/badge/skills/yhy0/chying-agent/stagnation-recovery/github.svg)](https://agentmods.dev/skills/yhy0/chying-agent/stagnation-recovery)
Your own site
<a href="https://agentmods.dev/skills/yhy0/chying-agent/stagnation-recovery"><img src="https://agentmods.dev/badge/skills/yhy0/chying-agent/stagnation-recovery/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 stagnation-recovery

Your own site · 80×15
<a href="https://agentmods.dev/skills/yhy0/chying-agent/stagnation-recovery"><img src="https://agentmods.dev/badge/skills/yhy0/chying-agent/stagnation-recovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,266 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 16
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
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.00071 $0.02266
Opus 5 $0.00036 $0.01133
Sonnet 5 $0.00014 $0.00453
Haiku 4.5 $0.00007 $0.00227

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

Security

Grade A, and why

stagnation-recovery scanned grade A 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 12d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

3. **换方向不是换参数**:curl 加了 `-k` 还是 403?这不叫换方向。从 client_credentials 换到 device_code flow 才叫换方向。
agent-work/.claude/skills/stagnation-recovery/SKILL.md · 177 lines

How it starts

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

Stagnation Recovery - Security Operations

Core Principle

停下来比错误方向的加速更有价值。 当你连续尝试同类操作无果时,问题不是执行力不够,而是方向错了。

Iron Rules

  1. 穷尽验证再放弃:没有读过报错全文、没有搜索过文档、没有检查过前置条件的,不算尝试过。
  2. 先查后问:你有 wss_exec/docker_exec/WebSearch/Read 等工具,在判定"不可行"之前,必须用工具验证。
  3. 换方向不是换参数:curl 加了 -k 还是 403?这不叫换方向。从 client_credentials 换到 device_code flow 才叫换方向。

Step 1: Diagnose - 识别你的卡壳模式

在采取任何行动之前,先判断你属于哪种模式:

模式 信号 根因
A: 原地打转 反复执行同一工具、只改参数/flag 方向错误,需要换攻击面
B: 环境约束 Permission denied, 工具缺失, 网络不通 硬限制,需要绕道或换工具链
C: 信息不足 盲目尝试、猜测 API 端点/参数 缺少侦察,需要回退到信息收集
D: 攻击链断裂 有多个发现但无法串联 需要停下来组合攻击链
E: 工具使用错误 命令语法错、参数编码错、curl 格式错 需要读文档或用脚本替代手工命令

Step 2: Recover - 按模式执行恢复

Mode A: 原地打转 -> 换攻击面

强制动作

  1. 列出你已尝试的所有方向(不是参数变体,是方向)
  2. 从下面的攻击树中选择一个未尝试过的方向
  3. 每个新方向最多尝试 3 次,无果则换下一个

Web 攻击树

目标 Web 应用
  ├── 认证绕过: 默认凭据 / SQL注入 / JWT伪造 / OAuth滥用 / Session固定
  ├── 注入攻击: SQLi / XSS / SSTI / SSRF / XXE / Command Injection / LDAP Injection
  ├── 逻辑漏洞: IDOR / 竞态条件 / 业务逻辑绕过 / 价格篡改 / 权限越权
  ├── 文件操作: 上传绕过 / 路径遍历 / LFI/RFI / 反序列化
  ├── 前端攻击: DOM XSS / Prototype Pollution / WebSocket劫持 / PostMessage滥用
  └── 信息泄露: .git泄露 / 备份文件 / 错误页面 / API文档 / 源码泄露

提权攻击树

初始访问
  ├── Linux: SUID/SGID / sudo滥用 / cron/定时任务 / capabilities / 内核漏洞 / Docker逃逸
  ├── Windows: 服务权限 / 注册表 / AlwaysInstallElevated / Token模拟 / SeImpersonate
  ├── Cloud: IMDS/metadata / IAM提权 / 角色链 / SSRF到云凭据 / 存储桶误配置
  └── K8s: ServiceAccount / RBAC滥用 / etcd / kubelet API / 挂载逃逸

云安全攻击树

Cloud Target
  ├── Azure: OAuth App滥用 / Managed Identity / device_code flow / Admin Consent攻击
  │         / Dynamic Group注入 / PRT滥用 / Conditional Access绕过
  ├── AWS: IMDS v1/v2 / IAM提权链 / Lambda环境变量 / S3 ACL / STS AssumeRole
  └── GCP: SA密钥 / metadata server / Workload Identity / Org Policy绕过

Mode B: 环境约束 -> 绕道

强制动作

  1. 明确列出约束(具体错误信息)
  2. 对每个约束检查:是真约束还是可绕过的?
    • Permission denied -> 能否换用户/换路径/换工具?
    • 工具缺失 -> 能否用替代工具?(例: 没有 nmap 用 /dev/tcp 探测)
    • 网络不通 -> 能否通过已有代理/隧道?
  3. 确认是硬约束后,立即放弃这个方向,不要再尝试任何变体

Read the full file on GitHub · 177 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. 12d ago First seen · 177 lines · 71 tokens per session scan A 96b9bdf6d0fd

Subscribe to this mod's changes

stagnation-recovery is a skill published in the GitHub repository yhy0/CHYing-agent (566 stars, last pushed 4mo ago), licensed MIT. It adds 71 tokens to every session and 2,266 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens