Generative Design logo

Generative Design

Organization
K-Dense-AI
generative-design

Generate and optimise novel small molecules with REINVENT 4 — de novo sampling from a chemical language model, scaffold decoration with LibInvent, fragment linking with LinkInvent, and similarity-constrained analogue generation with Mol2Mol. Use this skill to set up reinforcement-learning or curriculum runs, compose a multi-parameter scoring function from docking scores, predictive models, and physicochemical desirability, and read the resulting sampled sets. Also trigger on REINVENT, LibInvent, LinkInvent, Mol2Mol, scaffold hopping, R-group replacement, linker design, chemical language model, or reinforcement-learning molecule optimisation.

Overview

PublisherK-Dense-AI
Repositorydrug-discovery-agent-skills
Skill namegenerative-design
Stars
51
Forks
5
Bundled files
6
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 6 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by K-Dense-AI on GitHub. Read the source before you install it.

Installation

Install the Generative Design AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/K-Dense-AI/drug-discovery-agent-skills/tree/main/skills/generative-design
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/K-Dense-AI/drug-discovery-agent-skills.git /tmp/drug-discovery-agent-skills
mkdir -p .claude/skills
cp -r /tmp/drug-discovery-agent-skills/skills/generative-design .claude/skills/generative-design
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Generative Design in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Generative Design on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Generative Design is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Generative Molecular Design

The Design half of design-make-test-analyse. REINVENT 4 turns a scoring function into molecules — de novo, or by decorating a scaffold, linking two fragments, or transforming a known active. It is the most capable open-source generative framework in medicinal chemistry, and it will optimise exactly what you ask for, including the parts you did not mean.

Tool: REINVENT 4 v4.8, Apache-2.0. Not on PyPI — git clone and pip install -e .. Priors ship with the repository. An NVIDIA GPU is effectively required for reinforcement learning. Checked against: v4.8, June 2026.

Read references/reinvent-configuration.md before writing a run file, references/scoring-functions.md before defining an objective, and references/evaluating-generated-molecules.md before believing the output — that one is judgement, not syntax.

The three scripts

ScriptAnswers
reinvent_config.pyWhich generator, which prior, and what does the run file look like?
scoring_profile.pyWhat am I actually asking the model to optimise?
parse_run.pyDid the run produce distinct, useful molecules — or one scaffold a thousand times?

The scoring function is the experiment

The model does not know what you meant. Everything it produces is a literal consequence of the objective, and unbounded rewards get exploited without exception:

RewardWhat the agent returns
logP, unboundedlong greasy alkyl chains
molecular weight upward900 Da molecules that satisfy nothing else
similarity to one referencethe reference, regenerated forever
a docking scoremolecules exploiting that scoring function's blind spots

So every numeric component gets a window, not a direction. Most properties have a desirable range — molecular weight should be 250–500, not "as low as possible" — which is what double_sigmoid is for. A reverse_sigmoid on molecular weight optimises toward methane.

bash
python skills/generative-design/scripts/scoring_profile.py profile --objective cns
toml
[stage.scoring]
type = "geometric_mean"

[[stage.scoring.component]]
[stage.scoring.component.MolecularWeight]
[[stage.scoring.component.MolecularWeight.endpoint]]
name = "MolecularWeight"
weight = 0.15
transform.type = "double_sigmoid"
transform.high = 380.0
transform.low = 200.0

Geometric mean, not arithmetic, wherever a component is a requirement rather than a preference: a single zero zeroes the total, which is exactly what you want from custom_alerts. Without that alerts component the agent rediscovers reactive and PAINS-like chemistry, because those substructures score well on everything else.

Four generators, and matching the input to the prior

bash
python skills/generative-design/scripts/reinvent_config.py generators
GeneratorInputJob
Reinventnonede novo from scratch
LibInventscaffold with [*]decorate a core with R-groups
LinkInventtwo warheads, one [*] eachdesign a linker
Mol2Molstarting SMILESanalogues, at a similarity set by the prior

Attachment points are mandatory and the script refuses without them:

$ reinvent_config.py staged --generator libinvent --scaffold "c1ccccc1"
error: the scaffold has no [*] attachment point. LibInvent decorates at [*];
without one there is nothing to decorate.

sampling ignores the scoring function entirely — it draws from the prior. If a run seems to ignore its objective, check run_type before anything else. Optimisation is staged_learning.

Mol2Mol's choice of prior is the novelty dial: mol2mol_similarity gives conservative analogues, mol2mol_scaffold_generic hops aggressively. There is no separate setting.

Mode collapse looks exactly like success

The default failure. The agent finds one scaffold that scores well and decorates it forever; the score curve rises smoothly and the run looks like it worked.

bash
python skills/generative-design/scripts/parse_run.py summary --csv run_1.csv
# 60 rows -> 60 distinct (0 duplicates)
# MODE COLLAPSE: only 2 ring systems across 60 molecules (3.3%). The agent has
# found one core it can decorate. Add a diversity filter, lower sigma, or shorten the run.

The score column cannot show this; the scaffold count can. Always set a diversity filter — without one, having found something that scores well, decorating it is the cheapest way to keep scoring well.

sigma is the other dial: too high and the agent collapses onto degenerate high scorers, too low and it barely moves from the prior. If output stops looking like chemistry, lower sigma first.

Four ways generative runs mislead

  1. Nothing in the default objective knows what can be made. The harder you optimise, the further into unsynthesisable space the agent goes. Add an SA-score component, and check the output with retrosynthesis.
  2. Validating with the scoring function is circular. If a docking score was in the objective, the output scores well on it by construction. Assess with something the optimiser never saw.
  3. Novelty is not automatically good. A molecule absent from ChEMBL may be absent because nobody wanted it.
  4. Uniqueness is far below the generated count. "50 000 generated" is usually a few thousand distinct.

When to stop and look

Fifty structures, by eye, will reveal a reward hack that no metric does. Absurdity is not a computable property, and this step is not optional.

Composing with the rest of the bundle

  • chembl → before: actives to seed Mol2Mol or to fit a potency model for the objective.
  • binding-site-analysis → before: is there a pocket worth designing into?
  • medchem → after: alerts and PAINS on the output, as a check on the alerts component.
  • retrosynthesis → after: can any of these actually be made?
  • admet-prediction → after: developability across the survivors.
  • autodock-vina / free-energy-perturbation → after: an orthogonal score the agent never saw.

Reporting results honestly

Give the number generated, distinct, and distinct-by-scaffold — not just the first. Quote the scoring function in full, because the output is a function of it, and say whether a diversity filter was used. Confirm that any post-hoc assessment used a method absent from the objective. And report how many molecules a human actually looked at.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Generative Design AI skill do?

Generate and optimise novel small molecules with REINVENT 4 — de novo sampling from a chemical language model, scaffold decoration with LibInvent, fragment linking with LinkInvent, and similarity-constrained analogue generation with Mol2Mol. Use this skill to set up reinforcement-learning or curriculum runs, compose a multi-parameter scoring function from docking scores, predictive models, and physicochemical desirability, and read the resulting sampled sets. Also trigger on REINVENT, LibInvent, LinkInvent, Mol2Mol, scaffold hopping, R-group replacement, linker design, chemical language mod...

Why use Generative Design on TypingMind?

Because you install it once and use it with any model. Generative Design is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Generative Design in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/K-Dense-AI/drug-discovery-agent-skills/tree/main/skills/generative-design. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Generative Design?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Generative Design?

As many as you like. As long as a model supports skills, you can use Generative Design with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Generative Design AI skill free?

Yes. It is published on GitHub by K-Dense-AI under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇