Skip to content
Back to skills

Sw Kb Api

ASecurity

Query the SolidWorks knowledge-base catalog for categories, matching parts, complete published instructions, macros, known API errors, and lessons. Use after sw-pre-start and before any SolidWorks modeling or API work, for every part, assembly, drawing, repair, or model reproduction request.

  • 3 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added September 12, 2026
ai-agentsgoshellgitapibackend

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 12, 2026

npx -y skills add thedixitjain/the-mega-skill-library --skill sw-kb-api --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sw Kb Api?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sw Kb Api
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thedixitjain-sw-kb-api/badge)](https://www.skillsdirectory.com/skills/thedixitjain-sw-kb-api)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: sw-kb-api
description: "Query the SolidWorks knowledge-base catalog for categories, matching parts, complete published instructions, macros, known API errors, and lessons. Use after sw-pre-start and before any SolidWorks modeling or API work, for every part, assembly, drawing, repair, or model reproduction request."
category: backend-and-data
source_repo: hashgraph-online/awesome-codex-plugins
source_path: "plugins/Erfouni/solidworks-GPT-plugin/plugins/solidworks-gpt-plugin/skills/sw-kb-api/SKILL.md"
source_url: https://github.com/hashgraph-online/awesome-codex-plugins/blob/HEAD/plugins/Erfouni/solidworks-GPT-plugin/plugins/solidworks-gpt-plugin/skills/sw-kb-api/SKILL.md
---


# SolidWorks KB Lookup

Run `$sw-pre-start` first. Complete this lookup before CAD work.

Set `KB_HOST` from `SW_KB_HOST`; default to
`https://sw-plugin.ideep.org`. Use quoted `curl` shell calls only. Runtime
endpoints are public and use camelCase JSON.

## 1. Check health

```text
curl -sS "{KB_HOST}/health"
```

If unreachable, tell the user `Knowledge base is offline - proceeding without
KB lookup`, record the outage for session feedback, and continue from verified
engineering knowledge. Do not abort the CAD task.

## 2. Match a category

```text
curl -sS "{KB_HOST}/api/categories"
```

Fuzzy-match the requested component against category `name` or `slug`. Save the
matching `id` as `categoryId`. If nothing matches, continue to the free-text
fallback in Step 4.

## 3. Match a part inside the category

```text
curl -sS "{KB_HOST}/api/parts?categoryId={categoryId}&pageSize=100"
```

Optionally add a URL-encoded `q` parameter. Match active items by exact or close
`partNumber`, then by `name`. Save the best `id` as `partId`.

## 4. Load complete part detail

When `partId` is known:

```text
curl -sS "{KB_HOST}/api/parts/{partId}"
```

Otherwise search globally:

```text
curl -sS "{KB_HOST}/api/parts?q={encoded-name-or-number}&pageSize=20"
```

Fetch the best match's detail. Read every published `instructions`, `macros`,
`knownErrors`, and `lessons` item rather than relying on list summaries.

## 5. Apply the result

For a part with instructions:

- follow published instructions as the primary build guide;
- use a complete `isTemplate: false` macro directly after replacing only
  declared `parameters` with user values;
- adapt an `isTemplate: true` macro to the current part;
- read all known errors before using any listed `swFeature` and apply resolved
  fixes proactively;
- treat every lesson `prevention` as an active constraint;
- tell the user which part was found and how many macros are being used.

For a catalog part without instructions, apply its errors and lessons, explain
that no published build guide exists, and build from verified knowledge.

When no part matches, explain that the part is not yet in the KB, load the
global safeguards below, and build from scratch. Do not promise that feedback
will be sent; submission still requires consent.

## 6. Load global safeguards

Always run both calls, even if no part matched:

```text
curl -sS "{KB_HOST}/api/errors"
curl -sS "{KB_HOST}/api/lessons"
```

Before every SolidWorks API call, cross-reference the method against global and
part-specific errors. When `isResolved` is true, apply `resolution` before the
call. Apply lesson `prevention` fields as rules, prioritizing critical and high
severity.

## Cache and failures

Cache categories and global errors or lessons once per Codex task. Cache each
part detail once per build. Refresh only when the user explicitly requests it
or the task changes to a different part.

- `200`: use the data.
- `404`: treat the resource as absent and continue.
- `422`: correct or simplify the query, then try the free-text fallback once.
- `5xx` or timeout: record the outage and continue without KB data.

---

**Source:** [`hashgraph-online/awesome-codex-plugins`](https://github.com/hashgraph-online/awesome-codex-plugins) → `plugins/Erfouni/solidworks-GPT-plugin/plugins/solidworks-gpt-plugin/skills/sw-kb-api/SKILL.md`

Files in this skill

  • SKILL.md4 KB
  • agents/openai.yaml216 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.