Kicad Libraryのロゴ

Kicad Library

コミュニティ
mixelpixx
kicad-library

Library management workflow for KiCAD — creating symbols, footprints, and managing libraries via MCP tools. Triggers on: "create a symbol", "make a footprint", "custom component", "register library", "find a part", "pin numbering", "new symbol", "new footprint", "add to library", "library path", "pad layout".

概要

公開者mixelpixx
リポジトリKonnect
スキル名kicad-library
スター
944
フォーク
127
同梱ファイル
指示のみ
ライセンスAGPL-3.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    mixelpixxがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Kicad Library」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/mixelpixx/Konnect/tree/main/crates/konnect/assets/skills/kicad-library
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mixelpixx/Konnect.git /tmp/Konnect
mkdir -p .claude/skills
cp -r /tmp/Konnect/crates/konnect/assets/skills/kicad-library .claude/skills/kicad-library
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでKicad Libraryを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にKicad Libraryを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Kicad Libraryは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

KiCAD Library Management Workflow

This skill guides Claude through creating and managing KiCAD symbols, footprints, and libraries using Konnect MCP tools. ALL modifications go through MCP tools — never edit .kicad_sym or .kicad_mod files directly.


Toolset Loading

load_toolset('library')    # search_symbols, search_footprints, create_symbol, create_footprint,
                           # edit_footprint_pad, set_footprint_graphics, set_footprint_metadata,
                           # set_footprint_models, get_footprint_info, register_symbol_library,
                           # register_footprint_library, get_symbol_info
load_toolset('pcb_components') # update_footprints_from_library for placed instances

Always call get_active_toolsets() first to see what is already loaded.


Refresh Placed Footprints

Editing a .kicad_mod library file does not change copies already embedded on a board. After a library edit, call update_footprints_from_library; it is Konnect's MCP equivalent of KiCad Tools → Update Footprints from Library.

This operation is not update_pcb_from_schematic. Schematic sync updates schematic-owned fields while preserving artwork. Library refresh replaces supported library-owned pads, graphics, attributes, metadata, and 3D models while preserving the placed footprint's reference, value, position, rotation, board side, locked state, KIID, symbol metadata, instance overrides, and pad nets by logical pad number.

Always dry-run first:

text
update_footprints_from_library(
  board,
  references?,
  library_ids?,
  dry_run,
  expected_plan_revision?
)
  • Use dry_run=true and review status, coverage, changes, and diagnostics.
  • Apply with dry_run=false and the exact returned expected_plan_revision.
  • Keep the requested board open in live KiCad; there is no closed-board file fallback.
  • One successful apply is one KiCad undo entry.
  • A stale plan, unresolved library, removed connected pad, or unsupported library content returns a non-mutating conflict for the whole selection.

Search First Principle

Always search existing libraries before creating custom components.

search_symbols(query)       # Search all symbol libraries
search_footprints(query)    # Search all footprint libraries

KiCAD ships with extensive libraries. Common parts almost always exist:

  • Standard passives (R, C, L) → Device library
  • Connectors → Connector_Generic, Connector_USB, Connector_HDMI, etc.
  • Common ICs (STM32, ATmega, LM7805, NE555) → manufacturer-specific libraries
  • Transistors/MOSFETs → Transistor_FET, Transistor_BJT

Only create a custom symbol/footprint when:

  • The part does not exist in any library
  • The existing symbol has wrong pin count/arrangement
  • You need a proprietary/unusual package

Symbol Creation

Pin Numbering — the datasheet decides, not a convention

There is no safe universal pin-numbering rule for a real part. Physical lead numbers are defined by the exact manufacturer part number and package suffix. BJT and MOSFET lead order varies between manufacturers, packages and variants; bottom-view, mirrored, socketed and connector drawings reverse it. A symbol can be syntactically valid and still be electrically wrong when its pins and the footprint's pads describe different physical leads.

Even KiCad's own generic symbols do not follow one order — Device:LED is pin 1 = K (cathode), pin 2 = A (anode), the opposite of the "pin 1 = anode" rule people expect. Check, do not assume.

Before creating or wiring a package-sensitive part:

  1. search_symbols / list_symbols_in_library first — prefer an existing library symbol over authoring a new one.
  2. Confirm the exact manufacturer part number and package suffix.
  3. Note the drawing view of every datasheet figure (top, bottom, component, solder, mating). An unstated view is the most common source of mirrored parts.
  4. Walk the physical leads from the documented key, in the documented direction.
  5. Reconcile three counts: datasheet leads, symbol pins, footprint pads. Document any intentional duplicate or mechanical-only pad.
  6. Read the result back with get_symbol_info and get_footprint_info rather than trusting what you just wrote.
  7. Refuse to use the part in a real schematic while any mirror, reversal, duplicate, missing lead or view ambiguity is unresolved.

Physical pin-map acceptance contract

For every custom or package-sensitive part, complete this record before the symbol and footprint are accepted. "Looks sequential" and a matching pin count are not evidence.

Record the manufacturer, exact MPN and package suffix, datasheet document number/revision, source URL, relevant page numbers, symbol library ID, and footprint library ID. Then add one row for every physical lead:

Datasheet leadFunctionSymbol pin / name / typeFootprint padX/Y (mm)Drawing view / directionEvidence
1Example only1 / NAME / passive10.00 / 0.00bottom view, clockwise from keydatasheet p. N, figure M

Apply these rules to the table:

  • Walk from the datasheet's documented key, notch, dot, flat, bevel, or other datum in the stated direction. State top, bottom, component, solder, pin, or mating view in every row; never silently translate between views.
  • Give repeated physical leads separate rows even when they share one electrical function. List exposed pads, shields, mounting tabs, and mechanical holes separately and state whether each is an electrical pad, a duplicated connection, or intentionally absent from the symbol.
  • Reconcile and record the datasheet physical-lead count, symbol electrical-pin count, footprint electrical-pad count, duplicate-pad count, and mechanical-only feature count. Explain every difference.
  • Treat a symbol pin number and footprint pad number as the same physical lead only when the evidence row proves it. Names such as A/K, G/D/S, B/C/E, COM, or VCC do not establish the physical number.

Acceptance procedure:

  1. Create or select the exact symbol and footprint only after completing the source columns above.
  2. Query the symbol back with get_symbol_info and the footprint with get_footprint_info(include_pads=true). The returned pad coordinates and rotations are footprint-local. Compare every returned pin/pad number, name, type, coordinate, drill, size, and layer set to the table and datasheet.
  3. Place a disposable symbol and footprint in a scratch project. Render the schematic and board, then inspect the pin-1/key marker, numbering direction, top/bottom orientation, pad geometry, drill/slot geometry, courtyard, fab, and silkscreen. For mating parts, inspect the mating view as well.
  4. Read the disposable instances back; do not accept only the values requested during creation as proof they were written.
  5. Refuse acceptance and keep the part out of a real schematic or PCB if any lead is missing, duplicated without explanation, mirrored, reversed, assigned to a different function, or ambiguous in view/direction. Record an unavailable datasheet figure, query, or render as BLOCKED, never as pass.

The rows below are starting hypotheses for generic parts only. Verify each against the actual symbol with get_symbol_info before relying on it.

Component TypeTypical (verify before use)
Passives (R, C, L)Pin 1 and Pin 2, interchangeable when unpolarised
Polarised capsPin 1 = +, pin 2 = −, but confirm on the symbol
ConnectorsSequential from 1
CrystalPin 1, Pin 2 (+ case ground if 4-pin)
ICs, diodes, BJTs, MOSFETsNo default — datasheet + symbol only

Pin Types

TypeUse For
inputLogic/analog inputs, gate inputs
outputLogic/analog outputs, push-pull drivers
bidirectionalData bus lines, I2C SDA, GPIO
tri_stateOutputs with high-impedance state
passiveResistor/capacitor/inductor pins, crystal pins
power_inVCC, VDD, GND pins (power consumer)
power_outRegulator output, power source pins
open_collectorOpen-drain/open-collector outputs
open_emitterOpen-emitter outputs
unspecifiedPins with no clear electrical type
no_connectPins that must not be connected

Required Symbol Properties

Every symbol must have these fields:

PropertyDescriptionExample
ReferenceDesignator prefixU, R, C, J, D, Q, L
ValuePart name or valueSTM32F103C8, 10k, 100nF
FootprintDefault footprint assignmentPackage_SO:SOIC-8_3.9x4.9mm
DatasheetURL to datasheethttps://...

Optional but recommended:

  • LCSC — LCSC/JLCPCB part number for assembly
  • MPN — Manufacturer part number
  • Description — Short text description

Symbol Layout Guidelines

  • Pin 1 indicator (dot or bar) on the symbol body
  • Inputs on the left side, outputs on the right side
  • Power pins on top (VCC) and bottom (GND)
  • Pin spacing: 2.54mm (100mil) standard grid
  • Symbol body: rectangle for ICs, standard shapes for passives/discretes

Footprint Creation

Pad Types

TypeUse For
smdSurface-mount pads (no drill hole)
thru_holeThrough-hole pads (plated drill)
np_thru_holeNon-plated through hole (mounting holes, slots)

Pad Side and Shape Details

create_footprint defaults SMD pads to the front-side layer set ["F.Cu", "F.Paste", "F.Mask"]. For bottom-side SMD pads, set layers=["B.Cu", "B.Paste", "B.Mask"] explicitly. Through-hole pads default to ["*.Cu", "*.Mask"].

Each pad may also set:

  • rotation in degrees; omit it for 0.
  • roundrect_rratio from 0 through 0.5 when shape="roundrect".
  • layers using only canonical pad layers: F.Cu, B.Cu, F.Paste, B.Paste, F.Mask, B.Mask, *.Cu, and *.Mask.
text
create_footprint(
  ...,
  pads=[{
    number: "1",
    type: "smd",
    shape: "roundrect",
    x: -8.075,
    y: 4.7,
    width: 2.5,
    height: 2.55,
    layers: ["B.Cu", "B.Paste", "B.Mask"],
    rotation: 180,
    roundrect_rratio: 0.2
  }]
)

Standard Pad Sizes Reference

PackagePad Size (mm)Pitch (mm)Notes
04020.5 x 0.5—2 pads, 0.5mm gap
06030.8 x 0.8—2 pads, 0.8mm gap
08051.0 x 1.0—2 pads, 1.0mm gap
12061.5 x 1.2—2 pads, 1.6mm gap
SOT-230.9 x 0.70.953 pads
SOT-23-50.9 x 0.70.955 pads
SOIC-81.5 x 0.61.278 pads, 5.4mm row spacing
SOIC-161.5 x 0.61.2716 pads, 5.4mm row spacing
TSSOP-161.4 x 0.40.6516 pads, 4.4mm row spacing
QFP-321.5 x 0.30.832 pads, quad-flat
QFP-481.5 x 0.30.548 pads, quad-flat
QFN-320.7 x 0.250.532 pads + exposed pad
QFN-480.7 x 0.250.548 pads + exposed pad

Courtyard

  • Extend courtyard 0.25mm beyond the outermost pad edges on all sides
  • This ensures minimum spacing between components during assembly
  • Use F.CrtYd layer, 0.05mm line width

Footprint Layers

LayerPurpose
F.CuFront copper (pads)
B.CuBack copper (pads for bottom-side components)
F.MaskFront solder mask opening (auto-generated from pads)
B.MaskBack solder mask opening
F.PasteFront solder paste (stencil openings)
B.PasteBack solder paste (stencil openings)
F.SilkSFront silkscreen (component outline, pin 1 marker)
F.CrtYdFront courtyard (assembly spacing)
F.FabFront fabrication (true component dimensions)

Footprint Layout Guidelines

  • Pin 1 marker on silkscreen (dot, bar, or chamfered corner)
  • Component outline on F.Fab layer with true dimensions
  • Silkscreen outline 0.1mm outside F.Fab outline
  • Reference (%R) on F.SilkS, readable at 1.0mm text height
  • Value on F.Fab layer

Existing Footprint Graphics

Use set_footprint_graphics to add or change line, arc, rectangle, circle, or polygon primitives in an existing .kicad_mod. Never patch the file directly.

text
set_footprint_graphics(
  footprint path,
  selector={layer: "B.CrtYd"},
  mode="replace",
  graphics=[...]
)
  • append preserves existing supported graphics on the selected layer.
  • replace replaces all supported graphics on the selected layer in one atomic write.
  • delete removes all supported graphics on the selected layer.
  • Text, pads, properties, models, groups, and graphics on other layers are preserved.
  • Replacement/deletion stops with a conflict if a selected graphic belongs to a group; do not work around this by editing the file.
  • Polygons close automatically. Supply at least three distinct points; repeating the first point at the end is optional.
  • Use get_footprint_info with graphics inclusion enabled and a layer filter to verify the resulting type, geometry, stroke width, fill, and item ID.

Existing Footprint Metadata

Use set_footprint_metadata to replace a footprint description, search tags, or KiCad footprint attributes without changing pads, graphics, properties, groups, or 3D models.

text
set_footprint_metadata(
  footprint_path=".../Part.kicad_mod",
  description="Optional replacement",
  tags=["keyboard", "hot_swap"],
  attributes=["exclude_from_pos_files"]
)
  • Supply at least one metadata field.
  • Only supplied fields change.
  • Empty tags or attributes removes the corresponding block.
  • exclude_from_pos_files omits the footprint from pick-and-place output without implicitly adding exclude_from_bom.
  • Use edit_footprint_pad with new_number and optional match_all=true to renumber one or every matching direct-child pad atomically.
  • Use edit_footprint_pad with zone_connect (solid, thermal, none) to override how zones connect to one pad, or inherited to remove the override.

Existing Footprint 3D Models

Use set_footprint_models to append, replace, or delete top-level 3D model associations without changing any non-model footprint content.

text
set_footprint_models(
  footprint_path=".../Part.kicad_mod",
  mode="replace",
  models=[{
    path: "../models/Part.step",
    offset: {x: 0, y: 0, z: 0},
    scale: {x: 1, y: 1, z: 1},
    rotate: {x: 0, y: 0, z: 90}
  }]
)
  • append and replace require at least one model.
  • delete requires models to be omitted or empty and removes every top-level model.
  • Omitted transforms default to offset 0/0/0, scale 1/1/1, and rotation 0/0/0.
  • Multiple model blocks are written in payload order in one atomic operation.

Library Registration

Register a Symbol Library

register_symbol_library(nickname, library_path, scope?, project?, replace_existing?)

Register a Footprint Library

register_footprint_library(nickname, library_path, scope?, project?, replace_existing?)
  • Registration is idempotent by default: an existing nickname is left unchanged.
  • Set replace_existing=true to update a stale URI for that nickname in place.
  • Project-local and same-repository sibling libraries are written as portable ${KIPRJMOD} URIs; existing options, descriptions, and unrelated entries are preserved.

Scope

ScopeLocationVisible To
globalUser-level sym-lib-tableAll projects
projectProject-level sym-lib-tableThis project only

Recommendation: Use project scope for project-specific custom parts. Use global scope only for reusable personal libraries used across multiple projects.

Library File Locations

  • Symbol libraries: *.kicad_sym files
  • Footprint libraries: directories containing *.kicad_mod files
  • Project-level tables: sym-lib-table and fp-lib-table in project directory

IPC Naming Conventions (Brief Reference)

Standard footprint naming follows IPC-7351:

[Type]_[Dimensions]_[Pitch]_[Suffix]

Examples:

  • R_0402_1005Metric — 0402 resistor (1.0x0.5mm metric)
  • C_0805_2012Metric — 0805 capacitor (2.0x1.2mm metric)
  • SOIC-8_3.9x4.9mm_P1.27mm — SOIC-8 with 1.27mm pitch
  • QFN-32-1EP_5x5mm_P0.5mm — QFN-32 with exposed pad, 5x5mm body
  • SOT-23 — SOT-23 3-pin
  • TSSOP-16_4.4x5mm_P0.65mm — TSSOP-16 with 0.65mm pitch

Dimension format: LxW in mm (body dimensions, not pad-to-pad).


Common Workflows

Create a New IC Symbol + Footprint

  1. search_symbols(query) — pass the part name; confirm it does not exist
  2. search_footprints(query) — pass the package name; check if the footprint exists (often it does)
  3. Create symbol with correct pin count, names, numbers, and types
  4. Assign existing footprint OR create custom footprint from datasheet
  5. Register library if new
  6. Set Footprint property on symbol to link them

Add LCSC Number to Existing Components

  1. Load sch_analysis toolset
  2. Find components missing LCSC field
  3. Search JLCPCB parts for matching part numbers
  4. Update component fields with LCSC numbers

Create Project-Specific Library

  1. Create new .kicad_sym file for symbols
  2. Create new directory for footprints
  3. Register both with project scope
  4. Add custom components as needed

Rules

  1. Always search before creating — most parts already exist in KiCAD libraries
  2. Never edit .kicad_sym or .kicad_mod directly — use MCP tools only
  3. Derive pin numbering from the datasheet and verify it against the symbol — there is no universal convention; read the part back with get_symbol_info
  4. Set pin types correctly — ERC depends on accurate pin types
  5. Include all required properties — Reference, Value, Footprint, Datasheet
  6. Use 0.25mm courtyard margin — standard clearance for assembly
  7. Mark pin 1 clearly — both on symbol and footprint silkscreen
  8. Use project scope by default — avoid polluting global libraries
  9. Name footprints per IPC — consistent naming helps future reuse
  10. Load toolsets first — check get_active_toolsets() and load library before starting
  11. Use layer-scoped graphic edits deliberately — replace and delete affect every supported primitive on the selected layer

よくある質問

AIスキル「Kicad Library」では何ができますか?

Library management workflow for KiCAD — creating symbols, footprints, and managing libraries via MCP tools. Triggers on: "create a symbol", "make a footprint", "custom component", "register library", "find a part", "pin numbering", "new symbol", "new footprint", "add to library", "library path", "pad layout".

TypingMindでKicad Libraryを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Kicad Libraryはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにKicad Libraryをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/mixelpixx/Konnect/tree/main/crates/konnect/assets/skills/kicad-libraryを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Kicad Libraryを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Kicad Libraryで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもKicad Libraryを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Kicad Library」は無料ですか?

はい。mixelpixxがAGPL-3.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇