agentsclimarketplace

Asynchronous method introspection

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/asynchronous-method-introspection

Use when you have a plugin-based converter architecture (e.g., web services and compute libraries in separate directories) and you need to automatically discover all available (source_attribute, target_attribute, converter_name) conversion triples without hardcoding them.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill asynchronous-method-introspection

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 15 stars15 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 file declares

Copied from the file, not written here

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

9.1 KB, ~1.5k tokens by cl100k_base, as published. Nobody here has run it

asynchronous-method-introspection

Summary

Dynamically discover, enumerate, and validate asynchronous conversion methods across a modular converter registry to build a unified job manifest of all available source-to-target chemical identifier transformations. This skill enables automatic Job discovery without manual configuration, ensuring that each conversion route is backed by a real async method on the corresponding converter instance.

When to use

Apply this skill when you have a plugin-based converter architecture (e.g., web services and compute libraries in separate directories) and you need to automatically discover all available (source_attribute, target_attribute, converter_name) conversion triples without hardcoding them. Use it before running batch annotation workflows to confirm which Jobs are actually available and executable.

When NOT to use

  • Converters are statically defined and do not change at runtime — use a static configuration file instead
  • You only need a subset of converters; introspecting the entire registry will waste time and resources
  • Method signatures are not standardized across converters — inconsistent async/sync calling conventions will cause validation failures

Inputs

  • Converter module paths (web and compute directories)
  • Converter class definitions with init method defining conversions list
  • Converter instances with method stubs or method templates

Outputs

  • Unified Job registry (list of validated (source_attribute, target_attribute, converter_name) tuples)
  • Serialized Job manifest file (structured listing of all available conversions)
  • Validated method catalog (mapping of Job triples to actual callable async/sync methods)

How to apply

Load the ConverterBuilder module to recursively discover all converter classes from MSMetaEnhancer/libs/converters/web/ and MSMetaEnhancer/libs/converters/compute/ directories. For each discovered converter instance, extract its conversions list (defined as tuples of source_attribute, target_attribute, and conversion_method_name) and invoke create_top_level_conversion_methods() to trigger dynamic method generation. Then iterate over each converter's conversions list and validate that the named conversion_method exists as an async method (for WebConverters) or sync method (for ComputeConverters) on that instance. Aggregate all validated (source_attr, target_attr, converter_name) triples into a unified Job registry and serialize the result into a structured manifest file that can be queried downstream to determine which conversion routes are safe to request.

Related tools

Examples

from MSMetaEnhancer.libs.utils.ConverterBuilder import ConverterBuilder
from MSMetaEnhancer.libs.converters.web import CTS, CIR, IDSM, PubChem, BridgeDb
from MSMetaEnhancer.libs.converters.compute import RDKit
ConverterBuilder.register([CTS, CIR, IDSM, PubChem, BridgeDb, RDKit])
jobs_manifest = ConverterBuilder.discover_and_validate_jobs()
print(jobs_manifest)

Evaluation signals

  • All discovered converter instances have a conversions attribute that is a non-empty list of tuples (source, target, method_name)
  • For each Job triple (source_attr, target_attr, converter_name), the corresponding converter instance has a callable method with the specified method_name that is either async (WebConverters) or sync (ComputeConverters)
  • The serialized Job manifest contains ≥ 1 entry per registered converter and is syntactically valid (JSON, YAML, or structured text format)
  • Invoking a method from the registry on a real converter instance does not raise AttributeError or MethodNotFoundError
  • The Job registry is consistent across multiple runs of the introspection routine (no non-deterministic discovery)

Limitations

  • Dynamically generated methods must follow a strict naming convention (method_name derived from source and target attributes); converters that deviate will not be discovered
  • Async method introspection cannot validate method signatures or return types at discovery time; validation failures only surface at runtime
  • The skill assumes converters are stateless during introspection; stateful converters that require initialization parameters may not be introspectable
  • Network-dependent converters (e.g., web services) are not validated to confirm they are actually reachable; only local method presence is checked

Evidence

  • [other] Load the ConverterBuilder module which automatically discovers and instantiates all available converters from MSMetaEnhancer/libs/converters/web/ and MSMetaEnhancer/libs/converters/compute/ directories.: "Load the ConverterBuilder module which automatically discovers and instantiates all available converters from MSMetaEnhancer/libs/converters/web/ and MSMetaEnhancer/libs/converters/compute/"
  • [other] For each discovered converter (CIR, CTS, IDSM, PubChem, BridgeDb, RDKit, and any custom converters), extract the conversions list defined in its init method as tuples of (source_attribute, target_attribute, conversion_method_name).: "For each discovered converter (CIR, CTS, IDSM, PubChem, BridgeDb, RDKit, and any custom converters), extract the conversions list defined in its init method as tuples of (source_attribute,"
  • [other] Invoke the create_top_level_conversion_methods() call on each converter to trigger dynamic method generation based on the conversions list.: "Invoke the create_top_level_conversion_methods() call on each converter to trigger dynamic method generation based on the conversions list."
  • [other] Validate that each Job's conversion_method exists as an async method (for WebConverters) or sync method (for ComputeConverters) on the corresponding converter instance.: "Validate that each Job's conversion_method exists as an async method (for WebConverters) or sync method (for ComputeConverters) on the corresponding converter instance."
  • [readme] The app uses asynchronous implementation of annotation process allowing for optimal fetching speed.: "The app uses asynchronous implementation of annotation process allowing for optimal fetching speed."
  • [readme] ConverterBuilder.register([CTS, CIR, IDSM, PubChem, BridgeDb, RDKit]): "ConverterBuilder.register([CTS, CIR, IDSM, PubChem, BridgeDb, RDKit])"

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.