bamboohr-local-dev-loop
Configure BambooHR local development with hot reload, mocking, and testing. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with BambooHR API. Trigger with phrases like "bamboohr dev setup", "bamboohr local development", "bamboohr dev environment", "develop with bamboohr", "bamboohr mock".
Best use case
bamboohr-local-dev-loop is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Configure BambooHR local development with hot reload, mocking, and testing. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with BambooHR API. Trigger with phrases like "bamboohr dev setup", "bamboohr local development", "bamboohr dev environment", "develop with bamboohr", "bamboohr mock".
Teams using bamboohr-local-dev-loop 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/bamboohr-local-dev-loop/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How bamboohr-local-dev-loop Compares
| Feature / Agent | bamboohr-local-dev-loop | 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?
Configure BambooHR local development with hot reload, mocking, and testing. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with BambooHR API. Trigger with phrases like "bamboohr dev setup", "bamboohr local development", "bamboohr dev environment", "develop with bamboohr", "bamboohr mock".
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.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
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
# BambooHR Local Dev Loop
## Overview
Set up a fast, reproducible local development workflow for BambooHR integrations with request mocking, hot reload, and integration testing against the real API.
## Prerequisites
- Completed `bamboohr-install-auth` setup
- Node.js 18+ with npm or pnpm
- `BAMBOOHR_API_KEY` and `BAMBOOHR_COMPANY_DOMAIN` set in `.env`
## Instructions
### Step 1: Project Structure
```
my-bamboohr-project/
├── src/
│ ├── bamboohr/
│ │ ├── client.ts # Reusable API client
│ │ ├── types.ts # BambooHR response types
│ │ └── employees.ts # Employee operations
│ └── index.ts
├── tests/
│ ├── mocks/
│ │ └── bamboohr.ts # API response fixtures
│ ├── unit/
│ │ └── employees.test.ts
│ └── integration/
│ └── bamboohr.test.ts
├── .env.local # Real API key (git-ignored)
├── .env.example # Template for team
├── .env.test # Test config (sandbox key)
└── package.json
```
### Step 2: Create Reusable API Client
```typescript
// src/bamboohr/client.ts
import 'dotenv/config';
export class BambooHRClient {
private baseUrl: string;
private authHeader: string;
constructor(companyDomain?: string, apiKey?: string) {
const domain = companyDomain || process.env.BAMBOOHR_COMPANY_DOMAIN!;
const key = apiKey || process.env.BAMBOOHR_API_KEY!;
this.baseUrl = `https://api.bamboohr.com/api/gateway.php/${domain}/v1`;
this.authHeader = `Basic ${Buffer.from(`${key}:x`).toString('base64')}`;
}
async request<T>(path: string, options: RequestInit = {}): Promise<T> {
const res = await fetch(`${this.baseUrl}${path}`, {
...options,
headers: {
Authorization: this.authHeader,
Accept: 'application/json',
'Content-Type': 'application/json',
...options.headers,
},
});
if (!res.ok) {
const errMsg = res.headers.get('X-BambooHR-Error-Message') || res.statusText;
throw new BambooHRError(res.status, errMsg, path);
}
return res.json() as Promise<T>;
}
async getEmployee(id: number | string, fields: string[]): Promise<Record<string, string>> {
return this.request(`/employees/${id}/?fields=${fields.join(',')}`);
}
async getDirectory(): Promise<{ employees: BambooEmployee[] }> {
return this.request('/employees/directory');
}
}
export class BambooHRError extends Error {
constructor(public status: number, message: string, public path: string) {
super(`BambooHR ${status}: ${message} [${path}]`);
this.name = 'BambooHRError';
}
}
```
### Step 3: Setup Hot Reload and Scripts
```json
{
"scripts": {
"dev": "tsx watch src/index.ts",
"test": "vitest run",
"test:watch": "vitest --watch",
"test:integration": "DOTENV_CONFIG_PATH=.env.test vitest run tests/integration/",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"tsx": "^4.0.0",
"vitest": "^2.0.0",
"typescript": "^5.5.0",
"msw": "^2.0.0"
}
}
```
### Step 4: Mock BambooHR API with MSW
```typescript
// tests/mocks/bamboohr.ts
import { http, HttpResponse } from 'msw';
const MOCK_COMPANY = 'testcompany';
const BASE = `https://api.bamboohr.com/api/gateway.php/${MOCK_COMPANY}/v1`;
export const bamboohrHandlers = [
// Employee directory
http.get(`${BASE}/employees/directory`, () => {
return HttpResponse.json({
fields: [{ id: 'displayName', type: 'text', name: 'Display Name' }],
employees: [
{
id: '1', displayName: 'Jane Smith', firstName: 'Jane',
lastName: 'Smith', jobTitle: 'Engineer', department: 'Engineering',
workEmail: 'jane@test.com', location: 'Remote',
},
{
id: '2', displayName: 'Bob Jones', firstName: 'Bob',
lastName: 'Jones', jobTitle: 'Designer', department: 'Design',
workEmail: 'bob@test.com', location: 'NYC',
},
],
});
}),
// Single employee
http.get(`${BASE}/employees/:id/`, ({ params }) => {
return HttpResponse.json({
id: params.id, firstName: 'Jane', lastName: 'Smith',
jobTitle: 'Engineer', department: 'Engineering',
hireDate: '2023-01-15', workEmail: 'jane@test.com',
status: 'Active',
});
}),
// Custom report
http.post(`${BASE}/reports/custom`, () => {
return HttpResponse.json({
title: 'Test Report', employees: [
{ firstName: 'Jane', lastName: 'Smith', department: 'Engineering' },
],
});
}),
];
```
### Step 5: Write Unit Tests
```typescript
// tests/unit/employees.test.ts
import { describe, it, expect, beforeAll, afterAll, afterEach } from 'vitest';
import { setupServer } from 'msw/node';
import { bamboohrHandlers } from '../mocks/bamboohr';
import { BambooHRClient } from '../../src/bamboohr/client';
const server = setupServer(...bamboohrHandlers);
beforeAll(() => server.listen({ onUnhandledRequest: 'error' }));
afterEach(() => server.resetHandlers());
afterAll(() => server.close());
describe('BambooHRClient', () => {
const client = new BambooHRClient('testcompany', 'fake-key');
it('fetches the employee directory', async () => {
const dir = await client.getDirectory();
expect(dir.employees).toHaveLength(2);
expect(dir.employees[0].displayName).toBe('Jane Smith');
});
it('fetches a single employee', async () => {
const emp = await client.getEmployee(1, ['firstName', 'lastName', 'jobTitle']);
expect(emp.firstName).toBe('Jane');
expect(emp.jobTitle).toBe('Engineer');
});
});
```
### Step 6: Integration Test Against Real API
```typescript
// tests/integration/bamboohr.test.ts
import { describe, it, expect } from 'vitest';
import { BambooHRClient } from '../../src/bamboohr/client';
const HAS_KEY = !!process.env.BAMBOOHR_API_KEY;
describe.skipIf(!HAS_KEY)('BambooHR Integration', () => {
const client = new BambooHRClient();
it('should fetch the real employee directory', async () => {
const dir = await client.getDirectory();
expect(dir.employees.length).toBeGreaterThan(0);
expect(dir.employees[0]).toHaveProperty('displayName');
}, 15_000);
});
```
## Output
- Reusable `BambooHRClient` with typed methods
- MSW mocks for offline development
- Unit tests with mocked API
- Integration tests gated on `BAMBOOHR_API_KEY` presence
- Hot-reload dev server via `tsx watch`
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| `BambooHRError 401` | Wrong key in `.env.local` | Re-copy from BambooHR dashboard |
| MSW `onUnhandledRequest` | Unmocked endpoint hit | Add handler to `bamboohrHandlers` |
| `ECONNREFUSED` in tests | MSW server not started | Ensure `beforeAll(() => server.listen())` |
| Slow integration tests | Real API latency | Increase vitest timeout to 15s |
## Resources
- [MSW Documentation](https://mswjs.io/)
- [Vitest Documentation](https://vitest.dev/)
- [BambooHR API Technical Overview](https://documentation.bamboohr.com/docs/api-details)
## Next Steps
See `bamboohr-sdk-patterns` for production-ready code patterns.Related Skills
workhuman-local-dev-loop
Workhuman local dev loop for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman local dev loop".
wispr-local-dev-loop
Wispr Flow local dev loop for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr local dev loop".
windsurf-local-dev-loop
Configure Windsurf local development workflow with Cascade, Previews, and terminal integration. Use when setting up a development environment, configuring Turbo mode, or establishing a fast iteration cycle with Windsurf AI. Trigger with phrases like "windsurf dev setup", "windsurf local development", "windsurf dev environment", "windsurf workflow", "develop with windsurf".
webflow-local-dev-loop
Configure a Webflow local development workflow with TypeScript, hot reload, mocked API tests, and webhook tunneling via ngrok. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with the Webflow Data API. Trigger with phrases like "webflow dev setup", "webflow local development", "webflow dev environment", "develop with webflow".
vercel-local-dev-loop
Configure Vercel local development with vercel dev, environment variables, and hot reload. Use when setting up a development environment, testing serverless functions locally, or establishing a fast iteration cycle with Vercel. Trigger with phrases like "vercel dev setup", "vercel local development", "vercel dev environment", "develop with vercel locally".
veeva-local-dev-loop
Veeva Vault local dev loop for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva local dev loop".
vastai-local-dev-loop
Configure Vast.ai local development with testing and fast iteration. Use when setting up a development environment, testing instance provisioning, or building a fast iteration cycle for GPU workloads. Trigger with phrases like "vastai dev setup", "vastai local development", "vastai dev environment", "develop with vastai".
twinmind-local-dev-loop
Set up local development workflow with TwinMind API integration. Use when building applications that integrate TwinMind transcription, testing API calls locally, or developing meeting automation tools. Trigger with phrases like "twinmind dev setup", "twinmind local development", "twinmind API testing", "build with twinmind".
together-local-dev-loop
Together AI local dev loop for inference, fine-tuning, and model deployment. Use when working with Together AI's OpenAI-compatible API. Trigger: "together local dev loop".
techsmith-local-dev-loop
TechSmith local dev loop for Snagit COM API and Camtasia automation. Use when working with TechSmith screen capture and video editing automation. Trigger: "techsmith local dev loop".
supabase-local-dev-loop
Configure Supabase local development with the CLI, Docker, and migration workflow. Use when initializing a Supabase project locally, starting the local stack, writing migrations, seeding data, or iterating on schema changes. Trigger with phrases like "supabase local dev", "supabase start", "supabase init", "supabase db reset", "supabase local setup".
stackblitz-local-dev-loop
Configure local development for WebContainer applications with hot reload and testing. Use when building browser-based IDEs, testing WebContainer file operations, or setting up development workflows for WebContainer projects. Trigger: "stackblitz dev setup", "webcontainer local", "test webcontainers locally".