[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79312D1GJB61PTWTM784YZA":3,"skill-same:01M79312D1GJB61PTWTM784YZA":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M79312D1GJB61PTWTM784YZA","lucidchart-sdk-patterns",null,"Sdk Patterns for Lucidchart.\nTrigger: \"lucidchart sdk patterns\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--lucidchart-pack--lucidchart-sdk-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: lucidchart-sdk-patterns\ndescription: |\n  Sdk Patterns for Lucidchart.\n  Trigger: \"lucidchart sdk patterns\".\nallowed-tools: Read, Write, Edit\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ntags: [saas, lucidchart, diagramming]\ncompatible-with: claude-code\n---\n\n# Lucidchart SDK Patterns\n\n## Overview\nLucid's REST API uses OAuth 2.0 with versioned `Lucid-Api-Version` headers to manage documents, pages, shapes, data-linked fields, and collaborative comments. A structured SDK client is essential because the API requires version negotiation on every request, returns deeply nested shape tree hierarchies, and enforces document-level locking for concurrent edits. These patterns provide OAuth token lifecycle management, typed shape and document models, fluent query building for filtered shape searches, and mock factories for diagramming test scenarios.\n\n## Prerequisites\n- Node.js 18+, TypeScript 5+\n- `LUCID_CLIENT_ID` and `LUCID_CLIENT_SECRET` environment variables (OAuth 2.0 app credentials)\n- `LUCID_ACCESS_TOKEN` or refresh token flow for per-user access\n- `axios` or `node-fetch` for HTTP transport\n\n## Singleton Client\n```typescript\ninterface LucidConfig {\n  clientId: string;\n  clientSecret: string;\n  accessToken: string;\n  apiVersion?: string;\n  baseUrl?: string;\n}\n\nlet client: LucidClient | null = null;\n\nexport function getLucidClient(overrides?: Partial\u003CLucidConfig>): LucidClient {\n  if (!client) {\n    const config: LucidConfig = {\n      clientId: process.env.LUCID_CLIENT_ID ?? '',\n      clientSecret: process.env.LUCID_CLIENT_SECRET ?? '',\n      accessToken: process.env.LUCID_ACCESS_TOKEN ?? '',\n      apiVersion: '2',\n      baseUrl: 'https:\u002F\u002Fapi.lucid.co',\n      ...overrides,\n    };\n    if (!config.accessToken) throw new Error('LUCID_ACCESS_TOKEN is required');\n    client = new LucidClient(config);\n  }\n  return client;\n}\n```\n\n## Error Wrapper\n```typescript\ninterface LucidApiError { status: number; errorCode: string; message: string; documentId?: string; }\n\nasync function safeLucid\u003CT>(fn: () => Promise\u003CT>): Promise\u003CT> {\n  try { return await fn(); }\n  catch (err: any) {\n    const parsed: LucidApiError = {\n      status: err.response?.status ?? 500,\n      errorCode: err.response?.data?.errorCode ?? 'INTERNAL',\n      message: err.response?.data?.message ?? err.message,\n      documentId: err.response?.data?.documentId,\n    };\n    if (parsed.status === 429) {\n      const wait = parseInt(err.response?.headers?.['x-ratelimit-reset'] ?? '10', 10);\n      await new Promise(r => setTimeout(r, wait * 1000));\n      return fn();\n    }\n    if (parsed.errorCode === 'DOCUMENT_LOCKED') throw new Error(`Document ${parsed.documentId} is locked by another editor`);\n    if (parsed.status === 403) throw new Error(`Insufficient permissions: ${parsed.message}`);\n    throw new Error(`Lucid ${parsed.errorCode} (${parsed.status}): ${parsed.message}`);\n  }\n}\n```\n\n## Request Builder\n```typescript\nclass ShapeQueryBuilder {\n  private params: Record\u003Cstring, string> = {};\n  inDocument(docId: string) { this.params.documentId = docId; return this; }\n  onPage(pageId: string) { this.params.pageId = pageId; return this; }\n  ofType(shapeType: string) { this.params.className = shapeType; return this; }\n  withDataField(key: string, value: string) { this.params[`data.${key}`] = value; return this; }\n  limit(n: number) { this.params.limit = String(Math.min(n, 200)); return this; }\n  offset(n: number) { this.params.offset = String(n); return this; }\n  build(): URLSearchParams { return new URLSearchParams(this.params); }\n}\n```\n\n## Response Types\n```typescript\ninterface LucidDocument { id: string; title: string; editUrl: string; pageCount: number; lastModified: string; owner: string; }\ninterface LucidPage { id: string; title: string; index: number; width: number; height: number; }\ninterface LucidShape { id: string; className: string; boundingBox: { x: number; y: number; w: number; h: number }; text: string; dataFields: Record\u003Cstring, string>; }\ninterface LucidComment { id: string; author: string; body: string; shapeId?: string; resolved: boolean; createdAt: string; }\n```\n\n## Middleware Pattern\n```typescript\ntype Middleware = (req: RequestInit, next: () => Promise\u003CResponse>) => Promise\u003CResponse>;\n\nconst versionMiddleware: Middleware = (req, next) => {\n  req.headers = { ...req.headers as Record\u003Cstring, string>, 'Lucid-Api-Version': '2' };\n  return next();\n};\nconst oauthRefreshMiddleware = (refreshToken: string): Middleware => async (req, next) => {\n  const res = await next();\n  if (res.status === 401) {\n    const tokens = await refreshOAuthToken(refreshToken);\n    (req.headers as Record\u003Cstring, string>).Authorization = `Bearer ${tokens.access_token}`;\n    return next();\n  }\n  return res;\n};\n```\n\n## Testing Utilities\n```typescript\nfunction mockDocument(overrides?: Partial\u003CLucidDocument>): LucidDocument {\n  return { id: 'doc_abc123', title: 'Architecture Diagram', editUrl: 'https:\u002F\u002Flucid.app\u002Fdocuments\u002Fedit\u002Fdoc_abc123', pageCount: 3, lastModified: '2025-06-01T12:00:00Z', owner: 'user@example.com', ...overrides };\n}\nfunction mockShape(overrides?: Partial\u003CLucidShape>): LucidShape {\n  return { id: 'shape_001', className: 'ProcessBlock', boundingBox: { x: 100, y: 50, w: 200, h: 100 }, text: 'API Gateway', dataFields: {}, ...overrides };\n}\nfunction mockComment(shapeId: string): LucidComment {\n  return { id: 'cmt_xyz', author: 'reviewer@example.com', body: 'Needs error path', shapeId, resolved: false, createdAt: '2025-06-02T09:00:00Z' };\n}\n```\n\n## Error Handling\n| Pattern | When to Use | Example |\n|---------|-------------|---------|\n| Version negotiation | API returns 400 on outdated version header | Catch version mismatch, retry with server-suggested version |\n| Document lock retry | 409 DOCUMENT_LOCKED during shape updates | Exponential backoff up to 3 retries, then surface to user |\n| OAuth token refresh | 401 on any endpoint | Use refresh token middleware, update stored access token |\n| Permission escalation | 403 on shared document operations | Check document sharing settings before write operations |\n| Shape tree validation | Creating shapes with invalid parent references | Validate page and container IDs exist before shape POST |\n\n## Resources\n- [Lucid API Reference](https:\u002F\u002Fdeveloper.lucid.co\u002Freference\u002Foverview)\n\n## Next Steps\nApply in `lucidchart-core-workflow-a`.\n","# Lucidchart SDK Patterns\n\n## Overview\nLucid's REST API uses OAuth 2.0 with versioned `Lucid-Api-Version` headers to manage documents, pages, shapes, data-linked fields, and collaborative comments. A structured SDK client is essential because the API requires version negotiation on every request, returns deeply nested shape tree hierarchies, and enforces document-level locking for concurrent edits. These patterns provide OAuth token lifecycle management, typed shape and document models, fluent query building for filtered shape searches, and mock factories for diagramming test scenarios.\n\n## Prerequisites\n- Node.js 18+, TypeScript 5+\n- `LUCID_CLIENT_ID` and `LUCID_CLIENT_SECRET` environment variables (OAuth 2.0 app credentials)\n- `LUCID_ACCESS_TOKEN` or refresh token flow for per-user access\n- `axios` or `node-fetch` for HTTP transport\n\n## Singleton Client\n```typescript\ninterface LucidConfig {\n  clientId: string;\n  clientSecret: string;\n  accessToken: string;\n  apiVersion?: string;\n  baseUrl?: string;\n}\n\nlet client: LucidClient | null = null;\n\nexport function getLucidClient(overrides?: Partial\u003CLucidConfig>): LucidClient {\n  if (!client) {\n    const config: LucidConfig = {\n      clientId: process.env.LUCID_CLIENT_ID ?? '',\n      clientSecret: process.env.LUCID_CLIENT_SECRET ?? '',\n      accessToken: process.env.LUCID_ACCESS_TOKEN ?? '',\n      apiVersion: '2',\n      baseUrl: 'https:\u002F\u002Fapi.lucid.co',\n      ...overrides,\n    };\n    if (!config.accessToken) throw new Error('LUCID_ACCESS_TOKEN is required');\n    client = new LucidClient(config);\n  }\n  return client;\n}\n```\n\n## Error Wrapper\n```typescript\ninterface LucidApiError { status: number; errorCode: string; message: string; documentId?: string; }\n\nasync function safeLucid\u003CT>(fn: () => Promise\u003CT>): Promise\u003CT> {\n  try { return await fn(); }\n  catch (err: any) {\n    const parsed: LucidApiError = {\n      status: err.response?.status ?? 500,\n      errorCode: err.response?.data?.errorCode ?? 'INTERNAL',\n      message: err.response?.data?.message ?? err.message,\n      documentId: err.response?.data?.documentId,\n    };\n    if (parsed.status === 429) {\n      const wait = parseInt(err.response?.headers?.['x-ratelimit-reset'] ?? '10', 10);\n      await new Promise(r => setTimeout(r, wait * 1000));\n      return fn();\n    }\n    if (parsed.errorCode === 'DOCUMENT_LOCKED') throw new Error(`Document ${parsed.documentId} is locked by another editor`);\n    if (parsed.status === 403) throw new Error(`Insufficient permissions: ${parsed.message}`);\n    throw new Error(`Lucid ${parsed.errorCode} (${parsed.status}): ${parsed.message}`);\n  }\n}\n```\n\n## Request Builder\n```typescript\nclass ShapeQueryBuilder {\n  private params: Record\u003Cstring, string> = {};\n  inDocument(docId: string) { this.params.documentId = docId; return this; }\n  onPage(pageId: string) { this.params.pageId = pageId; return this; }\n  ofType(shapeType: string) { this.params.className = shapeType; return this; }\n  withDataField(key: string, value: string) { this.params[`data.${key}`] = value; return this; }\n  limit(n: number) { this.params.limit = String(Math.min(n, 200)); return this; }\n  offset(n: number) { this.params.offset = String(n); return this; }\n  build(): URLSearchParams { return new URLSearchParams(this.params); }\n}\n```\n\n## Response Types\n```typescript\ninterface LucidDocument { id: string; title: string; editUrl: string; pageCount: number; lastModified: string; owner: string; }\ninterface LucidPage { id: string; title: string; index: number; width: number; height: number; }\ninterface LucidShape { id: string; className: string; boundingBox: { x: number; y: number; w: number; h: number }; text: string; dataFields: Record\u003Cstring, string>; }\ninterface LucidComment { id: string; author: string; body: string; shapeId?: string; resolved: boolean; createdAt: string; }\n```\n\n## Middleware Pattern\n```typescript\ntype Middleware = (req: RequestInit, next: () => Promise\u003CResponse>) => Promise\u003CResponse>;\n\nconst versionMiddleware: Middleware = (req, next) => {\n  req.headers = { ...req.headers as Record\u003Cstring, string>, 'Lucid-Api-Version': '2' };\n  return next();\n};\nconst oauthRefreshMiddleware = (refreshToken: string): Middleware => async (req, next) => {\n  const res = await next();\n  if (res.status === 401) {\n    const tokens = await refreshOAuthToken(refreshToken);\n    (req.headers as Record\u003Cstring, string>).Authorization = `Bearer ${tokens.access_token}`;\n    return next();\n  }\n  return res;\n};\n```\n\n## Testing Utilities\n```typescript\nfunction mockDocument(overrides?: Partial\u003CLucidDocument>): LucidDocument {\n  return { id: 'doc_abc123', title: 'Architecture Diagram', editUrl: 'https:\u002F\u002Flucid.app\u002Fdocuments\u002Fedit\u002Fdoc_abc123', pageCount: 3, lastModified: '2025-06-01T12:00:00Z', owner: 'user@example.com', ...overrides };\n}\nfunction mockShape(overrides?: Partial\u003CLucidShape>): LucidShape {\n  return { id: 'shape_001', className: 'ProcessBlock', boundingBox: { x: 100, y: 50, w: 200, h: 100 }, text: 'API Gateway', dataFields: {}, ...overrides };\n}\nfunction mockComment(shapeId: string): LucidComment {\n  return { id: 'cmt_xyz', author: 'reviewer@example.com', body: 'Needs error path', shapeId, resolved: false, createdAt: '2025-06-02T09:00:00Z' };\n}\n```\n\n## Error Handling\n| Pattern | When to Use | Example |\n|---------|-------------|---------|\n| Version negotiation | API returns 400 on outdated version header | Catch version mismatch, retry with server-suggested version |\n| Document lock retry | 409 DOCUMENT_LOCKED during shape updates | Exponential backoff up to 3 retries, then surface to user |\n| OAuth token refresh | 401 on any endpoint | Use refresh token middleware, update stored access token |\n| Permission escalation | 403 on shared document operations | Check document sharing settings before write operations |\n| Shape tree validation | Creating shapes with invalid parent references | Validate page and container IDs exist before shape POST |\n\n## Resources\n- [Lucid API Reference](https:\u002F\u002Fdeveloper.lucid.co\u002Freference\u002Foverview)\n\n## Next Steps\nApply in `lucidchart-core-workflow-a`.\n",{"name":5,"tags":24,"author":28,"license":15,"version":29,"description":30,"allowed-tools":31,"compatible-with":32},[25,26,27],"saas","lucidchart","diagramming","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Sdk Patterns for Lucidchart.\nTrigger: \"lucidchart sdk patterns\".\n","Read, Write, Edit","claude-code","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--lucidchart-pack--lucidchart-sdk-patterns",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill lucidchart-sdk-patterns",{"tool":48,"command":49},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill lucidchart-sdk-patterns",{"tool":51,"command":52},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill lucidchart-sdk-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--lucidchart-pack--lucidchart-sdk-patterns\u002FSKILL.md",true,[],[57,64,71,78,85,93],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]