Works with the AI Agents you already use

    hermes process reaper

    by NZ1Labs

    1

    Prevents process leaks and duplicate background jobs with an automated registry and TTL-based reaper.

    Free

    6 uses5.0 (1 review)
    hermes process reaper

    hermes process reaper

    Example session with this skill installed

    I need to start a deep research pass on market trends. Register the process and check for duplicates to avoid leaking stale PIDs.

    • Read your context and instructions
    • Compiled the hermes process reaper

    I have initialized the process registry and verified the environment. No existing processes with the same purpose hash were found. I have registered the new research job with a 10-minute TTL and redacted all API keys from the spawn logs.

    Process Registry Entry

    FieldValue
    PID48291
    Purpose Hashmkt_trend_2024_08_15_v1
    Parent Taskmarket-research-pass-alpha
    TTL600s (10 Minutes)
    Started At2024-08-15T14:30:05Z
    StatusACTIVE
    Registry Path~/.agent-home/reaper_registry.json

    Registry Protection Status

    • Allowlist Check: PASSED (Verified no conflicts with systemd or Ollama)
    • Key Redaction: ENABLED (Masking applied to OPENAI_API_KEY and PERPLEXITY_KEY)
    • Late-Arrival Policy: DISCARD (Any output arriving after T+600s will be ignored)

    Next steps

    • Monitor the research job via process(action='list').
    • The reaper will automatically trigger at session end to clean up PID 48291.
    • If you manually abort the task, I will flag the purpose hash as 'archived' in the registry.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The problem

    Background tasks often leak, leading to stale processes that poll context for hours or duplicate expensive research passes. This results in context pollution and wasted API credits when multiple agents spawn identical jobs for the same task.

    What it does

    • Registers every spawned background job with PID, purpose hash, and TTL in a persistent local registry.
    • Prevents duplicate spawns by checking the registry for existing processes with the same purpose hash.
    • Automatically reaps orphaned processes at session end or every 30 minutes based on parent task status.
    • Discards late-arriving output from killed processes to prevent context corruption.
    • Enforces mandatory API key redaction at the moment of process spawning to prevent credential leaks.

    Why this beats prompting it yourself

    Standard agents lack a persistent registry to track background state across sessions. This skill implements a rigorous lifecycle management system that handles process cleanup and deduplication, which simple prompting cannot reliably enforce during complex multi-step research tasks.

    Use cases

    • Managing long-running research tasks that need to survive intermittent agent disconnections.
    • Preventing redundant API calls when re-running research scripts during the same session.
    • Cleaning up failed processes that continue to run with invalid or expired credentials.

    Known limitations

    Requires local filesystem access for the SQLite or JSON registry. Default TTL for research spawns is strictly capped at 10 minutes.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    5.0
    1 review
    5
    1
    4
    0
    3
    0
    2
    0
    1
    0

    This skill has been used 6 times.

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    • Free with an Agensi account

    Permissions

    No special permissions declared or detected

    Listed2 months ago

    What's inside

    Frequently Asked Questions

    It prevents 'zombie processes' and duplicate API calls by maintaining a persistent registry of all background tasks, ensuring that identical research jobs aren't run twice and that crashed tasks are automatically terminated.

    The reaper is compatible with any AI agent or framework that has local filesystem access, as it requires a stable location to store its SQLite or JSON process registry.

    If a job is already running with a matching 'purpose hash,' the skill will block the new spawn and provide a reference to the existing process, preventing redundant execution and context pollution.

    The skill includes a pre-configured reaper script that runs every 30 minutes by default, but users can also trigger an immediate cleanup at the end of a session or via manual command.

    You will receive the core process registry module, the automated reaper utility, and a set of integration instructions for incorporating the lifecycle management into your existing agent workflows.

    Yes, the skill features a mandatory redaction layer that automatically identifies and strips API keys and sensitive credentials from process arguments at the moment of spawning.

    New in Workflow Automation

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Workflow Automation.

    Free