agentsclimarketplace

Api query routing conditional per database

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/api-query-routing-conditional-per-database

Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill api-query-routing-conditional-per-database

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

  • 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 when you have a chemical structure query (as a SMILES string or molecular identifier) and need to search across multiple external chemical repositories simultaneously, but only some repositories are relevant for your specific compound class (e.

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

8.3 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it

api-query-routing-conditional-per-database

Summary

Route chemical structure queries to multiple external repositories (PubChem, ChemSpider, Norine, ChEBI, COCONUT, NP Atlas) using conditional logic that determines which repositories are applicable based on query properties. This skill enables parallel or sequential dispatch of SMILES-formatted queries and consolidates normalized results across heterogeneous external APIs.

When to use

When you have a chemical structure query (as a SMILES string or molecular identifier) and need to search across multiple external chemical repositories simultaneously, but only some repositories are relevant for your specific compound class (e.g., natural products, synthetic drugs, peptides). Use this skill when you want unified results that preserve per-repository match status and metadata rather than searching each repository independently.

When NOT to use

  • Input is not a valid SMILES string or molecular structure representation; pre-validate chemical format before routing.
  • You only need to search a single repository; conditional multi-repository dispatch adds latency and complexity unnecessarily.
  • Results must be merged into a single canonical record; this skill preserves per-repository distinctions, which may not suit use cases requiring a unified compound identity.

Inputs

  • SMILES string (chemical structure in Simplified Molecular Input Line Entry System format)
  • Molecular identifier or InChI string
  • Repository applicability flags or compound classification metadata

Outputs

  • Unified consolidated results table with per-repository match status
  • Normalized compound records (identifiers, names, metadata from each repository)
  • Repository-specific match details and confidence indicators

How to apply

Parse the input SMILES string and validate its chemical structure format. Apply conditional routing logic to determine which of the six target repositories (PubChem, ChemSpider, Norine, ChEBI, COCONUT, NP Atlas) are applicable based on the structure's properties or the repository's documented scope (e.g., Norine specializes in non-ribosomal peptides, NP Atlas in natural products). Dispatch queries to applicable repositories using their respective API endpoints—either in parallel for speed or sequentially to manage rate limits. Collect and normalize match records from each repository response, extracting compound identifiers, common names, and metadata. Consolidate results into a unified output table that preserves per-repository match status, allowing downstream analysis to filter or weight results by source.

Related tools

Evaluation signals

  • Validate that all queries dispatched to applicable repositories received a response (no timeouts or dropped requests).
  • Verify that per-repository match records are normalized and include consistent identifiers, names, and metadata fields across all sources.
  • Confirm that the consolidated output table preserves repository-specific match status and does not merge records across repositories unless explicitly deduplicated.
  • Check that conditional routing logic correctly excluded repositories that were not applicable for the input compound class (e.g., NRP queries should not return empty or erroneous results from non-NRP repositories).
  • Inspect a sample of multi-repository queries to ensure result latency is acceptable for the chosen dispatch strategy (parallel vs. sequential).

Limitations

  • Repository API availability and rate limits may introduce latency or failure modes; sequential vs. parallel dispatch must be tuned per repository SLA.
  • Conditional routing logic depends on accurate classification of input structures; misclassified compounds may be routed to inapplicable repositories or miss relevant matches.
  • Each external repository uses different identifier schemes, naming conventions, and metadata formats; normalization may lose fine-grained information or introduce collation errors.
  • No changelog found in the MassSpecBlocks project; versioning and breaking changes to external API endpoints may not be tracked.

Evidence

  • [intro] MassSpecBlocks enables users to find chemical structures across multiple external repositories including PubChem, ChemSpider, Norine, ChEBI, COCONUT, and NP Atlas through integrated lookups.: "find structures on other chemical projects like Pubchem, ChemSpider, Norine, ChEBI, COCONUT and NP Atlas"
  • [other] Parse input SMILES string and validate structure format. Apply conditional routing logic to determine which repositories are applicable for query (based on structure properties or repository scope). Dispatch parallel or sequential queries to external APIs using their respective lookup endpoints.: "Parse input SMILES string and validate structure format. 2. Apply conditional routing logic to determine which repositories are applicable for query (based on structure properties or repository"
  • [other] Collect and normalize match records from each repository response, extracting compound identifiers, names, and metadata. Consolidate results into a unified output table with per-repository match status and details.: "Collect and normalize match records from each repository response, extracting compound identifiers, names, and metadata. 5. Consolidate results into a unified output table with per-repository match"
  • [readme] Backend is written in PHP with Symfony framework, used to implement API orchestration and conditional routing logic.: "Backend is written in PHP with Symfony framework"
  • [readme] Application uses SmilesDrawer library to validate and parse chemical structures from SMILES format.: "Application uses many other libraries like SmilesDrawer from Daniel Probst to draw chemical structures from SMILES format"

Keep looking

Skills are one crate of 328,083. 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.