Install
openclaw skills install @jasonyang170/extension-dev-skillAI Skill for building EasyEDA Pro extension plugins. Used when users need to create, modify, or debug JLCEDA/EasyEDA Pro plugins, including generating plugin code, querying pro-api-types API, configuring extension.json, and handling i18n localization. Trigger words: "EasyEDA", "嘉立创EDA", "EDA plugin", "EDA extension", "extension.json", "pro-api-types", "原理图", "PCB设计"
openclaw skills install @jasonyang170/extension-dev-skillBuild extension plugins for EasyEDA Pro. Provides a complete API query workflow, code generation standards, and debugging toolchain.
index.d.ts first; if not found = does not existgrepSearch; no results = do not useedalocalStorage, window, document; allowed inside iframeApplicable:
@jlceda/pro-api-typesextension.json, locales i18n files, or build processeseext-dev-mcp MCP toolsNot applicable:
extension.json and user did not request initializationAPI type definition location: the index.d.ts file bundled with this Skill (sourced from @jlceda/pro-api-types). Always search in this file; do not look in node_modules.
grepSearch "SCH_PrimitiveComponent" # Schematic component class
grepSearch "PCB_PrimitiveVia" # PCB via class
grepSearch "sch_PrimitiveComponent:" # Note the colon
grepSearch "dmt_SelectControl:" # Verify mount path
grepSearch "getCurrentDocumentInfo"
Then use readFile to read the full signature and confirm parameter types and return type.
# Search the returned interface type to confirm it has the needed methods
grepSearch "ISCH_PrimitiveComponent$1" # Interfaces with $1 suffix usually have more methods
No search results = does not exist. Do not use!
try/catchgrepSearch found the method name; confirmed return typereadFile read the full signature; confirmed all parameter types and countseda.xxx_YYY class exists in the class EDA property listgetAllPrimitiveId, must use a concrete type (not an abstract class)documentType values| Requirement | ❌ Forbidden | ✅ Recommended |
|---|---|---|
| Get user input | - | eda.sys_Dialog.showInputDialog() |
| User selection | - | eda.sys_Dialog.showSelectDialog() |
| Show message | alert() | eda.sys_Dialog.showInformationMessage() |
| Confirm action | confirm() | eda.sys_Dialog.showConfirmationMessage() |
| Toast notification | DOM manipulation | eda.sys_Message.showToastMessage() |
| Store data | localStorage (main process) | eda.sys_Storage.setExtensionUserConfig(key, value) |
| Custom UI | Manipulate host DOM | eda.sys_IFrame.openIFrame() |
| Show HTML | showInformationMessage(html) | Must use iframe |
| Open link | window.open() | eda.sys_Window.open() |
| Browser hardware API | Use in main process | Available in iframe (navigator.serial, etc.) |
| IFrame data passing | (window as any).__xxx = data (main process and iframe window are isolated); window.parent.eda | ✅ Option A (recommended): Store with eda.sys_Storage.setExtensionUserConfig(key, value), read in iframe with getExtensionUserConfig(key); ✅ Option B: Call eda API directly from iframe (both main process and iframe can access the eda object; just use eda directly) |
When extension.json does not exist in the workspace:
git clone https://github.com/easyeda/pro-api-sdk.git <project-name>
cd <project-name>
npm install
npm run compile
eda.sys_* alternativesmy-plugin-home, my-plugin-sch)resources/api-reference.mdresources/experience.mdresources/api-reference.md