bokuwalily/claude-code-skills/pending-accumulation-guard
Claude Code and agent skill by bokuwalily/claude-code-skills
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
非同期ジョブが requeue/retry を繰り返すのにカウンタ未永続化で失敗が立たず pending が事実上の終端状態になる anti-pattern の検出・修正パターン
Install
npx vskill@latest install bokuwalily/claude-code-skills/pending-accumulation-guardSKILL.md
The same SKILL.md was published earlier as bokuwalily/claude-code-skills/pending-accumulation-guard.
pending-accumulation-guard
問題の型
症状: 監視は鳴らない・失敗カウントはゼロ・UIは「作成中」のまま・中止も再実行もできない。 根因: requeue の「成功」がカウントされないため、7回目と1回目が実装から区別できない。
検出チェックリスト
いずれか1項目が欠けていたら このパターンが潜在している。
修正パターン(TypeScript / Prisma 例)
Step 1 — Job モデルにカウンタを追加
重要:requeueStale(タイムアウト起因)はカウントを増やさない。理由が混在するとカウンタの意味が薄れ give-up 条件が曖昧になる。
Step 2 — requeueJob() の戻り値にカウンタを含める
Step 3 — 二重条件の give-up を実装
片方だけでは不十分な理由:-quotaHits >= 1だけ: 1回目のクォータ拒否で即失敗(リトライが全く効かない)-elapsed > 3hだけ: 連続クォータ拒否でも3h待つ(今回の39h問題の縮小版)両方を OR で組み合わせて「即諦め or 長すぎる場合に諦め」を実現する。
Step 4 — UI の正直表示(fake progress を消す)
Step 5 — 監視アラームの追加
Pitfalls
| # | 落とし穴 | 対策 | |
|---|---|---|---|
| 1 | requeueStale もカウントに含める | 理由ごとにカウンタを分ける(quotaHits vs staleHits) | |
| 2 | give-up 条件を単一にする | OR で二重条件にする | |
| 3 | 既存の report() 経路を使わず新経路を追加 | 既存の失敗経路に寄せる(デバッグ経路が増えると見落とし増) | |
| 4 | UIにアニメ進捗バーを残す | pending 中はアニメを止め ETA を表示する | |
| 5 | DB に pending が積んでも監視が鳴らない | pending 長時間クエリ or DLQ を監視に追加 | |
| 6 | カウンタを永続化せずメモリに持つ | Worker 再起動でリセット → 無限ループ再現 |
実績
- 本番の動画生成キュー(2026-08): quotaHits + QUOTA_GIVE_UP_MS 二重条件を導入し、39時間 pending が 0時間(1回目のクォータ拒否で即 failed)に短縮。
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/pending-accumulation-guard/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/bokuwalily/claude-code-skills/pending-accumulation-guard)