Borrowing it
Nothing to install: this file belongs to andrewbartels1/SolidworksMCP-python. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/andrewbartels1/SolidworksMCP-python/main/.github/skills/extract-and-test/SKILL.mdgit clone --depth 1 https://github.com/andrewbartels1/SolidworksMCP-pythonWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/andrewbartels1/solidworksmcp-python/extract-and-test)<a href="https://agentmods.dev/skills/andrewbartels1/solidworksmcp-python/extract-and-test"><img src="https://agentmods.dev/badge/skills/andrewbartels1/solidworksmcp-python/extract-and-test/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/andrewbartels1/solidworksmcp-python/extract-and-test"><img src="https://agentmods.dev/badge/skills/andrewbartels1/solidworksmcp-python/extract-and-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What 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.1 | $0.00112 | $0.01607 |
| Opus 5.5 | $0.00045 | $0.00643 |
| Sonnet 5.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 1mo 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.
- 1mo 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 (82 stars, last pushed 4d ago), licensed MIT. It adds 112 tokens to every session and 1,607 once invoked, about $0.0004 per session on Opus 5.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
temporal-python-testing
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
python-testing
Guidelines for writing and running tests in the Agent Framework Python codebase. Use this when creating, modifying, or running tests.
adk-verify-snippets
Checks that every Python code block in a Markdown file actually compiles and runs, by extracting each block to a temporary file, executing it in an isolated subprocess, and writing a pass/fail report with per-snippet coverage. Use when the user asks to verify, test, or validate the code samples in a README, a guide…
adk-setup
Sets up a local ADK Python development environment in a git clone of the open-source adk-python repository: a uv virtual environment, all dependency extras, pre-commit hooks, and a first unit-test run. Runs only when explicitly requested, never on its own. Use when asked to set up, bootstrap, or repair a development…
test-generator
Generate pytest test cases for Python functions and classes.
typescript
TypeScript strict mode with eslint and jest.