Compiled module import verification
Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder
npx -y skills add HolobiomicsLab/asb-skill-collections --skill compiled-module-import-verificationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 14 stars14 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when after compiling nanobind-based C++ bindings into a Python extension module (e.g., pyOpenMS), or when integrating a newly built native module into a Python environment. Apply this skill to confirm that the generated .so/.pyd/.
The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
5.1 KB, 808 tokens by cl100k_base, as published. Nobody here has run it
compiled-module-import-verification
License: restricted — no clear open-source license detected for the underlying tool; verify licensing before commercial use or redistribution. <!-- asb-license-banner -->
Summary
Verify that a compiled Python extension module (generated from C++ bindings via nanobind) loads without errors and exposes the expected API surface. This skill ensures binding completeness and runtime correctness before deployment.
When to use
After compiling nanobind-based C++ bindings into a Python extension module (e.g., pyOpenMS), or when integrating a newly built native module into a Python environment. Apply this skill to confirm that the generated .so/.pyd/.dylib file is importable, module metadata is present, and at least one representative function or class attribute is callable.
When NOT to use
- The module source code has not yet been compiled or CMake build has not completed.
- The module is already known to work (e.g., it is a tested release version in production).
- You are performing static analysis of C++ binding declarations rather than runtime validation.
Inputs
- Compiled Python extension module file (.so on Linux, .pyd on Windows, .dylib on macOS)
- Python environment with compatible runtime and dependencies
Outputs
- Module import success/failure status
- Proof of binding completeness (successful function call or attribute access)
- Error traceback (if import or invocation fails)
How to apply
In a Python environment where the compiled extension module is discoverable (via PYTHONPATH or site-packages), import the generated module and execute a simple function call or attribute access on it. Wrap the import and invocation in a try-except block to catch import errors (missing dependencies, ABI mismatches, symbol resolution failures) and attribute errors (missing bindings). Check that the module object exists in sys.modules and that the invoked function or attribute returns without raising an exception. This validates that the binding layer successfully exposed the C++ API and that the compiled code is ABI-compatible with the Python runtime.
Related tools
- nanobind (Generates Python bindings from C++ code; compiled output is the target of import verification)
- CMake (Builds the C++ binding files into a Python extension module prior to import testing)
- Python interpreter (Runtime environment in which the compiled extension module is imported and tested)
Evaluation signals
- Module imports without ImportError, AttributeError, or symbol resolution failures.
- Module object is present in sys.modules after successful import.
- Representative function or class attribute from the C++ API is callable and executes without exception.
- Invoked function returns a value or object consistent with C++ API documentation.
- No segmentation faults or ABI incompatibility errors occur during invocation.
Limitations
- This skill only validates that the module can be imported and a single representative call succeeds; it does not perform exhaustive API coverage testing or verify correctness of all bindings.
- Import success does not guarantee that all exposed functions are correctly bound or that numerical results are accurate.
- Platform-specific ABI mismatches (e.g., glibc version, MSVC runtime) may prevent import even if the binding code is correct.
Evidence
- [other] Execute the build process to generate the compiled pyOpenMS module. 4. Import the generated pyOpenMS module in a Python environment and verify that the module loads without errors. 5. Execute a simple function call or attribute access on the imported module to confirm binding completeness.: "Execute the build process to generate the compiled pyOpenMS module. 4. Import the generated pyOpenMS module in a Python environment and verify that the module loads without errors. 5. Execute a"
- [readme] With pyOpenMS, OpenMS offers Python bindings to a large part of the OpenMS API to enable rapid algorithm development.: "With pyOpenMS, OpenMS offers Python bindings to a large part of the OpenMS API to enable rapid algorithm development."
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.