Skip to content
AI & Agents
Agent

quality-imports

When working with imports in the Cal.diy codebase, particularly in app-store integrations, pay attention to whether modules use named exports or default exports.

From plugin
caldiy
47k95 skills95 agents
Install
$ npx -y skills add calcom/cal.com --agent claude-code

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

When working with imports in the Cal.diy codebase, particularly in app-store integrations, pay attention to whether modules use named exports or default exports.

Agent definition

quality-imports.md
title: Import and Export Patterns
impact: MEDIUM
impactDescription: Incorrect imports cause build failures and bundle bloat
tags: imports, exports, modules, app-store

Import and Export Patterns

Named vs Default Exports

When working with imports in the Cal.diy codebase, particularly in app-store integrations, pay attention to whether modules use named exports or default exports.

Many services like VideoApiAdapter, CalendarService, and PaymentService are exported as named exports, but the actual export name may differ from the generic service type.

// ✅ Good - Verify actual export name and use named import
import { AppleCalendarService } from "./applecalendar/lib/CalendarService";

// With renaming if needed
import { AppleCalendarService as ApplecalendarCalendarService } from "./applecalendar/lib/CalendarService";

// ❌ Bad - Assuming default export without checking
import CalendarService from "./applecalendar/lib/CalendarService";

Generated Files

When fixing imports in Cal.diy's generated files (like `packages/app-store/apps.browser-*.generated.tsx`), always check the actual exports in the source files first.

For EventTypeAppCardInterface components, they likely use named exports rather than default exports, requiring:

import * as ComponentName from "./path";
// instead of
import ComponentName from "./path";

Factory Function Naming

When creating factory functions that replace class exports, use the naming convention `Build[ServiceName]` instead of just `[ServiceName]`:

// ✅ Good - Clear factory function naming
export function BuildPaymentService() { ... }

// ❌ Bad - Confusing with class export
export function PaymentService() { ... }
Read more
Ships withcaldiy

Scheduling infrastructure for absolutely everyone.

Get the whole plugin