# easyeda/easyeda-api-skill architecture

> Architecture diagram of the GitHub repository easyeda/easyeda-api-skill, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/easyeda/easyeda-api-skill
- Repository: https://github.com/easyeda/easyeda-api-skill

## Overview

EasyEDA API Skill equips AI coding tools with API and extension-development knowledge, source-format specifications, and a local bridge for executing code in EasyEDA Pro. The primary runtime flow is AI request → bridge → EasyEDA client → bridge response → AI. The tree and README establish the documentation capabilities; the sampled bridge source supports the request, WebSocket dispatch, and response path. Other internal documentation relationships are shown as lookup destinations, not as runtime calls.

Main entry points: [`scripts/bridge-server.mjs`](https://github.com/easyeda/easyeda-api-skill/blob/main/scripts/bridge-server.mjs) (WebSocket Server), [`SKILL.md`](https://github.com/easyeda/easyeda-api-skill/blob/main/SKILL.md) (Skill Instructions), [`guide`](https://github.com/easyeda/easyeda-api-skill/tree/main/guide) (Extension Guides), [`references`](https://github.com/easyeda/easyeda-api-skill/tree/main/references) (API References)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_knowledge["AI Knowledge"]
  node_skill["Skill Instructions<br/>[SKILL.md]"]
  node_devguides["Extension Guides"]
  node_apirefs["API References"]
end

subgraph group_formats["Document Formats"]
  node_formatdocs["Source Format Specs"]
end

subgraph group_bridge["Execution Bridge"]
  node_bridgehttp["HTTP API<br/>[bridge-server.mjs]"]
  node_bridgews["WebSocket Server<br/>[bridge-server.mjs]"]
  node_routing["Request Routing<br/>[bridge-server.mjs]"]
  node_clientstate[("Client Registry<br/>[bridge-server.mjs]")]
  node_pending[("Pending Requests<br/>[bridge-server.mjs]")]
end

subgraph group_eda["EasyEDA Client"]
  node_edaclient(("EasyEDA Pro"))
end

node_ai(("AI Tool"))

node_ai -->|"reads instructions"| node_skill
node_ai -->|"consults"| node_devguides
node_ai -->|"looks up APIs"| node_apirefs
node_ai -->|"consults formats"| node_formatdocs
node_ai -->|"submits code"| node_bridgehttp
node_bridgehttp -->|"dispatches request"| node_routing
node_bridgews -->|"registers clients"| node_clientstate
node_routing -->|"selects client"| node_clientstate
node_routing -->|"tracks request"| node_pending
node_routing -->|"sends execution"| node_bridgews
node_bridgews -->|"forwards code"| node_edaclient
node_edaclient -->|"returns result"| node_bridgews
node_bridgews -->|"resolves request"| node_pending
node_pending -->|"returns result"| node_bridgehttp
node_bridgehttp -->|"responds"| node_ai

click node_skill "https://github.com/easyeda/easyeda-api-skill/blob/main/SKILL.md"
click node_devguides "https://github.com/easyeda/easyeda-api-skill/tree/main/guide"
click node_apirefs "https://github.com/easyeda/easyeda-api-skill/tree/main/references"
click node_formatdocs "https://github.com/easyeda/easyeda-api-skill/tree/main/format"
click node_bridgehttp "https://github.com/easyeda/easyeda-api-skill/blob/main/scripts/bridge-server.mjs"
click node_bridgews "https://github.com/easyeda/easyeda-api-skill/blob/main/scripts/bridge-server.mjs"
click node_routing "https://github.com/easyeda/easyeda-api-skill/blob/main/scripts/bridge-server.mjs"
click node_clientstate "https://github.com/easyeda/easyeda-api-skill/blob/main/scripts/bridge-server.mjs"
click node_pending "https://github.com/easyeda/easyeda-api-skill/blob/main/scripts/bridge-server.mjs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_skill,node_devguides,node_apirefs toneBlue
class node_formatdocs toneAmber
class node_bridgehttp,node_bridgews,node_routing,node_clientstate,node_pending toneMint
class node_edaclient toneRose
class node_ai toneIndigo
```

## Components

### AI Knowledge

- [Skill Instructions](https://github.com/easyeda/easyeda-api-skill/blob/main/SKILL.md): `SKILL.md`
- [Extension Guides](https://github.com/easyeda/easyeda-api-skill/tree/main/guide): `guide`
- [API References](https://github.com/easyeda/easyeda-api-skill/tree/main/references): `references`

### Document Formats

- [Source Format Specs](https://github.com/easyeda/easyeda-api-skill/tree/main/format): `format`

### Execution Bridge

- [HTTP API](https://github.com/easyeda/easyeda-api-skill/blob/main/scripts/bridge-server.mjs): `scripts/bridge-server.mjs`
- [WebSocket Server](https://github.com/easyeda/easyeda-api-skill/blob/main/scripts/bridge-server.mjs): `scripts/bridge-server.mjs`
- [Request Routing](https://github.com/easyeda/easyeda-api-skill/blob/main/scripts/bridge-server.mjs): `scripts/bridge-server.mjs`
- [Client Registry](https://github.com/easyeda/easyeda-api-skill/blob/main/scripts/bridge-server.mjs): `scripts/bridge-server.mjs`
- [Pending Requests](https://github.com/easyeda/easyeda-api-skill/blob/main/scripts/bridge-server.mjs): `scripts/bridge-server.mjs`

### EasyEDA Client

- **EasyEDA Pro**

### Other components

- **AI Tool**

## Connections

- AI Tool → Skill Instructions: reads instructions
- AI Tool → Extension Guides: consults
- AI Tool → API References: looks up APIs
- AI Tool → Source Format Specs: consults formats
- AI Tool → HTTP API: submits code
- HTTP API → Request Routing: dispatches request
- WebSocket Server → Client Registry: registers clients
- Request Routing → Client Registry: selects client
- Request Routing → Pending Requests: tracks request
- Request Routing → WebSocket Server: sends execution
- WebSocket Server → EasyEDA Pro: forwards code
- EasyEDA Pro → WebSocket Server: returns result
- WebSocket Server → Pending Requests: resolves request
- Pending Requests → HTTP API: returns result
- HTTP API → AI Tool: responds
