custom-component

custom-component is a skill for Claude Code from pregHosh/Solitarius-mcp. It costs 38 tokens per session (1,386 once invoked), scanned A, original, Apache-2.0.

A workflow for writing a custom REINVENT4 scoring component as a Python plugin. A scoring component measures how well generated molecules meet a chosen property or rule.

In plain words
What is it for?
Adding scores based on a QSAR model, RDKit properties, raw SMILES, molecular objects, filters, penalties, or other user-defined calculations.
Why use it?
It provides a way to use a scoring method that is not included among REINVENT4’s built-in components. The workflow gathers the required inputs and places the plugin where REINVENT4 can discover it.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: positional $N argument.

Part of the solitarius-mcp plugin — 7 skills, 1 MCP server shipped together

Good fit Adding scores based on a QSAR model, RDKit properties, raw SMILES, molecular objects, filters, penalties, or other user-defined calculations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/preghosh/solitarius-mcp/custom-component
Install

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.

Any agent
npx skills add pregHosh/Solitarius-mcp --skill custom-component
Clone the repo
git clone --depth 1 https://github.com/pregHosh/Solitarius-mcp

Made for: Claude Code.

Or install solitarius-mcp, the plugin that ships this one along with the rest of its 7 skills, 1 MCP server.

Wrote 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.

agentmods badge for custom-component

README.md
[![agentmods](https://agentmods.dev/badge/skills/preghosh/solitarius-mcp/custom-component.svg)](https://agentmods.dev/skills/preghosh/solitarius-mcp/custom-component)
Your own site
<a href="https://agentmods.dev/skills/preghosh/solitarius-mcp/custom-component"><img src="https://agentmods.dev/badge/skills/preghosh/solitarius-mcp/custom-component.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,386 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.01386
Opus 5 $0.00019 $0.00693
Sonnet 5 $0.00008 $0.00277
Haiku 4.5 $0.00004 $0.00139

Measured 6d ago against content hash 3cd0c5a034f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

custom-component 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 6d 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.

skills/custom-component/SKILL.md · 172 lines

How it starts

The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.

REINVENT4 Custom Scoring Component

Write a comp_*.py plugin file that REINVENT4 discovers at runtime via namespace packages. No MCP server needed — write the file directly with the Write tool.

Workflow — New Component

1. Gather requirements

Ask the user:

  • What does this component score? (e.g., "predict pIC50 using my QSAR model")
  • What configurable inputs does it need? (names, types)
  • RDKit Mol objects or raw SMILES? (molcache vs raw)
  • Standard score, filter, or penalty?
    • __component (default): contributes to the aggregated score
    • filter: zeros the entire stage score if this component returns 0
    • penalty: multiplier on the total score
  • Any external dependencies? (torch, scikit-learn, etc.)

2. Choose the output directory

Default: reinvent_plugins/components/ inside the REINVENT4 package (or a directory on PYTHONPATH). No __init__.py files must exist in reinvent_plugins/ or components/.

# Find the installed reinvent_plugins location:
python -c "import reinvent_plugins; print(reinvent_plugins.__path__)"

If the user has a custom plugins dir, confirm it is on PYTHONPATH:

export PYTHONPATH=/path/to/plugins_parent:$PYTHONPATH

3. Write the plugin file

Use the Write tool to create <components_dir>/comp_<snake_name>.py. File name must start with comp_. Use $0 (PascalCase) for the class name.

Template — with molcache (receives List[Chem.Mol]):

"""comp_<snake_name>.py — <description>"""
from __future__ import annotations
from dataclasses import dataclass
from typing import List

import numpy as np
from rdkit.Chem import Mol

from reinvent_plugins.components.component_results import ComponentResults
from reinvent_plugins.mol_cache import molcache
from reinvent_plugins.normalize import add_tag


@add_tag("__parameters")
@dataclass
class Parameters:
    # Each field must be List[T] — REINVENT4 collects per-endpoint params into lists
    model_path: List[str]      # example: path to a saved model file
    # threshold: List[float]   # add more as needed


@add_tag("__component")   # change to "filter" or "penalty" if needed
class <ClassName>:
    def __init__(self, params: Parameters):
        # Unpack the first endpoint's params (index 0)
        self.model_path = params.model_path[0]
        # Load model once here, e.g.:
        # import joblib
        # self.model = joblib.load(self.model_path)

    @molcache   # remove decorator if use_molcache=False (receives List[str] instead)
    def __call__(self, mols: List[Mol]) -> ComponentResults:
        scores = []
        for mol in mols:
            if mol is None:
                scores.append(np.nan)
                continue
            # --- implement scoring here ---
            # score = self.model.predict([get_fingerprint(mol)])[0]
            score = 0.0   # TODO: replace with real logic
            scores.append(score)
        return ComponentResults([np.array(scores, dtype=float)])

Read the full file on GitHub · 172 lines

Changes

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.

  1. 6d ago First seen · 172 lines · 0 tokens per session scan A 3cd0c5a034f9

Subscribe to this mod's changes

custom-component is a skill published in the GitHub repository pregHosh/Solitarius-mcp (0 stars, last pushed 29d ago), licensed Apache-2.0. It adds 38 tokens to every session and 1,386 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

text-based-molecule-editing

Modify molecules based on natural language descriptions using MolT5/BioT5 models. Use this skill when: (1) User wants to modify a molecule to improve specific properties (solubility, potency, etc.), (2) User provides a molecule and asks to "make it more X" or "improve Y", (3) User wants to generate molecule variants…

PharMolix/OpenBioMed · 128 tokens

biomed-research

Use when answering biomedical research questions that need source-backed evidence from local MCP servers, including gene, disease, drug, variant, phenotype, study, or clinical-trial questions.

nickzren/biomed-agent · 39 tokens

tooluniverse

Access 1000+ scientific tools through ToolUniverse for drug discovery, protein analysis, genomics, literature search, clinical data, ADMET prediction, molecular docking, and more. Use when the user needs biomedical or scientific research capabilities.

AgentTeam-TaichuAI/ScienceClaw · 51 tokens

datamol

Pythonic wrapper around RDKit with simplified interface and sensible defaults. Preferred for standard drug discovery including SMILES parsing, standardization, descriptors, fingerprints, clustering, 3D conformers, parallel processing. Returns native rdkit.Chem.Mol objects. For advanced control or custom parameters…

synthetic-sciences/openscience · 67 tokens

drug-design

End-to-end drug discovery pipeline orchestration. Deterministic Python script that auto-chains structure prediction, pocket detection, de novo design, docking, scoring, and ADMET filtering into reproducible workflows.

synthetic-sciences/openscience · 44 tokens

pocket-detection

Multi-method binding pocket detection and druggability assessment. Grid-based, fpocket, and P2Rank detection with druggability scoring, visualization, and cross-structure comparison.

synthetic-sciences/openscience · 41 tokens