More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Repair DNS, Discovery & Endpoint Failures

    1

    Repair DNS, Discovery & Endpoint 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 DNS, Discovery & Endpoint Failures

    Repair DNS, Discovery & Endpoint Failures

    Example session with this skill installed

    Our Node.js service is intermittently failing to connect to the internal database cluster after a pod restart. It seems like it's trying to hit old IP addresses. Here is our connection logic.

    • Read your context and instructions
    • Compiled the repair dns discovery

    I have analyzed the connection logic and identified a stale endpoint caching issue within the application-level connection pool, which is ignoring the DNS TTL during pod reshuffles.

    Repair for Stale Endpoint Resolution

    The following fix introduces a TTL-aware resolver and forces the connection pool to refresh its internal cache when a connection is dropped or a threshold is met, ensuring it doesn't rely on OS-level caching that might be stale.

    const dns = require('dns').promises;
    const { Pool } = require('pg'); // Example using pg-pool
    
    /**
     * Enhanced resolver that respects TTL and handles address-family selection.
     */
    class DiscoveryResolver {
      constructor(hostname, ttl = 30000) {
        this.hostname = hostname;
        this.ttl = ttl;
        this.cache = null;
        this.lastLookup = 0;
      }
    
      async resolve() {
        const now = Date.now();
        if (this.cache && (now - this.lastLookup) < this.ttl) {
          return this.cache;
        }
    
        // Resolve using address family 4 to avoid IPv6 stalls if not supported
        const addresses = await dns.resolve4(this.hostname);
        this.cache = addresses[Math.floor(Math.random() * addresses.length)];
        this.lastLookup = now;
        return this.cache;
      }
    }
    
    // Invariant: Connection pool must refresh address if connection fails
    const resolver = new DiscoveryResolver('db.internal.svc.cluster.local');
    
    const pool = new Pool({
      host: async () => await resolver.resolve(),
      max: 20,
      idleTimeoutMillis: 30000,
      connectionTimeoutMillis: 2000
    });
    
    pool.on('error', (err, client) => {
      console.error('Connection failure, invalidating cache');
      resolver.lastLookup = 0; // Force refresh on next attempt
    });
    

    Deterministic Test Plan

    Test CaseMethodExpected Result
    TTL ExpiryInject Date.now mockResolver calls dns.resolve4 after 30s
    Connection ErrorTrigger pool.on('error')lastLookup is reset to 0 immediately
    RotationMock multiple A recordsConsecutive resolve() calls return different IPs

    Next steps

    1. Verify the NDOTS setting in your resolv.conf to ensure internal lookups aren't suffering from excessive search suffix traversals.
    2. Check if the database client library supports dynamic host resolution; some libraries bind the IP at instantiation.
    3. Apply the DiscoveryResolver pattern to your other internal microservices.

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

    About this skill

    Repair DNS, Discovery & Endpoint Failures is a bounded ToolForge Labs workflow. Repair DNS resolution, service discovery, stale endpoint caches, IPv4/IPv6 selection, endpoint rotation, and failover recovery. Works from repositories or partial logs/configuration. Produces bounded repair patterns and deterministic tests while preserving discovery policy, TTL semantics, routing boundaries, endpoint authorization, and public compatibility. 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 identifies and resolves critical networking issues including DNS resolution errors, stale endpoint caches, service discovery gaps, and IPv4/IPv6 selection conflicts that cause service downtime.

    No, it is designed to work with both full repositories and partial evidence like log snippets, configuration files, traces, or architecture notes to diagnose failures.

    The skill generates bounded repair patterns and deterministic tests that ensure the fix works while strictly preserving your existing discovery policies, TTL semantics, and security boundaries.

    This skill is compatible with major AI agents and orchestration platforms that support ToolForge Labs workflows, specifically optimized for environments using Kubernetes and microservices architectures.

    Yes, each purchase includes the core workflow logic, a suite of deterministic validation tests, and access to all future version updates to ensure compatibility with evolving networking protocols.

    New in APIs & Backend