Claude Code skill pack for Lucidchart (18 skills)
Installation
Open Claude Code and run this command:
/plugin install lucidchart-pack@claude-code-plugins-plus
Use --global to install for all projects, or --project for current project only.
Skills (18)
Ci Integration for Lucidchart.
Lucidchart CI Integration
Overview
Configure CI pipelines that validate Lucidchart diagramming API integrations using a two-tier testing strategy. Unit tests mock the Lucidchart REST client to verify document creation, shape manipulation, and export logic without requiring OAuth2 credentials. Integration tests run on main-branch merges with a real OAuth2 token to confirm document CRUD, versioned API header handling, and export rendering against the live Lucidchart API. This separation keeps PR cycles fast while catching OAuth flow regressions and API version changes before they reach production.
GitHub Actions Workflow
# .github/workflows/lucidchart-tests.yml
name: Lucidchart API Tests
on: [push, pull_request]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20' }
- run: npm ci
- run: npm run lint && npm run typecheck
- run: npm test -- --testPathPattern=unit # No OAuth credentials needed
integration-tests:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: unit-tests
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20' }
- run: npm ci
- run: npm test -- --testPathPattern=integration
env:
LUCID_API_KEY: ${{ secrets.LUCID_API_KEY }}
LUCID_CLIENT_SECRET: ${{ secrets.LUCID_CLIENT_SECRET }}
Mock-Based Unit Tests
// tests/unit/document-service.test.ts
import { describe, it, expect, vi } from 'vitest';
import { createDiagram } from '../../src/services/document-service';
import * as lucidClient from '../../src/lib/lucid-client';
vi.mock('../../src/lib/lucid-client');
describe('DocumentService', () => {
it('creates a flowchart document with initial shapes', async () => {
vi.mocked(lucidClient.post).mockResolvedValue({
documentId: 'doc-7742',
title: 'CI Pipeline Diagram',
pageCount: 1,
editUrl: 'https://lucid.app/documents/edit/doc-7742',
});
const result = await createDiagram('CI Pipeline Diagram', 'flowchart');
expect(result.documentId).toBe('doc-7742');
expect(lucidClient.post).toHaveBeenCalledWith(
'/documents',
{ title: 'CI Pipeline Diagram', template: 'flowchart' },
{ headers: { 'Lucid-Api-Version': '1' } }
);
});
});
Integration Tests
// tests/integration/document-export.test.ts
import { describe, it, expect } from 'vitest';
import { LucidClient } from '../../src/lib/lucid-client';
const canRun = process.env.LUCID_API_KEY && process.env.LUCID_CLIENDiagnose and fix Lucidchart common errors.
Lucidchart Common Errors
Overview
Lucidchart's API enables programmatic diagram creation, document management, shape manipulation, and team collaboration workflows. Common integration errors include OAuth token expiration during long-running batch operations, document lock conflicts when multiple users edit simultaneously, and shape API 422 errors from invalid geometry or missing parent references. The OAuth token refresh flow is the most common stumbling block -- access tokens expire after 60 minutes, and batch operations that exceed this window fail mid-run. This reference covers authentication, document lifecycle, and shape-level validation issues for the Lucid developer platform.
Error Reference
| Code | Message | Cause | Fix |
|---|---|---|---|
401 |
Token expired |
OAuth2 access token expired | Use refresh token to obtain new access token |
403 |
Insufficient scopes |
OAuth app missing required permission scopes | Re-authorize with lucidchart.document.content and needed scopes |
404 |
Document not found |
Invalid document ID or user lacks access | Verify document ID and that API user has viewer/editor role |
409 |
Document locked |
Another user is actively editing | Wait for lock release or use force-unlock with admin privileges |
422 |
Invalid shape data |
Shape position/size out of bounds or missing parent | Validate x/y/width/height > 0; ensure parent page exists |
422 |
Invalid connection |
Source or target shape ID does not exist | Create shapes before connecting them; verify shape IDs |
429 |
Rate limited |
Exceeded 100 requests/minute | Implement exponential backoff; batch shape operations |
500 |
Export failed |
PDF/PNG export timed out on complex diagram | Reduce page count or simplify shapes before export |
Error Handler
interface LucidchartError {
code: number;
message: string;
category: "auth" | "rate_limit" | "validation" | "conflict";
}
function classifyLucidchartError(status: number, body: string): LucidchartError {
if (status === 401 || status === 403) {
return { code: status, message: body, category: "auth" };
}
if (status === 429) {
return { code: 429, message: "Rate limited", category: "rate_limit" };
}
if (status === 409) {
return { code: 409, message: body, caExecute Lucidchart primary workflow: Document & Shape Creation.
Lucidchart — Document & Diagram Management
Overview
Primary workflow for Lucidchart document and diagram management. Covers the complete
lifecycle: creating documents, adding shapes and connectors via Standard Import,
editing diagram content programmatically, and exporting to PNG, PDF, or SVG. Uses the
Lucid REST API v1 with OAuth 2.0 authorization. The Standard Import format (.lucid)
supports pages, shapes, lines, groups, and styling in a single declarative payload.
Instructions
Step 1: Create a Document
const doc = await client.documents.create({
title: 'API Architecture Diagram',
product: 'lucidchart', // or 'lucidspark'
});
console.log(`Document: ${doc.documentId}`);
console.log(`Edit URL: ${doc.editUrl}`);
Step 2: Add Shapes and Connectors via Standard Import
const importData = {
pages: [{
id: 'page1',
title: 'Main',
shapes: [
{ id: 's1', type: 'rectangle', boundingBox: { x: 100, y: 100, w: 200, h: 80 },
text: 'API Gateway', style: { fill: '#4A90D9' } },
{ id: 's2', type: 'rectangle', boundingBox: { x: 100, y: 300, w: 200, h: 80 },
text: 'Database', style: { fill: '#7B68EE' } },
{ id: 's3', type: 'rectangle', boundingBox: { x: 400, y: 200, w: 200, h: 80 },
text: 'Auth Service', style: { fill: '#50C878' } },
],
lines: [
{ id: 'l1', endpoint1: { shapeId: 's1' }, endpoint2: { shapeId: 's2' },
stroke: { color: '#333', width: 2 } },
{ id: 'l2', endpoint1: { shapeId: 's1' }, endpoint2: { shapeId: 's3' },
stroke: { color: '#333', width: 2, pattern: 'dashed' } },
],
}],
};
await client.documents.import(doc.documentId, importData);
Step 3: Edit Existing Content
const pages = await client.documents.getPages(doc.documentId);
const pageId = pages[0].id;
// Update a shape's text and style
await client.pages.updateShape(doc.documentId, pageId, 's1', {
text: 'API Gateway v2',
style: { fill: '#2E86C1', fontSize: 14 },
});
Step 4: Export Document
const png = await client.documents.export(doc.documentId, {
format: 'png', // also: 'pdf', 'svg', 'csv' (for data shapes)
pageIndex: 0,
scale: 2, // retina-quality
crop: true, // trim whitespace
});
fs.writeFileSync('diagram.png', png);
console.log('Exported diagram.png');
Error Handling
| Issue | Cause | Fix | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
401 Unauthorized |
| Issue | Cause | Fix | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
401 Unauthorized |
Invalid or expired OAuth token | Re-authenticate via OAuth2 flow | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
403 Insufficient permissions |
User lacks edit/share access | Request owne
Cost Tuning for Lucidchart.
ReadWriteEditGrep
Lucidchart Cost TuningOverviewLucidchart pricing is per-seat with costs driven by document export volume and real-time collaboration event frequency. Each diagram export (PNG, PDF, SVG), embedded preview refresh, and collaborative editing session generates API activity. Organizations with large teams producing architectural diagrams, flowcharts, and wireframes at scale accumulate significant costs from redundant exports of unchanged diagrams and excessive collaboration event polling. Caching exports, batching operations, and right-sizing seat allocation are the primary optimization levers. Cost Breakdown
API Call Reduction
Usage MonitoringDebug Bundle for Lucidchart.
ReadBash(curl:*)Grep
Lucidchart Debug BundleOverviewThis debug bundle collects diagnostic evidence from Lucidchart diagramming API integrations for troubleshooting document access, shape rendering, data linking pipelines, and export failures. It captures OAuth token validation, document listing, page metadata, data-linked shape status, and export endpoint availability. The resulting tarball provides support engineers the evidence to diagnose permission errors, stale data links, broken embeds, and export timeouts without requiring direct Lucid account access. Prerequisites
Debug Collection ScriptDeploy Integration for Lucidchart.
ReadWriteEditGrep
Lucidchart Deploy IntegrationOverviewDeploy a containerized Lucidchart integration service that manages diagram documents, manipulates shapes and connectors programmatically, and synchronizes visual collaboration data through the Lucid API. This skill covers Docker multi-stage builds for the Lucid SDK, OAuth2 token configuration, health checks that validate document API access, and rolling deployments with safe diagram state preservation during updates. Prerequisites
Docker Configuration
Environment Variables
Health Check Endpoint
Deployment StepsStep 1: Build ImageCreate a minimal working Lucidchart example.
ReadWriteEditBash(npm:*)Grep
Lucidchart Hello WorldOverviewMinimal working examples demonstrating core Lucidchart API functionality. InstructionsStep 1: Create a Document
Step 2: Add Shapes via Standard Import
Step 3: Export Document
Error Handling
ResourcesNext StepsSee Install and configure Lucidchart SDK/API authentication.
ReadWriteEditBash(npm:*)Bash(pip:*)Grep
Lucidchart Install & AuthOverviewSet up Lucid REST API for programmatic diagram creation and document management. Prerequisites
InstructionsStep 1: Install SDK
Step 2: Configure Authentication
Step 3: Verify Connection (TypeScript)
Step 4: Verify Connection (Python)
Error Handling
ResourcesNext StepsAfter auth, proceed to Local Dev Loop for Lucidchart.
ReadWriteEdit
Lucidchart Local Dev LoopOverviewLocal development workflow for Lucidchart diagramming API integration. Provides a fast feedback loop with mock document, page, and shape data so you can build diagram automation tools without needing a live Lucid account. Toggle between mock mode for rapid iteration and sandbox mode for validating diagram CRUD operations against the real Lucid API. Environment Setup
Dev Server
Mock Mode
Testing WorkflowOptimize Lucidchart API integration performance with caching, batch shape operations, and pagination strategies.
ReadWriteEditGrep
Lucidchart Performance TuningOverviewLucidchart documents can contain thousands of shapes and connectors — a single enterprise diagram may hold 500+ elements across multiple pages, making bulk reads and exports the primary API bottleneck. This skill covers caching document metadata, batching shape operations, and managing Lucid's rate limits to keep integrations responsive. Instructions
Prerequisites
Caching Strategy
Batch OperationsProd Checklist for Lucidchart.
ReadWriteEdit
Lucidchart Production ChecklistOverviewLucidchart integrations interact with collaborative diagrams that may be actively edited by multiple users simultaneously. A production deployment must handle OAuth2 token lifecycle management, respect document-level collaboration locks, and account for export throttling on large diagrams. Failing to version API headers correctly causes silent schema drift, while unbounded export requests can exhaust memory on complex documents. This checklist ensures your Lucidchart integration is resilient to these collaboration and export edge cases. Prerequisites
Authentication & Secrets
API Integration
Error Handling & Resilience
Rate Limits for Lucidchart.
ReadWriteEdit
Lucidchart Rate LimitsOverviewLucidchart's API enforces per-OAuth-token rate limits, with document mutation operations (creating shapes, updating pages, modifying text) throttled more aggressively than read-only document listing. Automations that programmatically generate architecture diagrams or org charts from external data sources can easily exceed write limits when placing dozens of shapes and connectors in a single batch. Image export endpoints carry additional latency due to server-side rendering, making export-heavy workflows the most common throttling bottleneck. Rate Limit Reference
Rate Limiter Implementation
Retry StrategyReference Architecture for Lucidchart.
ReadWriteEditGrep
Lucidchart Reference ArchitectureOverviewDesign a version-controlled integration layer for the Lucidchart diagramming platform. Document versioning is the primary driver, so every shape mutation is tracked for diff, rollback, and branch operations while an async export pipeline renders diagrams without blocking collaboration. Instructions
Prerequisites
Architecture Diagram
Service Layer
Caching StrategySdk Patterns for Lucidchart.
ReadWriteEdit
Lucidchart SDK PatternsOverviewLucid's REST API uses OAuth 2.0 with versioned Prerequisites
Singleton Client
Error Wrapper
Request Builder
Upgrade Migration for Lucidchart.
ReadWriteEdit
Lucidchart Upgrade & MigrationOverviewLucidchart (Lucid) provides a diagramming and visual collaboration platform with APIs for document management, shape manipulation, and data linking. The API uses version headers and evolves its document schema, shape library definitions, and permission models. Tracking API versions is critical because Lucid's document format changes affect embedded diagram exports, shape coordinate systems shift between API versions, and breaking changes to the data linking API can corrupt live-data diagrams connected to external databases. Version Detection
Migration Checklist
Schema MigrationWebhooks Events for Lucidchart.
ReadWriteEditGrep
Lucidchart Webhooks & EventsOverviewLucidchart delivers real-time webhook notifications when documents, shapes, and collaboration states change across your organization's diagramming workspace. These events power integrations such as auto-archiving diagrams to Confluence when finalized, notifying Slack channels when collaborators join a shared document, triggering CI pipelines when architecture diagrams are updated, and maintaining audit logs of all document access. Payloads are signed JSON delivered over HTTPS using a webhook signing secret. Prerequisites
Webhook Registration
Signature Verification
Event HandlerReady to use lucidchart-pack?Related Pluginsexcel-analyst-proProfessional financial modeling toolkit for Claude Code with auto-invoked Skills and Excel MCP integration. Build DCF models, LBO analysis, variance reports, and pivot tables using natural language. brand-strategy-frameworkA 7-part brand strategy framework for building comprehensive brand foundations - the same methodology top agencies use with Fortune 500 clients. clay-packComplete Clay integration skill pack with 30 skills covering data enrichment, waterfall workflows, AI agents, and GTM automation. Flagship+ tier vendor pack. instantly-packComplete Instantly integration skill pack with 24 skills covering cold email, outreach automation, and lead generation. Flagship tier vendor pack. apollo-packComplete Apollo integration skill pack with 24 skills covering sales engagement, prospecting, sequencing, analytics, and outbound automation. Flagship tier vendor pack. juicebox-packComplete Juicebox integration skill pack with 24 skills covering people data, enrichment, contact search, and AI-powered discovery. Flagship tier vendor pack.
Tags
lucidchartsaassdkintegration
|