Skip to content
Skillv1.0.0

alchemy-debug-bundle

Collect Alchemy SDK debug evidence for troubleshooting and support tickets. Use when encountering persistent issues, preparing support tickets, or debugging blockchain query failures. Trigger: "alchem

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (skills/.curated/alchemy-debug-bundle/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill alchemy-debug-bundle. Copyright stays with the author (MIT).

Alchemy Debug Bundle

Overview

Collect diagnostic data for Alchemy support tickets: connectivity tests, SDK version, network status, CU usage, and recent error logs.

Prerequisites

  • A scoped development or sandbox key supplied through a secret store; never pass the key as a command-line argument or include it in a captured bundle.
  • A reproducible issue with the expected network, method, time window, and sanitized request/correlation ID.
  • A review path that checks the bundle for credentials, wallet-address privacy concerns, or proprietary application data before it leaves the organization.

Instructions

Step 1: Debug Bundle Generator

// src/debug/alchemy-debug.ts
import { Alchemy, Network } from 'alchemy-sdk';

interface DebugBundle {
  timestamp: string;
  sdkVersion: string;
  environment: Record<string, string>;
  connectivity: Record<string, any>;
  networkStatus: Record<string, any>;
}

async function generateDebugBundle(): Promise<DebugBundle> {
  const alchemy = new Alchemy({
    apiKey: process.env.ALCHEMY_API_KEY,
    network: Network.ETH_MAINNET,
  });

  const bundle: DebugBundle = {
    timestamp: new Date().toISOString(),
    sdkVersion: require('alchemy-sdk/package.json').version,
    environment: {
      nodeVersion: process.version,
      platform: process.platform,
      apiKeySet: process.env.ALCHEMY_API_KEY ? 'yes (redacted)' : 'NO — missing',
      network: process.env.ALCHEMY_NETWORK || 'ETH_MAINNET',
    },
    connectivity: {},
    networkStatus: {},
  };

  // Test core connectivity
  try {
    const start = Date.now();
    const blockNumber = await alchemy.core.getBlockNumber();
    bundle.connectivity.core = {
      status: 'ok',
      latencyMs: Date.now() - start,
      latestBlock: blockNumber,
    };
  } catch (err: any) {
    bundle.connectivity.core = { status: 'failed', error: err.message };
  }

  // Test Enhanced API
  try {
    const start = Date.now();
    await alchemy.core.getTokenBalances('0x0000000000000000000000000000000000000000');
    bundle.connectivity.enhancedApi = { status: 'ok', latencyMs: Date.now() - start };
  } catch (err: any) {
    bundle.connectivity.enhancedApi = { status: 'failed', error: err.message };
  }

  // Test NFT API
  try {
    const start = Date.now();
    await alchemy.nft.getContractMetadata('0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D');
    bundle.connectivity.nftApi = { status: 'ok', latencyMs: Date.now() - start };
  } catch (err: any) {
    bundle.connectivity.nftApi = { status: 'failed', error: err.message };
  }

  // Multi-network status
  for (const [name, network] of Object.entries({
    ethereum: Network.ETH_MAINNET,
    polygon: Network.MATIC_MAINNET,
    arbitrum: Network.ARB_MAINNET,
  })) {
    try {
      const client = new Alchemy({ apiKey: process.env.ALCHEMY_API_KEY, network });
      const block = await client.core.getBlockNumber();
      bundle.networkStatus[name] = { status: 'ok', block };
    } catch (err: any) {
      bundle.networkStatus[name] = { status: 'failed', error: err.message };
    }
  }

  const filename = `alchemy-debug-${Date.now()}.json`;
  require('fs').writeFileSync(filename, JSON.stringify(bundle, null, 2));
  console.log(`Debug bundle saved: ${filename}`);
  return bundle;
}

generateDebugBundle().catch(console.error);

Step 2: Bash Quick Diagnostic

#!/bin/bash
echo "=== Alchemy Quick Diagnostics ==="
echo "API Key: ${ALCHEMY_API_KEY:+SET (redacted)}"

echo -n "ETH Mainnet: "
curl -s "https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}" \
  -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":0}' \
  | jq -r '.result // .error.message'

echo -n "Polygon: "
curl -s "https://polygon-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}" \
  -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":0}' \
  | jq -r '.result // .error.message'

echo "=== Done ==="

Output

  • JSON debug bundle with connectivity, latency, and network status
  • SDK version and environment configuration
  • Multi-network health check results

Examples

When a testnet application reports intermittent RPC failures, run the generator with a scoped development key and inspect the JSON locally. Confirm it reports SDK version, network status, aggregate latency, and only redacted key state; remove wallet addresses or application payloads if any were added by local instrumentation. Attach the sanitized bundle and relevant request ID to a support ticket. If a bundle exposes a credential or sensitive application data, do not upload it—revoke the exposed credential if necessary, correct the redaction logic, and regenerate the evidence.

Error Handling

Failure Response
Diagnostic call is unauthorized Stop the run and verify the scoped key without printing it.
A network check times out Record the network and timeout only, then compare against the provider status page.
Bundle contains sensitive data Quarantine it, rotate any exposed credential, improve redaction, and regenerate.
Support needs more context Provide sanitized request IDs, timestamps, and SDK version—not application secrets or private keys.

Resources

Next Steps

For rate limit handling, see alchemy-rate-limits.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-alchemy-debug-bundle/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-alchemy-debug-bundle.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-alchemy-debug-bundle",
  "kind": "skill",
  "name": "alchemy-debug-bundle",
  "description": "Collect Alchemy SDK debug evidence for troubleshooting and support tickets. Use when encountering persistent issues, preparing support tickets, or debugging blockchain query failures. Trigger: \"alchemy debug bundle\", \"alchemy support ticket\", \"alchemy diagnostics\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding",
      "customer_support"
    ],
    "tags": [
      "skill-md",
      "saas",
      "blockchain",
      "web3",
      "alchemy",
      "debugging",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Collect Alchemy SDK debug evidence for troubleshooting and support tickets. Use when encountering persistent issues, preparing support tickets, or debugging blockchain query failures. Trigger: \"alchemy debug bundle\", \"alchemy support ticket\", \"alchemy diagnostics\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "skills/.curated/alchemy-debug-bundle/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/skills/.curated/alchemy-debug-bundle/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/skills/.curated/alchemy-debug-bundle/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(curl:*),",
      "Bash(node:*),",
      "Grep"
    ],
    "license": "MIT"
  },
  "instructions": "# Alchemy Debug Bundle\n\n## Overview\n\nCollect diagnostic data for Alchemy support tickets: connectivity tests, SDK version, network status, CU usage, and recent error logs.\n\n## Prerequisites\n\n- A scoped development or sandbox key supplied through a secret store; never\n  pass the key as a command-line argument or include it in a captured bundle.\n- A reproducible issue with the expected network, method, time window, and\n  sanitized request/correlation ID.\n- A review path that checks the bundle for credentials, wallet-address privacy\n  concerns, or proprietary application data before it leaves the",
  "cost": {
    "context_tokens": 1371
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-alchemy-debug-bundle/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.