Skip to content
Skillv1.0.0

lucidchart-upgrade-migration

Upgrade Migration for Lucidchart. Trigger: "lucidchart upgrade migration".

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (plugins/saas-packs/lucidchart-pack/skills/lucidchart-upgrade-migration/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill lucidchart-upgrade-migration. Copyright stays with the author (MIT).

Lucidchart Upgrade & Migration

Overview

Lucidchart (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

const LUCID_BASE = "https://api.lucid.co/v1";

async function detectLucidApiVersion(apiKey: string): Promise<void> {
  const res = await fetch(`${LUCID_BASE}/documents`, {
    headers: {
      Authorization: `Bearer ${apiKey}`,
      "Lucid-Api-Version": "2",
      "Content-Type": "application/json",
    },
  });
  const serverVersion = res.headers.get("x-lucid-api-version") ?? "unknown";
  const minSupported = res.headers.get("x-lucid-min-version");
  console.log(`Lucid API version: ${serverVersion}, min supported: ${minSupported}`);

  // Check if current version header is being accepted or forced up
  const requestedVersion = "2";
  if (serverVersion !== requestedVersion) {
    console.warn(`Requested v${requestedVersion} but server responded with v${serverVersion}`);
  }

  const deprecation = res.headers.get("x-lucid-deprecation-notice");
  if (deprecation) console.warn(`Deprecation: ${deprecation}`);
}

Migration Checklist

  • Review Lucid developer changelog for API version bumps
  • Update Lucid-Api-Version header in all API calls to target version
  • Audit document export code — SVG/PNG render parameters may change
  • Verify shape library IDs are still valid (deprecated shapes removed)
  • Check document permission model for new sharing/access level fields
  • Update data linking configuration if external data source schema changed
  • Test page/layer structure — nested page support may affect document queries
  • Validate webhook event payloads for document change notifications
  • Check if coordinate system units changed (points vs. pixels)
  • Run export comparison: render same document with old and new API versions

Schema Migration

// Lucid document schema: flat shape list → page-grouped shape hierarchy
interface OldDocument {
  id: string;
  title: string;
  shapes: Array<{ id: string; type: string; x: number; y: number; width: number; height: number; text?: string }>;
  lastModified: string;
}

interface NewDocument {
  id: string;
  title: string;
  pages: Array<{
    id: string;
    title: string;
    layers: Array<{
      id: string;
      shapes: Array<{
        id: string;
        type: string;
        bounds: { x: number; y: number; width: number; height: number };
        text?: { content: string; style: Record<string, any> };
      }>;
    }>;
  }>;
  lastModified: string;
  version: number;
}

function migrateDocument(old: OldDocument): NewDocument {
  return {
    id: old.id,
    title: old.title,
    pages: [{
      id: "page-1",
      title: "Page 1",
      layers: [{
        id: "layer-1",
        shapes: old.shapes.map((s) => ({
          id: s.id,
          type: s.type,
          bounds: { x: s.x, y: s.y, width: s.width, height: s.height },
          text: s.text ? { content: s.text, style: {} } : undefined,
        })),
      }],
    }],
    lastModified: old.lastModified,
    version: 2,
  };
}

Rollback Strategy

class LucidClient {
  private apiVersion: number;

  constructor(private apiKey: string, version: number = 2) {
    this.apiVersion = version;
  }

  async getDocument(docId: string): Promise<any> {
    try {
      const res = await fetch(`https://api.lucid.co/v1/documents/${docId}`, {
        headers: {
          Authorization: `Bearer ${this.apiKey}`,
          "Lucid-Api-Version": String(this.apiVersion),
        },
      });
      if (!res.ok) throw new Error(`Lucid API ${res.status}`);
      return await res.json();
    } catch (err) {
      if (this.apiVersion > 1) {
        console.warn(`Falling back Lucid API from v${this.apiVersion} to v${this.apiVersion - 1}`);
        this.apiVersion -= 1;
        return this.getDocument(docId);
      }
      throw err;
    }
  }
}

Error Handling

Migration Issue Symptom Fix
API version header missing 400 with Lucid-Api-Version header required Add Lucid-Api-Version header to all requests
Shape ID format changed 404 when referencing shapes by old numeric ID Migrate to new UUID-based shape identifiers
Document export dimensions wrong SVG exports render at unexpected scale Check if coordinate units changed from points to pixels in new version
Data link schema invalid 422 on data linking update Re-map external data columns to new document field schema
Permission model expanded 403 on previously accessible documents Request updated OAuth scopes for new permission levels

Resources

Next Steps

For CI pipeline integration, see lucidchart-ci-integration.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-lucidchart-up-0ad71d/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-lucidchart-up-0ad71d.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-lucidchart-up-0ad71d",
  "kind": "skill",
  "name": "lucidchart-upgrade-migration",
  "description": "Upgrade Migration for Lucidchart. Trigger: \"lucidchart upgrade migration\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "saas",
      "lucidchart",
      "diagramming",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Upgrade Migration for Lucidchart. Trigger: \"lucidchart upgrade migration\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "plugins/saas-packs/lucidchart-pack/skills/lucidchart-upgrade-migration/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/plugins/saas-packs/lucidchart-pack/skills/lucidchart-upgrade-migration/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/plugins/saas-packs/lucidchart-pack/skills/lucidchart-upgrade-migration/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit"
    ],
    "license": "MIT"
  },
  "instructions": "# Lucidchart Upgrade & Migration\n\n## Overview\n\nLucidchart (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.\n\n## Version Detection\n\n",
  "cost": {
    "context_tokens": 1327
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-lucidchart-up-0ad71d/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.