CL

clay-performance-tuning

Performance tuning for Clay tables to increase speed and hit rates while reducing credit waste.

Install

mkdir -p .claude/skills/clay-performance-tuning && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/8154" && unzip -o skill.zip -d .claude/skills/clay-performance-tuning && rm skill.zip

Installs to .claude/skills/clay-performance-tuning

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Optimize Clay table enrichment throughput, reduce processing time, and
70 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Order enrichment columns to prioritize fast lookups
  • Apply conditional run rules to save credits
  • Pre-process and normalize input data
  • Limit waterfall depth for faster processing
  • Schedule large imports for off-peak hours

How it works

The skill optimizes performance by reordering enrichment columns, implementing conditional logic to skip unnecessary API calls, and pre-validating data to reduce wasted credits.

Inputs & outputs

You give it
Clay table configuration and lead data
You get back
Optimized enrichment workflow and reduced credit consumption

When to use clay-performance-tuning

  • Improve enrichment hit rates
  • Order enrichment columns for faster processing
  • Reduce wasted credit spend per row
  • Troubleshoot slow enrichment workflows

About this skill

Clay Performance Tuning

Overview

Optimize Clay table processing speed, enrichment hit rates, and credit efficiency. Clay processes enrichment columns sequentially per row, and each enrichment column makes external API calls. Performance tuning focuses on reducing wasted enrichments, ordering columns optimally, and managing table auto-run behavior.

Prerequisites

  • Clay table with enrichment columns configured
  • Understanding of which providers are in your waterfall
  • Access to Clay table settings and column configuration

Instructions

Step 1: Order Enrichment Columns by Speed

Clay runs enrichment columns left-to-right. Place fast columns first:

Column TypeTypical SpeedPosition
Company lookup (Clearbit)~100msFirst (fastest)
Email finder (single provider)~200msSecond
Email waterfall (multi-provider)1-10sMiddle
Claygent AI research5-30sLater
HTTP API (outbound call)VariableLast
AI text generation2-5sAfter Claygent

Why order matters: Fast columns populate data that slow columns may need as input (e.g., company name feeds into Claygent research prompt).

Step 2: Add Conditional Run Rules

Prevent enrichments from running on rows that won't yield results:

# In Clay column settings > "Only run if" condition:

# Email waterfall: only run if we have enough input data
ISNOTEMPTY(domain) AND ISNOTEMPTY(first_name) AND ISNOTEMPTY(last_name)

# Claygent: only run for high-value prospects
ICP Score >= 60 AND ISNOTEMPTY(Company Name)

# CRM push: only run for enriched, qualified leads
ICP Score >= 70 AND ISNOTEMPTY(Work Email)

This prevents:

  • Waterfall enrichment on rows with missing domains (wasted credits)
  • Claygent research on low-value prospects (expensive AI credits)
  • CRM pushes for incomplete records

Step 3: Optimize Input Data Before Import

// src/clay/pre-process.ts — clean data before sending to Clay
interface RawLead {
  domain?: string;
  email?: string;
  first_name?: string;
  last_name?: string;
}

function preProcessForClay(rows: RawLead[]): {
  ready: RawLead[];
  filtered: { row: RawLead; reason: string }[];
  stats: { total: number; ready: number; filtered: number; deduped: number };
} {
  const personalDomains = new Set([
    'gmail.com', 'yahoo.com', 'hotmail.com', 'outlook.com',
    'icloud.com', 'aol.com', 'protonmail.com', 'mail.com',
  ]);

  const seen = new Set<string>();
  const ready: RawLead[] = [];
  const filtered: { row: RawLead; reason: string }[] = [];
  let deduped = 0;

  for (const row of rows) {
    // Normalize domain
    const domain = row.domain?.toLowerCase().trim().replace(/^(https?:\/\/)?(www\.)?/, '').replace(/\/.*$/, '');

    // Filter invalid
    if (!domain || !domain.includes('.')) {
      filtered.push({ row, reason: 'invalid domain' });
      continue;
    }
    if (personalDomains.has(domain)) {
      filtered.push({ row, reason: 'personal email domain' });
      continue;
    }
    if (!row.first_name?.trim() || !row.last_name?.trim()) {
      filtered.push({ row, reason: 'missing name' });
      continue;
    }

    // Deduplicate
    const key = `${domain}:${row.first_name?.toLowerCase()}:${row.last_name?.toLowerCase()}`;
    if (seen.has(key)) {
      deduped++;
      continue;
    }
    seen.add(key);

    ready.push({ ...row, domain });
  }

  return {
    ready,
    filtered,
    stats: {
      total: rows.length,
      ready: ready.length,
      filtered: filtered.length,
      deduped,
    },
  };
}

// Usage
const { ready, stats } = preProcessForClay(rawLeads);
console.log(`Pre-processing: ${stats.total} total -> ${stats.ready} ready (${stats.filtered} filtered, ${stats.deduped} deduped)`);
// Typical result: 30-50% of rows filtered, saving that many credits

Step 4: Limit Waterfall Depth

Each additional waterfall provider adds 1-5 seconds per row and burns credits if the previous providers already found data:

# Before: 5-provider waterfall (slow, expensive)
# Each provider: ~2 credits, ~2s
# Worst case: 10 credits, 10s per row
waterfall_deep:
  providers: [apollo, hunter, prospeo, dropcontact, findymail]
  max_time_per_row: "~10s"
  max_credits_per_row: 10

# After: 2-provider waterfall (fast, cheap)
# Covers 80%+ of findable emails with 2 providers
waterfall_optimized:
  providers: [apollo, hunter]
  max_time_per_row: "~4s"
  max_credits_per_row: 4
  coverage_loss: "~5-10%"

Rule of thumb: Apollo + one backup provider covers 80-85% of findable work emails. Adding more providers gives diminishing returns.

Step 5: Use Table-Level Auto-Update Controls

# Table Settings in Clay UI:
table_auto_update: ON   # Parent switch: if OFF, nothing auto-runs
column_settings:
  company_lookup:
    auto_run: ON          # Runs on every new row
  email_waterfall:
    auto_run: ON          # Runs on every new row (if condition met)
    condition: "ISNOTEMPTY(domain)"
  claygent_research:
    auto_run: OFF         # Manual trigger only (expensive)
  crm_push:
    auto_run: ON          # Auto-push qualified leads
    condition: "ICP Score >= 70"

Step 6: Schedule Large Imports for Off-Peak

Clay's enrichment providers respond faster during off-peak hours (US nighttime):

// src/clay/scheduler.ts
function shouldProcessNow(rowCount: number): { proceed: boolean; reason: string } {
  const hour = new Date().getUTCHours();
  const isOffPeak = hour >= 2 && hour <= 8; // 2am-8am UTC

  if (rowCount < 100) {
    return { proceed: true, reason: 'Small batch — process anytime' };
  }

  if (rowCount >= 1000 && !isOffPeak) {
    return {
      proceed: false,
      reason: `Large batch (${rowCount} rows). Schedule for 02:00-08:00 UTC for faster provider responses.`,
    };
  }

  return { proceed: true, reason: isOffPeak ? 'Off-peak — optimal time' : 'Medium batch — acceptable' };
}

Error Handling

IssueCauseSolution
Table stuck processingProvider rate limit hitWait for reset or reduce concurrency
Slow enrichment (>10s/row)Deep waterfall (5+ providers)Reduce to 2-3 providers
Low hit rate (<40%)Bad input dataPre-validate and filter before import
Credits burning with no resultsNo conditional run rulesAdd "Only run if" conditions to columns
Enrichment re-runs on editTable auto-update triggeredTurn off auto-update during bulk edits

Output

  • Optimized table with conditional enrichment rules
  • Pre-processed input data (30-50% credit savings typical)
  • Column order optimized for speed
  • Waterfall depth reduced to 2-3 providers

Resources

Next Steps

For cost optimization, see clay-cost-tuning.

When not to use it

  • Scenarios requiring maximum possible hit rate regardless of cost

Prerequisites

Clay table with enrichment columnsAccess to table settings

Limitations

  • Waterfall depth reduction may result in 5-10% coverage loss

How it compares

It shifts from a default sequential enrichment flow to a performance-tuned model that minimizes latency and credit waste through conditional execution.

Compared to similar skills

clay-performance-tuning side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
clay-performance-tuning (this skill)027dReviewIntermediate
korean-public-data-api59moNo flagsIntermediate
deepgram-performance-tuning327dReviewIntermediate
graphql66moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

korean-public-data-api

swszz

Extract API request/response schema from Korean Public Data Portal (data.go.kr) documentation pages and generate structured JSON representation

596

deepgram-performance-tuning

jeremylongshore

Optimize Deepgram API performance for faster transcription and lower latency. Use when improving transcription speed, reducing latency, or optimizing audio processing pipelines. Trigger with phrases like "deepgram performance", "speed up deepgram", "optimize transcription", "deepgram latency", "deepgram faster".

333

graphql

davila7

GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.

624

agent-performance-benchmarker

ruvnet

Agent skill for performance-benchmarker - invoke with $agent-performance-benchmarker

315

guidewire-sdk-patterns

jeremylongshore

Master Guidewire SDK patterns including Digital SDK, REST API Client, and Gosu best practices. Use when implementing integrations, building frontends with Jutro, or writing server-side Gosu code. Trigger with phrases like "guidewire sdk", "digital sdk", "jutro sdk", "guidewire patterns", "gosu best practices", "rest api client".

215

groq-performance-tuning

jeremylongshore

Optimize Groq API performance with caching, batching, and connection pooling. Use when experiencing slow API responses, implementing caching strategies, or optimizing request throughput for Groq integrations. Trigger with phrases like "groq performance", "optimize groq", "groq latency", "groq caching", "groq slow", "groq batch".

111

Search skills

Search the agent skills registry