Skip to content
Skillv1.0.0

lucidchart-core-workflow-a

Execute Lucidchart primary workflow: Document & Shape Creation. Trigger: "lucidchart document & shape creation", "primary lucidchart workflow".

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-core-workflow-a/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill lucidchart-core-workflow-a. Copyright stays with the author (MIT).

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 Expired OAuth token Refresh token or re-authorize
403 Forbidden No edit access to document Check sharing permissions
404 Not Found Invalid documentId or pageId Verify ID from create response
413 Payload Too Large Import data exceeds 10 MB Split into multiple pages
429 Rate Limited Exceeds 100 req/min Implement exponential backoff

Output

A successful run produces a Lucidchart document with shapes, connectors, and styling, then exports a high-resolution PNG. Console output shows the document ID and edit URL.

Resources

Next Steps

Continue with lucidchart-core-workflow-b for template management and collaboration.

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-co-7913c8/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-co-7913c8.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-lucidchart-co-7913c8",
  "kind": "skill",
  "name": "lucidchart-core-workflow-a",
  "description": "Execute Lucidchart primary workflow: Document & Shape Creation. Trigger: \"lucidchart document & shape creation\", \"primary lucidchart workflow\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "saas",
      "lucidchart",
      "diagramming",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Execute Lucidchart primary workflow: Document & Shape Creation. Trigger: \"lucidchart document & shape creation\", \"primary lucidchart workflow\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "plugins/saas-packs/lucidchart-pack/skills/lucidchart-core-workflow-a/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/plugins/saas-packs/lucidchart-pack/skills/lucidchart-core-workflow-a/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/plugins/saas-packs/lucidchart-pack/skills/lucidchart-core-workflow-a/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(npm:*),",
      "Grep"
    ],
    "license": "MIT"
  },
  "instructions": "# Lucidchart — Document & Diagram Management\n\n## Overview\n\nPrimary workflow for Lucidchart document and diagram management. Covers the complete\nlifecycle: creating documents, adding shapes and connectors via Standard Import,\nediting diagram content programmatically, and exporting to PNG, PDF, or SVG. Uses the\nLucid REST API v1 with OAuth 2.0 authorization. The Standard Import format (.lucid)\nsupports pages, shapes, lines, groups, and styling in a single declarative payload.\n\n## Instructions\n\n### Step 1: Create a Document\n\n```typescript\nconst doc = await client.documents.create({\n  title: 'API ",
  "cost": {
    "context_tokens": 827
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-lucidchart-co-7913c8/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.