Create a new Bubble integration for Bubble Lab following all established patterns and best practices from CREATE_BUBBLE_README.md
57%
Does it follow best practices?
Impact
100%
2.94xAverage score across 3 eval scenarios
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.claude/skills/create-bubble/SKILL.mdCreate a new Bubble integration for: $ARGUMENTS
Follow the CREATE_BUBBLE_README.md guide at packages/bubble-core/CREATE_BUBBLE_README.md exactly.
Before writing any code, ask the user:
none, apikey, oauth, basic)All bubbles use this folder structure in packages/bubble-core/src/bubbles/service-bubble/{service-name}/:
{service-name}/
├── {service-name}.schema.ts # All Zod schemas
├── {service-name}.utils.ts # Utility functions (optional)
├── {service-name}.ts # Main bubble class
├── index.ts # Exports
├── {service-name}.test.ts # Unit tests
└── {service-name}.integration.flow.ts # Integration flow test{service-name}.schema.ts)Include:
.describe() on ALL fieldssuccess and error fieldsz.discriminatedUnion() for multi-operation bubblesz.transform() over z.preprocess() for type preservationcredentials field{service-name}.ts)Required static properties:
service, authType, bubbleName, type, schema, resultSchemashortDescription, longDescription, aliasUse INPUT type for generic constraint:
export class {ServiceName}Bubble<
T extends {ServiceName}ParamsInput = {ServiceName}ParamsInput,
> extends ServiceBubble<T, Extract<{ServiceName}Result, { operation: T['operation'] }>>Implement:
constructor with default valueschooseCredential() methodperformAction() method with operation switchindex.ts)Export the bubble class and types.
{service-name}.integration.flow.ts)Integration flow tests are complete BubbleFlow workflows that exercise all bubble operations end-to-end.
Requirements:
Template structure:
import { BubbleFlow, {ServiceName}Bubble, type WebhookEvent } from '@bubblelab/bubble-core';
export interface Output {
resourceId: string;
testResults: {
operation: string;
success: boolean;
details?: string;
}[];
}
export interface TestPayload extends WebhookEvent {
testName?: string;
}
export class {ServiceName}IntegrationTest extends BubbleFlow<'webhook/http'> {
async handle(payload: TestPayload): Promise<Output> {
const results: Output['testResults'] = [];
// 1. Test first operation
const result1 = await new {ServiceName}Bubble({
operation: 'operation_name',
// ... parameters with edge cases
}).action();
results.push({
operation: 'operation_name',
success: result1.success,
details: result1.success ? `Success details` : result1.error,
});
// 2. Test subsequent operations...
// Continue testing all operations
return {
resourceId: result1.data?.id || '',
testResults: results,
};
}
}Reference: See packages/bubble-core/src/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.ts for a complete implementation.
You MUST update these 12 locations:
Credential Types - packages/bubble-shared-schemas/src/types.ts
CredentialType enum valuesCredential Configuration Map - packages/bubble-shared-schemas/src/bubble-definition-schema.ts
CREDENTIAL_CONFIGURATION_MAPCredential Environment Mapping - packages/bubble-shared-schemas/src/credential-schema.ts
CREDENTIAL_ENV_MAPFrontend Credential Configuration - apps/bubble-studio/src/pages/CredentialsPage.tsx
CREDENTIAL_TYPE_CONFIGtypeToServiceMapBubble-to-Credential Mapping - packages/bubble-shared-schemas/src/credential-schema.ts
BUBBLE_CREDENTIAL_OPTIONSBubble Name Type Definition - packages/bubble-shared-schemas/src/types.ts
BubbleName typeBackend Credential Test Parameters - apps/bubblelab-api/src/services/credential-validator.ts
createTestParameters method with ALL required parametersSystem Credential Auto-Injection (optional) - apps/bubblelab-api/src/services/bubble-flow-parser.ts
SYSTEM_CREDENTIALS if neededBubble Factory Registration - packages/bubble-core/src/bubble-factory.ts
Code Generator List - packages/bubble-core/src/bubble-factory.ts
listBubblesForCodeGenerator()Main Package Export - packages/bubble-core/src/index.ts
Logo Integration (optional) - apps/bubble-studio/src/lib/integrations.ts
SERVICE_LOGOS, INTEGRATIONS, NAME_ALIASES, and matchersRun these commands to verify:
pnpm run typecheck
pnpm run buildBefore completing, ensure:
.describe() callsType Safety:
z.input<>) for generic constraints and constructorz.output<>) for internal methods after validationthis.params as {ServiceName}Params inside performAction()Schema Best Practices:
z.transform() to preserve input types in discriminated unionsz.preprocess() only when accepting unknown/null/undefined inputs.describe() calls.optional().default(value)Error Handling:
{ success: false, error: message } formatStudy these existing bubbles for patterns:
packages/bubble-core/src/bubbles/service-bubble/google-sheets/packages/bubble-core/src/bubbles/service-bubble/ai-agent/packages/bubble-core/src/bubbles/tool-bubble/bubblelabai/BubbleLab
e64b246
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.