agentleFS
shuvamkshuvamk/openbench/.claude/skills/reap-stale/SKILL.md

reap-stale

Skill2 starsChanged 5 months agoApache-2.0View on GitHub

Sweep the SDLC queue for issues stuck in status:in-progress whose heartbeat has gone silent (default >30 min) and reclaim them back to status:ready so other workers can pick them up. Trigger when the user says "reap stale issues", "clean up the queue", "release stuck claims", "/reap-stale", or notices an issue claimed for too long. Safe to run on a cron via the schedule skill. This is the fast (30-min) complement to .github/workflows/issue-hygiene.yml's slower 36h reaper.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run from the main checkout (absolute path or cd to repo root).

    line 25

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/reap-stale — Janitor for the SDLC pipeline

Sweep the GitHub issue queue and reclaim any abandoned status:in-progress claim. An abandoned claim = a sticky claim comment whose Last heartbeat is older than heartbeat_stale_after_seconds (default 1800s).

This is the safety net: if a worker agent crashes, runs out of context, or quietly drops, its issue would otherwise be locked. The reaper releases it back to status:ready so the queue keeps moving. It sits alongside .github/workflows/issue-hygiene.yml, which reaps on a slower 36h cron — this one enforces the 30-min heartbeat lease for tight parallel-agent turnaround.

pick-issue.sh already runs the reaper before every claim, so you rarely need this manually. Use it when:

  • You see an issue stuck status:in-progress for a while and want it freed now.
  • You're cron'ing it via /schedule for proactive cleanup.
  • You're debugging a stuck queue.

Run from the main checkout (absolute path or cd to repo root).

Invocation

# Real run — actually reclaims stale issues:
.claude/scripts/sdlc/reap-stale.sh

# Dry run — reports what WOULD be reclaimed, changes nothing:
.claude/scripts/sdlc/reap-stale.sh --dry-run

Output, one line per in-progress issue:

reap: 3 in-progress issue(s); threshold=1800s
  #42: alive (heartbeat 120s old)
  #43: STALE (heartbeat 2400s old, threshold 1800s) — reaping
  #44: no claim comment found — releasing as orphaned

What it does on reap

  • Deletes the stale claim-v1 sticky comment(s).
  • Swaps status:in-progress → status:ready, drops agent:claimed.
  • Posts a ♻️ Reclaimed comment noting the heartbeat age.
  • Removes local .claude/sdlc/state/claim-<num>.json.

Threshold

Set in .claude/sdlc/config.json under heartbeat_stale_after_seconds (default 1800s = 30 min). Don't lower it below ~5 min — reaper false-positives (stealing an issue from a live-but-slow worker) hurt worse than false-negatives.

Sibling skills: /pick-issue, /file-issue. Pipeline docs: .claude/sdlc/README.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.