Psytar Query logo

Psytar Query

Community
QSong-github
psytar-query

Query the PsyTAR psychiatric adverse-reaction corpus. Use when the user asks about patient-reported ADRs, withdrawal symptoms, drug indications, or effectiveness for Zoloft, Lexapro, Cymbalta, or Effexor XR. Accepts drug names (brand or generic), symptom terms, or UMLS CUIs.

Overview

PublisherQSong-github
RepositoryDrugClaw
Skill namepsytar-query
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 Psytar Query 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/drug_nlp/psytar
  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/drug_nlp/psytar .claude/skills/psytar-query
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Psytar Query 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 Psytar Query 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 Psytar Query 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.

PsyTAR Query Skill

891 patient reviews → 6 009 annotated sentences → extracted ADR / WD / SSI / DI entities → mapped to 918 UMLS + 755 SNOMED CT concepts.

Entity Detection & Routing

Input PatternDetected AsTargets
C0917801UMLS CUI*_Mapped sheets only (UMLS1/UMLS2 cols)
Zoloft / sertralineDrug namedrug_id or drug columns (alias-aware)
nausea, insomnia …Free textsubstring across all cell values

Generic ↔ brand aliases: sertraline↔Zoloft, escitalopram↔Lexapro, duloxetine↔Cymbalta, venlafaxine↔Effexor.

API

FunctionInputReturns
search(entity, sheet?, label?)single string{sheet: [row_dict]}
search_batch(entities, sheet?, label?)list of strings{entity: {sheet: [row_dict]}}
summarize(results, entity)result dict + labelcompact text
to_json(results)result dictlist[dict] (flat, adds _sheet)
describe()—dataset overview text

Parameters

  • sheet — restrict to one sheet (fuzzy-matched: "ADR" → ADR_Identified).
  • label — when on Sentence_Labeling, keep only rows where the named label column (ADR / WD / EF / INF / SSI / DI) equals 1.

Sheet Schema

SheetDescriptionKey Columns
SampleOriginal postsdrug_id, rating, indication, side-effect, comment, gender, age, duration
Sentence_Labeling6 009 sentences, binary labelsdrug_id, sentence_index, sentences, ADR, WD, EF, INF, SSI, DI, Findings, others, rating, category
ADR_IdentifiedExtracted ADR mentionsdrug_id, sentence_index, sentences, ADR1 … ADRn
WD_IdentifiedExtracted WD mentionsdrug_id, sentence_index, sentences, WD1 … WDn
SSI_IdentifiedExtracted SSI mentionsdrug_id, sentence_index, sentences, SSI1 … SSIn
DI_IdentifiedExtracted DI mentionsdrug_id, sentence_index, sentences, DI1 … DIn
ADR_MappedADR → UMLS/SNOMEDdrug_id, sentence_index, ADR/ADRs, UMLS1, UMLS2, SNOMED-CT, mild, moderate, severe, persistent, not-persistent, body-site, rating, drug, class, type, entity_type
WD_MappedWD → UMLS/SNOMED(same structure as ADR_Mapped)
SSI_MappedSSI → UMLS/SNOMED(same structure)
DI_MappedDI → UMLS/SNOMED(same structure)

Mapped-sheet qualifier columns

mild, moderate, severe — severity descriptors; persistent, not-persistent — duration; body-site — anatomical site; entity_type — Cognitive / Physiological / Psychological / Functional.

Usage

python
from importlib.machinery import SourceFileLoader
m = SourceFileLoader("psytar", "36_PSYTAR.py").load_module()

# overview
print(m.describe())

# drug → ADR mappings
res = m.search("Zoloft", sheet="ADR_Mapped")
print(m.summarize(res, "Zoloft"))

# generic name works too
res = m.search("sertraline", sheet="ADR_Mapped")

# symptom in one Identified sheet
res = m.search("nausea", sheet="ADR_Identified")

# symptom across all sheets
res = m.search("insomnia")

# UMLS CUI (auto-scoped to Mapped sheets)
res = m.search("C0917801")

# withdrawal sentences for Effexor
res = m.search("Effexor", sheet="Sentence_Labeling", label="WD")

# batch
batch = m.search_batch(["Lexapro", "insomnia", "C0917801"])

# JSON for pipeline
flat = m.to_json(m.search("Cymbalta"))

Data Source

  • Corpus: PsyTAR v1.0 — CC BY 4.0
  • File: PsyTAR_dataset.xlsx — set via DATA_PATH or env PSYTAR_XLSX
  • Paper: Zolnoori et al., Data in Brief 24, 103838 (2019). https://doi.org/10.1016/j.dib.2019.103838
  • Stats: 891 reviews, 6 009 sentences, 4 813 ADR + 590 WD + 1 219 SSI
    • 792 DI mentions, 918 UMLS / 755 SNOMED concepts

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

Query the PsyTAR psychiatric adverse-reaction corpus. Use when the user asks about patient-reported ADRs, withdrawal symptoms, drug indications, or effectiveness for Zoloft, Lexapro, Cymbalta, or Effexor XR. Accepts drug names (brand or generic), symptom terms, or UMLS CUIs.

Why use Psytar Query on TypingMind?

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

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

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 Psytar Query?

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

Is the Psytar Query 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 👇