More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Repair Request Cancellation & Abort Bugs

    1

    Diagnose and repair request cancellation, abort propagation, timeouts, background continuation, cleanup, and partial side effects.

    $1

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Repair Request Cancellation & Abort Bugs

    Repair Request Cancellation & Abort Bugs

    Example session with this skill installed

    The 'submit-order' endpoint keeps processing payments even after the client disconnects. Here is the Node.js handler snippet and the logs showing 499 errors followed by successful DB writes.

    • Read your context and instructions
    • Compiled the repair request cancellation

    I have analyzed the submit-order handler and the provided logs. The issue stems from the payment gateway call not being linked to the incoming request's AbortSignal, allowing the transaction to complete despite the client's 499 disconnect.

    Diagnosis and Repair

    The handler currently awaits the processPayment promise without passing the request context. While the database transaction is scoped, it is not aborted when the connection closes.

    ComponentCurrent BehaviorRequired Invariant
    ClientDisconnects (499)Signal must propagate to all downstream IO
    Payment APIRuns to completionMust abort via AbortController signal
    DB TransactionCommits regardless of statusRollback must trigger on signal abort

    Implementation Patch

    // routes/orders.js - Proposed Fix
    app.post('/submit-order', async (req, res) => {
      const ac = new AbortController();
      req.on('close', () => ac.abort());
    
      const session = await db.startSession();
      try {
        session.startTransaction();
    
        // Link external payment call to request cancellation
        const payment = await paymentGateway.process({
          amount: req.body.total,
          signal: ac.signal 
        });
    
        // Ensure DB write respects the signal
        await Order.create([{ ...req.body, paymentId: payment.id }], { 
          session,
          signal: ac.signal 
        });
    
        await session.commitTransaction();
        res.status(201).json({ success: true });
      } catch (err) {
        await session.abortTransaction();
        if (err.name === 'AbortError') {
          console.log('Request cancelled: cleanup successful');
        } else {
          throw err;
        }
      } finally {
        session.endSession();
      }
    });
    

    Deterministic Test Plan

    1. Mock Service: Create a mock payment gateway with a 500ms latency.
    2. Abort Trigger: Use a setTimeout to trigger req.emit('close') at 200ms.

    Assertion: Verify that the paymentGateway receives an abort signal and that Order.countDocuments() remains 0.

    Next steps

    1. Update the paymentGateway SDK wrapper to accept an AbortSignal.
    2. Deploy the patch to a staging environment and verify log suppression for cancelled requests.
    3. Check for similar patterns in the 'refund-process' endpoint.

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

    About this skill

    Repair Request Cancellation & Abort Bugs is a bounded ToolForge Labs workflow. Diagnose and repair request cancellation, abort propagation, timeouts, background continuation, cleanup, and partial side effects. Works from full repositories or partial context such as snippets, logs, configuration, traces, and architecture notes. Produces concrete repairs or evidence-backed review outputs while preserving existing product/security policy.

    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 Agents & Orchestration.

    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 automates the identification and fixing of complex lifecycle issues, such as ghost processes that continue after a user cancels, incomplete database rollbacks, and failed AbortController propagation in asynchronous workflows.

    Yes, it is designed to work with either full repository access for comprehensive repairs or partial context—such as error logs and architecture notes—to provide evidence-backed debugging insights.

    The skill is optimized for modern backend environments like Node.js and Go, specifically targeting distributed systems where timeout and cleanup logic are most critical.

    You receive the fully configured ToolForge Labs workflow, including the diagnostic logic and repair generation templates compatible with major AI agent platforms.

    The skill is built to respect your existing codebase integrity by separating verified facts from assumptions and ensuring all proposed repairs strictly adhere to your current product and security policies.

    New in Agents & Orchestration