More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Repair Service Startup & Shutdown Failures

    1

    Repair Service Startup & Shutdown Failures is a bounded ToolForge Labs workflow.

    $1

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Repair Service Startup & Shutdown Failures

    Repair Service Startup & Shutdown Failures

    Example session with this skill installed

    My Node.js Express app on Kubernetes is getting SIGKILLed before it finishes processing long-running requests during a rollout. I have a 30s terminationGracePeriod. Fix the signal handling.

    • Read your context and instructions
    • Compiled the repair service startup

    I have analyzed the lifecycle contract between Kubernetes and your Node.js process. The current implementation lacks a SIGTERM handler that pauses traffic admission and waits for the HTTP server to close existing connections within the 30-second window.

    Graceful Shutdown Implementation

    const express = require('express');
    const http = require('http');
    
    const app = express();
    const server = http.createServer(app);
    
    // Track active connections for draining
    let isShuttingDown = false;
    
    app.use((req, res, next) => {
      if (isShuttingDown) {
        res.set('Connection', 'close');
        res.status(503).send('Server is shutting down');
        return;
      }
      next();
    });
    
    function gracefulShutdown(signal) {
      console.log(`${signal} received. Starting graceful shutdown...`);
      isShuttingDown = true;
    
      // Stop accepting new connections via K8s readiness probe if applicable
      // Or simply stop the server from accepting new socket connections
      server.close(() => {
        console.log('Http server closed.');
        // Close DB connections, flush logs, etc. here
        process.exit(0);
      });
    
      // Force shutdown after a safety margin (e.g., 25s for a 30s K8s limit)
      setTimeout(() => {
        console.error('Could not close connections in time, forceful shutdown');
        process.exit(1);
      }, 25000);
    }
    
    process.on('SIGTERM', () => gracefulShutdown('SIGTERM'));
    process.on('SIGINT', () => gracefulShutdown('SIGINT'));
    
    server.listen(3000);
    

    Next steps

    1. Update your Kubernetes deployment manifest to ensure the readinessProbe points to a /health endpoint that returns 503 when isShuttingDown is true.
    2. Verify that your containerized environment does not use an npm start wrapper that swallows signals; use node index.js directly in the Docker CMD.
    3. Run the included implementation and trigger a manual kill -15 to verify the "Http server closed" log appears.

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

    About this skill

    Repair Service Startup & Shutdown Failures is a bounded ToolForge Labs workflow. Repair service lifecycle failures across startup sequencing, dependency initialization, readiness/liveness, background task ownership, signal handling, draining, graceful shutdown, finalization, and restart recovery. Works from repositories or partial hooks/probe logs. Produces bounded repairs and deterministic lifecycle tests without inventing deployment results. It works from a full repository or partial evidence such as snippets, logs, configuration, traces, tickets, and architecture notes. The skill preserves existing product and security policy, separates verified facts from assumptions, avoids invented execution claims, and produces concrete repair or review steps with focused deterministic validation or traceable evidence.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    Cannot verify production systems, external services, or facts that are not present in supplied evidence. With partial context it returns bounded diagnosis/review, explicit assumptions, and a deterministic validation plan rather than claiming successful execution.

    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

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    Use a clean branch or a controlled review workspace. Supply repository files, logs, traces, configuration, or evidence needed for the task. Review all patches/findings before merge or operational action; keep production credentials and destructive production actions out of the workflow.

    Listed2 months ago
    Updated9 days ago

    What's inside

    Frequently Asked Questions

    This skill diagnoses and fixes complex lifecycle issues such as race conditions during startup, improper signal handling, hanging shutdown processes, and failing Kubernetes readiness/liveness probes.

    The skill requires access to your code repository or specific artifacts like failure logs, probe configurations, and architecture notes to generate localized, bounded repairs.

    Yes, it is designed for compatibility with major AI agents and devops platforms, focusing on standard backend environments like Kubernetes, Docker, and distributed microservices.

    Unlike generic coding tools, this skill produces deterministic lifecycle tests to verify fixes and ensures all repairs strictly adhere to your existing security and product policies without inventing deployment results.

    You receive the full ToolForge Labs workflow for lifecycle repair, including specialized modules for dependency initialization, background task ownership, and graceful shutdown recovery.

    The skill is updated periodically to support evolving container orchestration standards and new signal handling patterns, ensuring your service lifecycles remain robust against modern infrastructure changes.

    New in APIs & Backend