Chuyển đến nội dung
Skillpedia
Hình ảnh và biểu tượng33k · #8699

patentfig

Skill này làm gì

Skill này cho phép AI của bạn dùng dịch vụ PatentFig để vẽ hình minh họa bằng sáng chế dạng đường nét và chuyển chúng sang định dạng sẵn sàng nộp hồ sơ. Nó dành cho nhà phát minh và người nộp bằng sáng chế cần hình vẽ.

Khi nào nên dùng

  • ✓Khi bạn cần hình vẽ bằng sáng chế từ một mô tả bằng văn bản về phát minh của mình.
  • ✓Khi bạn muốn biến một bản phác thảo sơ sài thành hình vector gọn gàng để dùng trong CAD.
  • ✓Khi bạn cần chuyển một hình thành TIFF hoặc PDF để nộp hồ sơ bằng sáng chế.

Liên kết skill

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/creative-design/patentfig/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/creative-design/patentfig/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy tạo hình vẽ bằng sáng chế thể hiện mặt trước và mặt bên của chiếc ghế gấp của tôi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent gửi mô tả của bạn đến dịch vụ PatentFig qua API của nó. Mỗi hình được tạo bằng một yêu cầu, và dịch vụ trả về đường dẫn đến file hoàn chỉnh.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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:

export PATENTFIG_API_KEY="pfig_..."

Verify connectivity and credit balance (free call):

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.

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.

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:

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.
Câu hỏi thường gặp

Tôi cần gì để bắt đầu?

Bạn cần một API key của PatentFig được lưu trong môi trường. Agent có thể chỉ bạn cách tạo một key.

Một hình tốn bao nhiêu credit?

Skill cho biết một lần tạo hình dùng 10 credit, và bạn có thể kiểm tra số dư bằng một lệnh gọi miễn phí.

Các hình có sẵn sàng để nộp không?

Dịch vụ hướng tới các quy tắc của cơ quan sáng chế, nhưng bạn vẫn nên đối chiếu hình với quy định của cơ quan nộp hồ sơ.

Chi tiết

Mô tả gốc của tác giả

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.

repo: davila7/claude-code-templates

Độ phổ biến

Sao GitHub
33k
Vị trí xếp hạng
#8699
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự