Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/andrewbartels1/solidworksmcp-python/extract-and-testnpx skills add andrewbartels1/SolidworksMCP-python --skill extract-and-testgit clone --depth 1 https://github.com/andrewbartels1/SolidworksMCP-pythonWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00112 | $0.01607 |
| Opus 5 | $0.00056 | $0.00804 |
| Sonnet 5 | $0.00022 | $0.00321 |
| Haiku 4.5 | $0.00011 | $0.00161 |
Grade A, and why
extract-and-test scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 177 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Extract & Test — pywin32_adapter.py
Apply this skill whenever a method in src/solidworks_mcp/adapters/pywin32_adapter.py contains:
- Deeply nested
try/exceptblocks or inner closures that can't be tested in isolation - Mixed concerns (COM selection strategy + fallback + error handling all in one body)
- A closure that calls
self._attempt(...)with an inner_run/_operationlambda
Step 1 — Read and Analyse
Read the target line range. For each logical block, fill in this table:
| Concern | COM calls involved | Failure mode | Return contract |
|---|---|---|---|
| (fill in) | (fill in) | (fill in) | (fill in) |
Apply these heuristics to determine the right helper shape:
| Shape | When to use |
|---|---|
-> None (log, never raise) |
Setup/orientation side-effects — failure is acceptable |
-> bool |
COM operation that writes a file; True = file exists |
-> dict | None |
COM selection/query strategy; None = this strategy failed, try next |
-> dict (raises on failure) |
Last-chance fallback or invoker — surface error to caller |
@staticmethod |
Pure string/data transformation with no self state |
Step 2 — Extract Helpers
Write one helper per concern. Insert helpers immediately before the async def they support.
def _<verb>_<noun>(self, <args>) -> <return type>:
"""<One-line description>.
Args:
<arg>: <description>
Returns:
<type>: <description>
Raises:
<ExceptionType>: <when>
"""
...
Examples by return contract:
# Graceful-failure helper — log, never raise
def _set_view_orientation(self, target_doc, orientation, view_const) -> None:
try:
target_doc.ShowNamedView2("", view_const)
except Exception:
logger.warning("Could not set view orientation to %s", orientation)
# Boolean helper — True = file written
def _save_screenshot_with_modelview(self, model_view, path, width, height) -> bool:
try:
model_view.SaveBitmapWithVariableSize(path, width, height)
return os.path.exists(path)
except Exception:
return False
# Optional-dict helper — None = strategy failed, try next
def _try_select_by_extension(self, target_doc, candidates, feature_name) -> dict | None:
for candidate in candidates:
for entity_type in ENTITY_TYPES:
try:
if target_doc.Extension.SelectByID2(candidate, entity_type, 0, 0, 0, False, 0, None, 0):
return {"selected": True, "feature_name": feature_name, ...}
except Exception:
continue
return None
# Raising helper — last-chance invoker
def _invoke_run_macro2(self, macro_path, module_name, proc_name) -> dict:
result = self.swApp.RunMacro2(macro_path, module_name, proc_name, 0, 0)
success = result[0] if isinstance(result, (list, tuple)) else bool(result)
if not success:
raise SolidWorksMCPError(f"RunMacro2 failed for {macro_path}")
return {"macro_path": macro_path, "module_name": module_name}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 177 lines · 112 tokens per session scan A c9ee5989cfcc
extract-and-test is a skill published in the GitHub repository andrewbartels1/SolidworksMCP-python (65 stars, last pushed 7d ago), licensed MIT. It adds 112 tokens to every session and 1,607 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
run-helix-tests
Submit and monitor .NET MAUI unit tests on Helix infrastructure. Supports running XAML, Resizetizer, Core, Essentials, and other unit test projects on distributed Helix queues.
write-tests
Write failing tests from requirements. Invoke for each todo before /implement.
dart-add-unit-test
Write and organize unit tests for functions, methods, and classes using package:test. Use when creating new logic or fixing bugs to ensure code remains correct and regression-free.
go-testing
Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.
dart-test
DART Test: unit tests, integration tests, CI validation, and debugging.
myco:runtime-bootstrap-and-test-isolation
Activate this skill when adding a new manager, adding a new tool category, writing or debugging tool unit tests, diagnosing tool-visibility failures, investigating startup performance, or extending/maintaining/debugging the two-tier tool discovery system (toolindex) — even if the user doesn't explicitly ask about the…