/salesloft-pack:salesloft-local-dev-loopfrom salesloft-pack
Sets up local SalesLoft development with API mocking, test fixtures, and sandbox testing. Use when building or testing SalesLoft integrations offline.
Ships in salesloft-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Set up a local development workflow for SalesLoft integrations with API mocking, environment separation, and fast iteration. SalesLoft has no official sandbox -- use test data tagging and request recording for safe development.
salesloft-install-auth setup// src/salesloft/client.ts
import axios, { AxiosInstance } from 'axios';
export function createClient(token?: string): AxiosInstance {
return axios.create({
baseURL: process.env.SALESLOFT_BASE_URL || 'https://api.salesloft.com/v2',
headers: {
Authorization: `Bearer ${token || process.env.SALESLOFT_API_KEY}`,
'Content-Type': 'application/json',
},
});
}
// tests/fixtures/salesloft.ts
export const mockPerson = {
data: {
id: 1001, display_name: 'Test User', email_address: '[email protected]',
first_name: 'Test', last_name: 'User', title: 'Engineer',
phone: '+1-555-0100', company_name: 'Acme Corp',
tags: ['dev_test'], created_at: '2025-01-15T10:00:00Z',
},
};
export const mockPeopleList = {
data: [mockPerson.data],
metadata: { paging: { per_page: 25, current_page: 1, total_pages: 1, total_count: 1 } },
};
export const mockCadence = {
data: {
id: 500, name: 'Test Outbound', team_cadence: false,
current_state: 'active', added_stage: 'prospecting',
cadence_framework_id: null, counts: { people_count: 10 },
},
};
export const mockActivity = {
data: {
id: 2001, action_type: 'email', person_id: 1001,
cadence_id: 500, step_id: 100, due_at: '2025-02-01T09:00:00Z',
},
};
// tests/salesloft.test.ts
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { createClient } from '../src/salesloft/client';
import { mockPeopleList, mockCadence } from './fixtures/salesloft';
vi.mock('axios', () => ({
default: { create: vi.fn(() => ({
get: vi.fn(), post: vi.fn(), put: vi.fn(), delete: vi.fn(),
}))},
}));
describe('SalesLoft People API', () => {
it('lists people with pagination metadata', async () => {
const client = createClient('test-token');
vi.mocked(client.get).mockResolvedValue({ data: mockPeopleList });
const { data } = await client.get('/people.json', { params: { per_page: 25 } });
expect(data.metadata.paging.total_count).toBe(1);
expect(data.data[0].email_address).toBe('[email protected]');
});
it('filters people by cadence membership', async () => {
const client = createClient('test-token');
vi.mocked(client.get).mockResolvedValue({ data: mockPeopleList });
const { data } = await client.get('/people.json', {
params: { cadence_id: 500, per_page: 25 },
});
expect(data.data.length).toBeGreaterThan(0);
});
});
# .env.development
SALESLOFT_BASE_URL=https://api.salesloft.com/v2
SALESLOFT_API_KEY=dev-token-here
SALESLOFT_TAG_PREFIX=dev_test_
# .env.test
SALESLOFT_BASE_URL=http://localhost:3001/mock
SALESLOFT_API_KEY=mock-token
{
"scripts": {
"dev": "tsx watch src/index.ts",
"test": "vitest",
"test:integration": "dotenv -e .env.development vitest run --config vitest.integration.ts"
}
}
PASS tests/salesloft.test.ts
SalesLoft People API
✓ lists people with pagination metadata (2ms)
✓ filters people by cadence membership (1ms)
| Error | Cause | Solution |
|---|---|---|
ECONNREFUSED | Mock server not running | Use vi.mock instead of live mock server |
401 in integration tests | Token expired | Refresh dev token from SalesLoft portal |
| Stale mock data | API response shape changed | Record fresh responses with interceptor |
Proceed to salesloft-sdk-patterns for production client patterns.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
salesloft, api-mocking, integration-testing, local-development
18 skills in this plugin
/salesloft-ci-integrationSet up CI/CD pipelines for SalesLoft integrations with GitHub Actions.
Use when automating SalesLoft integration tests, validating OAuth tokens,
or running cadence sync validation in CI.
Trigger: "salesloft CI", "salesloft GitHub Actions", "salesloft automated tests".
/salesloft-common-errorsDiagnose and fix SalesLoft API errors: 401, 403, 422, 429, and 5xx.
Use when encountering SalesLoft errors, debugging failed requests,
or troubleshooting OAuth token issues.
Trigger: "salesloft error", "fix salesloft", "salesloft not working", "salesloft 429".
/salesloft-core-workflow-aManage SalesLoft people, cadences, and email steps via the REST API.
Use when building prospect management, enrolling people in cadences,
or automating outbound sales sequences.
Trigger: "salesloft cadence", "salesloft people", "salesloft outbound sequence".
/salesloft-core-workflow-bTrack SalesLoft activities, emails, calls, and analytics via the REST API.
Use when reading email engagement data, logging call dispositions,
or building sales activity dashboards.
Trigger: "salesloft activities", "salesloft emails", "salesloft calls", "salesloft analytics".
/salesloft-cost-tuningOptimize SalesLoft API costs by reducing request volume and deep pagination.
Use when analyzing API usage, reducing rate limit consumption,
or planning capacity for bulk operations.
Trigger: "salesloft cost", "salesloft billing", "reduce salesloft API usage".
/salesloft-debug-bundleCollect SalesLoft debug evidence for support tickets and troubleshooting.
Use when encountering persistent issues, preparing support tickets,
or collecting diagnostic info for SalesLoft API problems.
Trigger: "salesloft debug", "salesloft diagnostic", "salesloft support bundle".
npx claudepluginhub flight505/skill-forge --plugin salesloft-packOther plugins' skills for the same job