TTD logo

TTD

Community
QSong-github
TTD

Query the Therapeutic Target Database (TTD) for drug-target-disease interaction data. Use this skill when the user asks about therapeutic targets, drugs, diseases, or their relationships — including target-drug mappings, clinical status of drugs, disease indications, UniProt/gene associations, and pathway annotations. Triggers on queries like "what drugs target EGFR", "which diseases is Imatinib used for", "find targets for lung cancer", or any lookup involving TTD IDs, gene symbols, drug names, or disease names.

Overview

PublisherQSong-github
RepositoryDrugClaw
Skill nameTTD
Stars
118
Forks
3
Bundled files
4
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.

  • 4 bundled files

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

  • Open source

    Published by QSong-github on GitHub. Read the source before you install it.

Installation

Install the TTD 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/QSong-github/DrugClaw/tree/main/skills/dti/ttd
  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/QSong-github/DrugClaw.git /tmp/DrugClaw
mkdir -p .claude/skills
cp -r /tmp/DrugClaw/skills/dti/ttd .claude/skills/TTD
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable TTD 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 TTD 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 TTD 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.

TTD — Therapeutic Target Database

Source: https://ttd.idrblab.cn/
Paper: https://academic.oup.com/nar/article/52/D1/D1465/7275004
Data dir: resources_metadata/dti/TTD

Data files (4 required)

FileContent
P1-01-TTD_target_download.txtTarget info: name, UniProt, gene, type, function, disease indication, pathway
P2-01-TTD_target_drug.txtTarget ↔ Drug links with clinical status (Approved / Phase I–III / Experimental)
P1-06-Target_disease.txtTarget ↔ Disease associations
P1-07-Drug_disease.txtDrug ↔ Disease associations

File formats:

  • P1-01, P2-01 — block format: blank-line separated records, each line <ID>\t<KEY>\t<VALUE>
  • P1-06, P1-07 — TSV with header row

Query API

query(entities, entity_type="auto", data_dir=DATA_DIR)

Returns a list of dicts, one per queried entity.

ParameterTypeDescription
entitiesstr or list[str]One or more entity names / IDs
entity_type"auto" / "target" / "drug" / "disease"Restrict search; "auto" tries target → drug → disease
data_dirstrPath to TTD data directory

query_json(entities, ...) → str

Same as query() but returns a JSON string. Use for LLM consumption.


Input formats accepted

InputExamples
Gene / protein name"EGFR", "TP53", "BCR-ABL"
Drug name"Imatinib", "Gefitinib", "Osimertinib"
Disease name"Lung cancer", "Diabetes mellitus" (partial match supported)
TTD Target ID"TTDTARGET00001"
TTD Drug ID"D0Y4GH"

Matching is case-insensitive; disease names support partial matching.


Output structure

Target result

json
{
  "query": "EGFR",
  "entity_type": "target",
  "ttd_id": "TTDTARGET00001",
  "name": "Epidermal growth factor receptor",
  "uniprot": "P00533",
  "gene": "EGFR",
  "target_type": "Successful target",
  "function": "Receptor tyrosine kinase...",
  "disease": "Non-small-cell lung cancer [ICD-11: 2C25]",
  "pathway": "EGFR signaling pathway",
  "drugs": [
    {"drug_id": "D0Y4GH", "drug_name": "Gefitinib", "clinical_status": "Approved"},
    {"drug_id": "D08VGC", "drug_name": "Erlotinib", "clinical_status": "Approved"}
  ]
}

Drug result

json
{
  "query": "Imatinib",
  "entity_type": "drug",
  "drug_id": "D0IQX1",
  "drug_name": "Imatinib",
  "targets": [
    {"ttd_target_id": "TTDTARGET00002", "target_name": "BCR-ABL",
     "clinical_status": "Approved", "drug_id": "D0IQX1"}
  ],
  "diseases": ["Chronic myelogenous leukemia", "Gastrointestinal stromal tumor"]
}

Disease result

json
{
  "query": "Lung cancer",
  "entity_type": "disease",
  "disease_name": "non-small-cell lung cancer",
  "targets": [
    {"ttd_target_id": "TTDTARGET00001", "target_name": "EGFR"}
  ],
  "drugs": ["Gefitinib", "Osimertinib", "Erlotinib"]
}

Not found

json
{"query": "XYZ123", "entity_type": "not_found", "message": "No match found in TTD."}

Usage examples

python
from 17_TTD import query, query_json

# Single entity
results = query("EGFR")

# Multiple entities (mixed types — auto-detected)
results = query(["EGFR", "Imatinib", "Lung cancer"])

# Restrict to drug search only
results = query(["Gefitinib", "Osimertinib"], entity_type="drug")

# JSON string output (for LLM)
print(query_json("TP53"))

CLI (demo runs with EGFR / Imatinib / Lung cancer if no args):

bash
python 17_TTD.py EGFR Imatinib "Lung cancer"
python 17_TTD.py TTDTARGET00001

Notes

  • entity_type="auto" stops at the first match type per entity (target → drug → disease). Use explicit type to resolve ambiguity.
  • drugs in target results lists all TTD-linked drugs; filter clinical_status == "Approved" for marketed drugs.
  • Disease partial matching — "lung cancer" will match "non-small-cell lung cancer". The first candidate is returned; use entity_type="disease" with a more specific name if needed.
  • Multi-value fields (e.g. multiple pathways for one target) are returned as lists.

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 TTD AI skill do?

Query the Therapeutic Target Database (TTD) for drug-target-disease interaction data. Use this skill when the user asks about therapeutic targets, drugs, diseases, or their relationships — including target-drug mappings, clinical status of drugs, disease indications, UniProt/gene associations, and pathway annotations. Triggers on queries like "what drugs target EGFR", "which diseases is Imatinib used for", "find targets for lung cancer", or any lookup involving TTD IDs, gene symbols, drug names, or disease names.

Why use TTD on TypingMind?

Because you install it once and use it with any model. TTD 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 TTD in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/QSong-github/DrugClaw/tree/main/skills/dti/ttd. 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 TTD?

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 TTD?

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

Is the TTD AI skill free?

It is published on GitHub by QSong-github. Check the repository for licensing terms. 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 👇