More screenshots

    Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseOpenClawOpenClaw+21 more

    Repair DNS, Discovery & Endpoint Failures

    1

    Repair DNS, Discovery & Endpoint Failures is a bounded ToolForge Labs workflow.

    $8.99

    Secure checkout via Stripe

    30-day refund 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.

    What you get

    Resolve stale IP addresses in connection pools after pod restarts.Fix IPv4/IPv6 fallback delays in dual-stack environments.Standardize DNS TTL handling across distributed microservices.Implement health-aware endpoint rotation for internal service discovery.

    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.

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 21 days ago

    • Passed all security checks, Safe to install

    Listed21 days ago

    What's inside

    Frequently Asked Questions