Agent skill

Patentfig

by davila7 in davila7/claude-code-templates

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…

MITAuto-check passedLegal & Compliance

Install Patentfig

skills CLI
$ npx skills add davila7/claude-code-templates --skill patentfig -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davila7/claude-code-templates patentfig --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davila7/claude-code-templates.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli-tool/components/skills/creative-design/patentfig .claude/skills/patentfig && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
patentfig
GitHub stars
32k
Token cost
~1.2k tokens
SKILL.md length
444 words
Files
2 (incl. references)
Skills in repo
478
Repo updated
First seen
Licence
MIT

At a glance

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…

  • The user asks for patent drawings
  • SKILL.md covers Setup, Generate a patent figure (10…, Convert an existing image and Operational rules
  • Calls curl; reaches patentfig.ai and cdn.patentfig.ai; needs PATENTFIG_API_KEY
  • Invention diagrams

What it does

Patentfig is an agent skill from davila7/claude-code-templates. 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 PATENTFIGAPIKEY environment variable.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/endpoints.md`).

It sits in Legal & Compliance, covering Intellectual property, Diagrams and Secrets management. The repository describes itself as: CLI tool for configuring and monitoring Claude Code. The licence is MIT.

When your agent uses it

  • The user asks for patent drawings
  • Invention diagrams
  • USPTO/EPO-compliant line art
  • Vectorizing a drawing for CAD

Example prompts

  • “/patentfig”

Requirements

  • A credential in PATENTFIG_API_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit 46b4d8b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • patentfig.ai
    • cdn.patentfig.ai

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • PATENTFIG_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Patentfig loads about 1.2k tokens when it runs, and up to ~2k if it reads all its reference files. Until then it costs about 114 tokens; SKILL.md has 444 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~114
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davila7/claude-code-templates at commit 46b4d8b, republished under its MIT licence (© davila7). 444 words, ~1,202 tokens.

Download SKILL.mdSave it as .claude/skills/patentfig/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
patentfig
description
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.
version
1.0.0
author
TopLocalAI
license
MIT
tags
Patent, Patent Drawings, Line Art, SVG, Vectorize, DXF, USPTO, Image Generation, API
metadata.homepage
https://patentfig.ai
metadata.docs
https://patentfig.ai/docs

PatentFig AI API

Generate and convert patent figures through the PatentFig AI REST API.

  • Base URL: https://patentfig.ai/api/v1
  • Auth: Authorization: Bearer $PATENTFIG_API_KEY
  • 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 PATENTFIG_API_KEY 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:

bash
export PATENTFIG_API_KEY="pfig_..."

Verify connectivity and credit balance (free call):

bash
curl -s https://patentfig.ai/api/v1/credits \
  -H "Authorization: Bearer $PATENTFIG_API_KEY"
# → { "success": true, "data": { "balance": 500 } }

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.

bash
curl -s -X POST https://patentfig.ai/api/v1/figures \
  -H "Authorization: Bearer $PATENTFIG_API_KEY" \
  -H "Content-Type: application/json" \
  --max-time 300 \
  -d '{
    "prompt": "Exploded view of a wireless earbud charging case showing lid, hinge, charging coil, and battery",
    "output": "svg",
    "labeled": true
  }'
  • 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.

Show full SKILL.md (218 more words)Show less

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:

bash
curl -s -X POST https://patentfig.ai/api/v1/vectorize \
  -H "Authorization: Bearer $PATENTFIG_API_KEY" \
  -H "Content-Type: application/json" \
  --max-time 300 \
  -d '{ "imageUrl": "https://example.com/drawing.png", "format": "dxf", "engine": "lineart" }'

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.

Enhance (20 credits) — AI super-resolution: POST /enhance with scale (2 or 4, controls pixels) and dpi (300 or 600, metadata stamp only).

Convert (20 credits) — filing-ready raster: POST /convert with format (png/tiff/pdf) and dpi (300 or 600).

Full parameter tables for every endpoint: see references/endpoints.md. Machine-readable spec: https://patentfig.ai/api/openapi.yaml

Operational rules

  • Set a client timeout of at least 300 seconds — generation and vectorization take from ~20s up to a few minutes.
  • Credits are charged only on success; retrying a failed call never double-bills.
  • Rate limit: 60 requests/minute per key. On 429 back off (start at 5s) and retry.
  • On 402 INSUFFICIENT_CREDITS, stop and tell the user to top up at https://patentfig.ai/pricing.
  • On 500 GENERATION_FAILED, one retry is reasonable; persistent failures usually mean the input doesn't suit the pipeline (e.g., a photo sent for line-art vectorization — suggest POST /figures with the photo as referenceImageUrls instead).
  • Before a batch of billable calls, check GET /credits and confirm the balance covers it.

© davila7, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in cli-tool/components/skills/creative-design/patentfig of davila7/claude-code-templates.

  • SKILL.md
  • references/endpoints.md

Open the folder on GitHubat commit 46b4d8b

Compare with similar skills

Patentfig next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Patentfig compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Patentfig this skilldavila7/claude-code-templates32k—~1.2kAutomated safety check: PassMIT
Patent Diagram GeneratorRobThePCGuy/Claude-Patent-Creator196—~1.7kAutomated safety check: NotesMIT
Linkfox Zhihuiya Fulltext Imagelinkfox-ai/linkfox-skills1071 repos~1.6kAutomated safety check: PassMIT
Linkfox Zhihuiya PDF Datalinkfox-ai/linkfox-skills1071 repos~1.8kAutomated safety check: PassMIT
Paper2patent7toCR/paper2patent653—~2.5kAutomated safety check: PassMIT
Patent Disclosure HandoffLight0305/Light-skills640—~2kAutomated safety check: PassMIT

Similar skills

  • Patent Diagram Generator

    RobThePCGuy/Claude-Patent-Creator

    Create patent-style technical diagrams including flowcharts, block diagrams, and system architectures using Graphviz with reference numbering

    196 GitHub stars~1.7k tokensUpdated 3 days ago
    Legal & ComplianceAuto-check: notes
  • Linkfox Zhihuiya Fulltext Image

    linkfox-ai/linkfox-skills

    通过专利ID或公开号获取专利文件中的全文附图(图纸、示意图、图表)。当用户询问专利图片、专利图纸、专利示意图、专利插图、全文附图、专利图表、专利技术图或想查看、下载专利文件中的嵌入图片、patent fulltext drawings, patent diagrams, technical drawings, patent images…

    107 GitHub starsUsed in 1 repo~1.6k tokens
    Legal & ComplianceAuto-check passed
  • Linkfox Zhihuiya PDF Data

    linkfox-ai/linkfox-skills

    通过专利ID或公开号从智慧芽专利数据库下载专利PDF全文文档。当用户提到专利PDF下载、专利全文、专利文件获取、公开号查询、专利家族PDF替代、批量专利PDF导出、patent PDF download, patent full-text document, patent file download, PatSnap, patent…

    107 GitHub starsUsed in 1 repo~1.8k tokens
    Legal & ComplianceAuto-check passed
  • Paper2patent

    7toCR/paper2patent

    Turn an academic paper (PDF, LaTeX, pasted text, thesis chapter or technical disclosure) into a Chinese invention patent application draft — 说明书摘要、摘要附图、权利要求书、说明书、说明书附图 — delivered as DOCX/PDF with…

    653 GitHub stars~2.5k tokensUpdated 4 days ago
    Documents & OfficeAuto-check passed
  • Patent Disclosure Handoff

    Light0305/Light-skills

    Builds an evidence-backed invention disclosure packet from a project or research result for attorney or patent-agent review, without giving legal advice.

    640 GitHub stars~2k tokensUpdated 3 mo ago
    Legal & ComplianceAuto-check passed
  • Patent Disclosure Drafting

    illusionaireal/oh-my-patent

    Turns technical ideas, documents or code into traceable patent disclosures, with search planning, patent review, figure drawing and the ability to resume a project.

    104 GitHub stars~2.4k tokensUpdated yesterday
    Legal & ComplianceAuto-check passed

More from davila7/claude-code-templates

All 478 skills in this repo
  • Perplexity Web Search

    davila7/claude-code-templates

    Runs web-grounded searches through Perplexity's Sonar models over OpenRouter for current events, recent literature and cited facts beyond the model's training cutoff.

    32k GitHub starsUsed in 11 repos~3.5k tokens
    Auto-check: notes
  • Neuropixels Data Analysis

    davila7/claude-code-templates

    Analyzes Neuropixels recordings from SpikeGLX or Open Ephys through preprocessing, drift correction, Kilosort4 spike sorting, quality metrics and curation.

    32k GitHub starsUsed in 9 repos~2.8k tokens
    Auto-check passed
  • Scientific Venue Templates

    davila7/claude-code-templates

    Supplies LaTeX templates and formatting rules for journals, conferences, posters, and grant proposals, then can check a draft against them.

    32k GitHub starsUsed in 9 repos~5.1k tokens
    Auto-check: notes
  • Brand Voice Content Creator

    davila7/claude-code-templates

    Analyzes a brand's existing writing to lock in a consistent voice, then builds SEO blog posts and platform-specific social content around it.

    32k GitHub starsUsed in 3 repos~1.9k tokens
    Auto-check passed
  • CAPA Officer

    davila7/claude-code-templates

    Guides corrective and preventive action (CAPA) work in a quality management system, from initiation and root cause analysis through effectiveness verification.

    32k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Fda Consultant Specialist

    davila7/claude-code-templates

    Senior FDA consultant and specialist for medical device companies including HIPAA compliance and requirement management.

    32k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed

Questions about Patentfig

What does Patentfig do?

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…. Patentfig is an agent skill from davila7/claude-code-templates. 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.

When should I use Patentfig?

Patentfig fits situations like: the user asks for patent drawings; invention diagrams; USPTO/EPO-compliant line art; vectorizing a drawing for CAD.

How do I install Patentfig in Claude Code?

Run `npx skills add davila7/claude-code-templates --skill patentfig -a claude-code`. Or copy the skill folder (cli-tool/components/skills/creative-design/patentfig in davila7/claude-code-templates) into .claude/skills/patentfig in your project. Claude Code loads it when a task matches its description.

How do I install Patentfig in Codex?

Run `npx skills add davila7/claude-code-templates --skill patentfig -a codex`. Or copy the skill folder (cli-tool/components/skills/creative-design/patentfig in davila7/claude-code-templates) into .agents/skills/patentfig in your project. Codex loads it when a task matches its description.

Can I use Patentfig in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davila7/claude-code-templates --skill patentfig -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/patentfig, .gemini/skills/patentfig, .github/skills/patentfig and .opencode/skills/patentfig in your project.

What does Patentfig need to run?

Going by SKILL.md and its folder, Patentfig needs the command-line tools its instructions call (curl) and credentials named PATENTFIG_API_KEY. Our summary lists: A credential in PATENTFIG_API_KEY.

Does Patentfig access the network?

SKILL.md names 2 domains. In commands or code: patentfig.ai and cdn.patentfig.ai; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Patentfig safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Patentfig use?

Patentfig is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Patentfig use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 825 tokens, read only when the agent opens those files.

What are the alternatives to Patentfig?

Skills that share tags, products or a category with Patentfig: Patent Diagram Generator (RobThePCGuy/Claude-Patent-Creator, 196 stars), Linkfox Zhihuiya Fulltext Image (linkfox-ai/linkfox-skills, 107 stars), Linkfox Zhihuiya PDF Data (linkfox-ai/linkfox-skills, 107 stars) and Paper2patent (7toCR/paper2patent, 653 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Patentfig?

davila7 (a GitHub user) maintains it in davila7/claude-code-templates, which has 32,483 GitHub stars. The repository holds 478 skills in this directory. The repository was last updated on October 9, 2026.

Source: davila7/claude-code-templates on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.