Agent skill · writing content · davila7

patentfig

Generate patent-office-compliant figures via the PatentFig AI API — patent line art from text (PNG or SVG), vectorize drawings to SVG/DXF/vector PDF, AI-upscale images, and convert to filing-ready TIFF/PDF/PNG. Use when the user asks for patent drawings, patent figures, invention diagrams, USPTO/EPO-compliant line art, vectorizing a drawing for CAD, or preparing figures for a patent filing. Requires a PATENTFIG_API_KEY environment variable.

Why this skill is useful

Provides specific API commands and workflows for generating and converting patent figures that the AI wouldn't reliably generate on its own.

What it needs

Requires patentfig account access. About 3k tokens when loaded. Last updated 2026-08-06. 30,138 stars on the source repository.

What this skill does

PatentFig AI API Generate and convert patent figures through the PatentFig AI REST API. Base URL: https://patentfig.ai/api/v1 Auth: Authorization: Bearer $PATENTFIGAPIKEY All endpoints are synchronous and return JSON: { "success": true, "data": {...} } on success, { "success": false, "error": { "code", "message" } } on failure. Generated files are returned as URLs on https://cdn.patentfig.ai — pass them to the user or feed them into follow-up calls. Setup The key comes from the PATENTFIGAPIKEY environment variable. Never hardcode it, print it, or write it into files or logs. If the variable is not set, tell the user to create a key at https://patentfig.ai/settings/api-keys (requires a PatentFig AI account; keys start with pfig) and export it: Verify connectivity and credit balance (free call): Generate a patent figure (10 credits) POST /figures — the core endpoint. One prompt → one figure. Views, diagram type, and composition are all controlled through the prompt; for a multi-view set (front/side/top), make one call per view. output: "png" (raster figure) or "svg" (stroke-based line art, CAD-friendly). Default "png". labeled: true adds patent-style numeric reference callouts (100, 102, …). referenceImageUrls: up to 4 public image URLs (sketch/photo/prior figure) used as the structural baseline. Response data.url is the figure; with output: "svg" the full SVG source is also in data.svg. Prompting tips: name the parts to draw (names tell the model WHAT to draw, not what to label); for flowcharts/block diagrams, name every node explicitly. Convert an existing image All three endpoints accept either JSON with imageUrl (public URL) or multipart/form-data with a file field (PNG/JPEG/WebP/TIFF, ≤10 MB). Vectorize (20 credits) — raster → SVG / DXF / vector PDF: engine: "lineart" (default) redraws as clean single-stroke patent line art — use for CAD/DXF. engine: "trace" reproduces the input pixels faithfully, preserving fills — use when output must match the original. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills davila7/patentfig

View the source on GitHub

Browse the @skills marketplace