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.
npx skills add rjmurillo/ai-agents --skill stuck-detectiongit clone --depth 1 https://github.com/rjmurillo/ai-agentsWrote 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/rjmurillo/ai-agents/stuck-detection)<a href="https://agentmods.dev/skills/rjmurillo/ai-agents/stuck-detection"><img src="https://agentmods.dev/badge/skills/rjmurillo/ai-agents/stuck-detection/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/rjmurillo/ai-agents/stuck-detection"><img src="https://agentmods.dev/badge/skills/rjmurillo/ai-agents/stuck-detection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 4 findings, 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 Memory Poisoning · line 29 Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
- high Memory Poisoning · line 36 Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
- high Memory Poisoning · line 84 Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
- medium Excessive Agency · line 4 Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
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.00081 | $0.01692 |
| Opus 5.5 | $0.00032 | $0.00677 |
| Sonnet 5.5 | $0.00016 | $0.00338 |
| Haiku 4.5 | $0.00008 | $0.00169 |
Grade A, and why
stuck-detection 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Stuck Detection Guard
Detect when an agent is repeating the same topics across turns and surface a self-reflection nudge so the orchestrator can break the loop. Lightweight, deterministic, no external services.
Triggers
| Trigger Phrase | Operation |
|---|---|
check stuck loop |
Score current response against recent history |
detect repetition |
Flag repeating topic signatures |
agent looping |
Emit a loop-breaking nudge |
reset stuck history |
Clear history after a confirmed topic change |
Quick Reference
| Symptom | Cause | Fix |
|---|---|---|
| Agent re-states the same status every turn | Topic signature unchanged across turns | Inject the nudge payload before the next turn |
| False positive after a real topic change | Stale history kept after the user redirected | Run reset to clear history |
| Stuck never triggers despite obvious repetition | Responses below MIN_TEXT_LENGTH (50 chars) |
Lower threshold or pass full response text |
| Unrelated turns flagged as stuck | Generic vocabulary inflates Jaccard score | Raise DEFAULT_SIMILARITY_THRESHOLD toward 0.75 |
When to Use
Use this skill when:
- Building an orchestrator that risks repeating tool calls or status updates
- A long-running session shows degraded variety in responses
- You want a cheap pre-flight guard before sending a response
Use a richer evaluation instead when:
- You need semantic similarity (this uses lexical Jaccard only)
- You need multi-turn intent tracking
- You need cross-session coherence checks
How It Works
- Topic signature. Strip stopwords, take the top N significant words by frequency, sort them, and join with commas. This is the response's signature.
- History. Append each signature with a UTC timestamp to a JSON file. Keep only the most recent entries.
- Jaccard similarity. Compare the current signature against the most recent K entries. Count how many exceed the similarity threshold.
- Trigger. When K consecutive recent entries are similar, emit a nudge payload telling the orchestrator to ask the user a question or change topic.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 6d ago Changed 52caba2336ea
- 22d ago Changed · +6 lines dc19f0046119
- 1mo ago First seen · 163 lines · 81 tokens per session scan A 2f9d0a80008c
stuck-detection is a skill published in the GitHub repository rjmurillo/ai-agents (48 stars, last pushed today), licensed MIT. It adds 81 tokens to every session and 1,692 once invoked, about $0.0003 per session on Opus 5.5. 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-09-03.
Other skills, from other repositories
install-gemini-code-review-action
Installs, configures, or upgrades Dazbo's PR code review & issue triage GitHub Action (gemini-review-action) in a target repository. Use when the user wants to set up, configure, or update automated AI code reviews, issue triaging, or Gemini model workflows for their GitHub repository.
review-deep
Review change vs spec, plan, code quality heuristics, and repo rules; append remediation phase if needed.
review-remote
Review open PR/MR and publish findings.
apply-review-feedback
Classify and apply accepted PR/MR review feedback.
azure-devops-automation
CI/CD pipelines, infrastructure as code, and deployment automation for Azure workloads.
architecture-audit
Comprehensive project consistency review across code, documentation, diagrams, and configuration.