hubspot-load-scale
Load test HubSpot integrations and plan capacity around API rate limits. Use when running performance tests, planning for traffic growth, or sizing your HubSpot integration for production load. Trigger with phrases like "hubspot load test", "hubspot scale", "hubspot capacity", "hubspot benchmark", "hubspot traffic planning".
Best use case
hubspot-load-scale is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Load test HubSpot integrations and plan capacity around API rate limits. Use when running performance tests, planning for traffic growth, or sizing your HubSpot integration for production load. Trigger with phrases like "hubspot load test", "hubspot scale", "hubspot capacity", "hubspot benchmark", "hubspot traffic planning".
Teams using hubspot-load-scale should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/hubspot-load-scale/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How hubspot-load-scale Compares
| Feature / Agent | hubspot-load-scale | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Load test HubSpot integrations and plan capacity around API rate limits. Use when running performance tests, planning for traffic growth, or sizing your HubSpot integration for production load. Trigger with phrases like "hubspot load test", "hubspot scale", "hubspot capacity", "hubspot benchmark", "hubspot traffic planning".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
SKILL.md Source
# HubSpot Load & Scale
## Overview
Load testing and capacity planning for HubSpot integrations, constrained by the 10 requests/second and 500,000 requests/day API limits.
## Prerequisites
- k6 or similar load testing tool
- HubSpot developer test account (never load test against production)
- Understanding of HubSpot rate limits
## Instructions
### Step 1: Understand HubSpot Rate Limit Constraints
Your integration's maximum throughput is bound by HubSpot's limits:
| Constraint | Limit | Impact |
|-----------|-------|--------|
| Per-second | 10 req/sec | 600 req/min maximum |
| Daily | 500,000/day | ~347 req/min sustained |
| Batch size | 100 records/batch | Each batch = 1 API call |
| Search results | 10,000 total | Cannot page past 10K |
| Associations | 500 per record | Hard limit |
**Effective throughput with batching:**
- Individual operations: 10 records/sec
- Batch operations: 1,000 records/sec (10 batches/sec x 100 records/batch)
### Step 2: k6 Load Test Script
```javascript
// hubspot-load-test.js
import http from 'k6/http';
import { check, sleep } from 'k6';
import { Rate, Trend } from 'k6/metrics';
const errorRate = new Rate('hubspot_errors');
const rateLimited = new Rate('hubspot_rate_limited');
export const options = {
stages: [
{ duration: '1m', target: 2 }, // warm up (2 req/sec)
{ duration: '3m', target: 5 }, // moderate load
{ duration: '2m', target: 8 }, // approach limit
{ duration: '2m', target: 10 }, // at limit
{ duration: '1m', target: 0 }, // ramp down
],
thresholds: {
http_req_duration: ['p(95)<2000'], // 95% under 2s
hubspot_errors: ['rate<0.05'], // <5% errors
hubspot_rate_limited: ['rate<0.10'], // <10% rate limited
},
};
const BASE_URL = 'https://api.hubapi.com';
const TOKEN = __ENV.HUBSPOT_ACCESS_TOKEN;
export default function () {
// Test: List contacts (GET)
const listRes = http.get(
`${BASE_URL}/crm/v3/objects/contacts?limit=10&properties=email,firstname`,
{ headers: { Authorization: `Bearer ${TOKEN}` } }
);
check(listRes, { 'list contacts: 200': (r) => r.status === 200 });
errorRate.add(listRes.status >= 400 && listRes.status !== 429);
rateLimited.add(listRes.status === 429);
sleep(0.1); // 100ms between requests per VU
// Test: Search contacts (POST)
const searchRes = http.post(
`${BASE_URL}/crm/v3/objects/contacts/search`,
JSON.stringify({
filterGroups: [{
filters: [{
propertyName: 'lifecyclestage',
operator: 'EQ',
value: 'lead',
}],
}],
properties: ['email'],
limit: 10,
after: 0,
sorts: [],
}),
{
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${TOKEN}`,
},
}
);
check(searchRes, { 'search contacts: 200': (r) => r.status === 200 });
errorRate.add(searchRes.status >= 400 && searchRes.status !== 429);
rateLimited.add(searchRes.status === 429);
sleep(0.1);
}
```
```bash
# Run against test account only
k6 run --env HUBSPOT_ACCESS_TOKEN=$HUBSPOT_TEST_TOKEN hubspot-load-test.js
```
### Step 3: Capacity Planning Calculator
```typescript
interface CapacityPlan {
operationType: string;
recordsPerDay: number;
apiCallsPerDay: number;
batchApiCallsPerDay: number;
percentOfDailyQuota: number;
feasible: boolean;
}
function planCapacity(operations: Array<{
type: string;
recordsPerDay: number;
batchable: boolean;
}>): CapacityPlan[] {
const DAILY_LIMIT = 500_000;
let totalCalls = 0;
const plans = operations.map(op => {
const apiCallsPerDay = op.batchable
? Math.ceil(op.recordsPerDay / 100) // batch: 100 per call
: op.recordsPerDay; // individual: 1 per call
totalCalls += apiCallsPerDay;
return {
operationType: op.type,
recordsPerDay: op.recordsPerDay,
apiCallsPerDay: op.batchable ? op.recordsPerDay : apiCallsPerDay,
batchApiCallsPerDay: apiCallsPerDay,
percentOfDailyQuota: (apiCallsPerDay / DAILY_LIMIT) * 100,
feasible: apiCallsPerDay < DAILY_LIMIT * 0.5, // leave 50% headroom
};
});
console.log(`\nTotal daily API calls: ${totalCalls.toLocaleString()} / ${DAILY_LIMIT.toLocaleString()}`);
console.log(`Quota utilization: ${((totalCalls / DAILY_LIMIT) * 100).toFixed(1)}%`);
if (totalCalls > DAILY_LIMIT) {
console.warn('WARNING: Exceeds daily limit! Optimize with batching or reduce volume.');
}
return plans;
}
// Example capacity plan
planCapacity([
{ type: 'Sync contacts (read)', recordsPerDay: 50000, batchable: true },
{ type: 'Create deals', recordsPerDay: 500, batchable: true },
{ type: 'Search contacts', recordsPerDay: 10000, batchable: false },
{ type: 'Webhook processing', recordsPerDay: 5000, batchable: false },
]);
// Total: 500 + 5 + 10000 + 5000 = 15,505 API calls
// Quota: 3.1% -- very feasible
```
### Step 4: Scaling Patterns for High Volume
```typescript
// Pattern 1: Queue-based rate limiting
import PQueue from 'p-queue';
const hubspotQueue = new PQueue({
concurrency: 5,
interval: 1000,
intervalCap: 10, // HubSpot's 10/sec limit
});
// Pattern 2: Batch aggregation
class BatchAggregator<T> {
private buffer: T[] = [];
private timer: NodeJS.Timeout | null = null;
constructor(
private maxBatch: number,
private maxWaitMs: number,
private flush: (items: T[]) => Promise<void>
) {}
add(item: T): void {
this.buffer.push(item);
if (this.buffer.length >= this.maxBatch) {
this.flushNow();
} else if (!this.timer) {
this.timer = setTimeout(() => this.flushNow(), this.maxWaitMs);
}
}
private async flushNow(): Promise<void> {
if (this.timer) { clearTimeout(this.timer); this.timer = null; }
if (this.buffer.length === 0) return;
const batch = this.buffer.splice(0, this.maxBatch);
await this.flush(batch);
}
}
// Usage: aggregate individual creates into batch creates
const contactAggregator = new BatchAggregator(
100, // max batch size (HubSpot limit)
5000, // flush every 5 seconds max
async (contacts) => {
await client.crm.contacts.batchApi.create({
inputs: contacts.map(c => ({ properties: c, associations: [] })),
});
}
);
```
## Output
- Understanding of HubSpot rate limit constraints
- k6 load test script for realistic testing
- Capacity planning calculator for daily operations
- Queue-based rate limiting for production use
- Batch aggregation pattern for high-volume writes
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| Load test hits 429 immediately | Testing against shared portal | Use dedicated test account |
| k6 results inconsistent | HubSpot API latency varies | Run multiple iterations |
| Capacity plan exceeds limit | Too many individual calls | Convert to batch operations |
| Batch aggregator data loss | App crash before flush | Add persistence to buffer |
## Resources
- [HubSpot API Usage Guidelines](https://developers.hubspot.com/docs/guides/apps/api-usage/usage-details)
- [k6 Documentation](https://grafana.com/docs/k6/)
- [p-queue npm](https://github.com/sindresorhus/p-queue)
## Next Steps
For reliability patterns, see `hubspot-reliability-patterns`.Related Skills
testing-load-balancers
Validate load balancer behavior, failover, and traffic distribution. Use when performing specialized testing. Trigger with phrases like "test load balancer", "validate failover", or "check traffic distribution".
windsurf-load-scale
Scale Windsurf adoption across large organizations with workspace strategies and performance tuning. Use when rolling out Windsurf to 50+ developers, managing large monorepo workspaces, or planning enterprise-scale deployment. Trigger with phrases like "windsurf at scale", "windsurf large team", "windsurf monorepo", "windsurf organization", "windsurf 100 developers".
vercel-load-scale
Load test and scale Vercel deployments with concurrency tuning and capacity planning. Use when running performance tests, planning for traffic spikes, or optimizing serverless function scaling on Vercel. Trigger with phrases like "vercel load test", "vercel scale", "vercel performance test", "vercel capacity", "vercel benchmark".
supabase-load-scale
Scale Supabase projects for production load: read replicas, connection pooling tuning via Supavisor, compute size upgrades, CDN caching for Storage, Edge Function regional deployment, and database table partitioning. Use when preparing for traffic spikes, optimizing connection limits, setting up read replicas for analytics queries, or partitioning large tables. Trigger with phrases like "supabase scale", "supabase read replica", "supabase connection pooling", "supabase compute upgrade", "supabase CDN storage", "supabase edge function regions", "supabase partitioning", "supavisor", "supabase pool mode".
snowflake-load-scale
Implement Snowflake load testing, warehouse scaling, and capacity planning. Use when testing query performance at scale, configuring multi-cluster warehouses, or planning capacity for production Snowflake workloads. Trigger with phrases like "snowflake load test", "snowflake scale", "snowflake capacity", "snowflake benchmark", "snowflake multi-cluster".
shopify-load-scale
Load test Shopify integrations respecting API rate limits, plan capacity with k6, and scale for Shopify Plus burst events (flash sales, BFCM). Trigger with phrases like "shopify load test", "shopify scale", "shopify BFCM", "shopify flash sale", "shopify capacity", "shopify k6 test".
sentry-load-scale
Scale Sentry for high-traffic applications handling millions of events per day. Use when optimizing SDK performance at high volume, implementing adaptive sampling, managing quotas and costs at scale, or deploying Sentry across multi-region infrastructure. Trigger with phrases like "sentry high traffic", "scale sentry", "sentry millions events", "sentry high volume", "sentry quota management", "sentry load test".
salesforce-load-scale
Implement Salesforce load testing, API limit capacity planning, and Bulk API scaling. Use when running performance tests against Salesforce, planning API consumption, or scaling high-volume Salesforce integrations. Trigger with phrases like "salesforce load test", "salesforce scale", "salesforce performance test", "salesforce capacity planning", "salesforce high volume".
retellai-load-scale
Retell AI load scale — AI voice agent and phone call automation. Use when working with Retell AI for voice agents, phone calls, or telephony. Trigger with phrases like "retell load scale", "retellai-load-scale", "voice agent".
replit-load-scale
Load test and scale Replit deployments with Autoscale tuning, Reserved VM sizing, and capacity planning. Use when load testing Replit apps, optimizing Autoscale behavior, or planning capacity for production traffic. Trigger with phrases like "replit load test", "replit scale", "replit capacity", "replit performance test", "replit autoscale tuning".
perplexity-load-scale
Load test Perplexity Sonar API integrations and plan capacity. Use when running performance tests, planning for traffic growth, or benchmarking Perplexity latency under load. Trigger with phrases like "perplexity load test", "perplexity scale", "perplexity performance test", "perplexity capacity", "perplexity benchmark".
openrouter-load-balancing
Distribute OpenRouter requests across multiple keys and models for high throughput. Use when scaling beyond single-key rate limits or building high-availability systems. Triggers: 'openrouter load balance', 'openrouter scaling', 'distribute openrouter requests', 'multiple api keys'.