Claw Semantic Sim logo

Claw Semantic Sim

OrganizationPopular
ClawBio
claw-semantic-sim

Semantic Similarity Index for disease research literature using PubMedBERT embeddings

Overview

PublisherClawBio
RepositoryClawBio
Skill nameclaw-semantic-sim
Stars
1.2K
Forks
280
Bundled files
Instructions only
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.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by ClawBio on GitHub. Read the source before you install it.

Installation

Install the Claw Semantic Sim 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/ClawBio/ClawBio/tree/main/skills/claw-semantic-sim
  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/ClawBio/ClawBio.git /tmp/ClawBio
mkdir -p .claude/skills
cp -r /tmp/ClawBio/skills/claw-semantic-sim .claude/skills/claw-semantic-sim
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Claw Semantic Sim 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 Claw Semantic Sim 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 Claw Semantic Sim 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.

🦖 Semantic Similarity Index

Measure how isolated or connected disease research is across the global biomedical literature, using PubMedBERT embeddings on PubMed abstracts spanning 175 GBD diseases.

What it does

  1. Takes a disease list (GBD taxonomy) as input
  2. Retrieves PubMed abstracts (2000-2025) for each disease with quality filtering
  3. Generates 768-dimensional PubMedBERT embeddings for every abstract
  4. Computes four semantic equity metrics per disease:
    • Semantic Isolation Index (SII): average cosine distance to k-nearest disease neighbours; higher = more isolated, less connected research
    • Knowledge Transfer Potential (KTP): cross-disease centroid similarity; higher = more potential for research spillover
    • Research Clustering Coefficient (RCC): within-disease embedding variance; higher = more diverse research approaches
    • Temporal Semantic Drift: cosine distance between yearly centroids; measures how research focus evolves
  5. Generates publication-quality multi-panel figures:
    • Panel A: Semantic isolation by disease category (boxplot)
    • Panel B: Top 20 most semantically isolated diseases (bar chart, NTD/Global South colour-coded)
    • Panel C: Semantic isolation vs research volume (scatter with regression)
    • Panel D: NTD vs non-NTD significance test (Welch's t-test, Cohen's d)
  6. Produces a markdown report with all metrics, rankings, and reproducibility bundle

Why this exists

If you ask ChatGPT to "measure research neglect for diseases," it will:

  • Not know which embedding model to use for biomedical text
  • Hallucinate metrics that sound plausible but have no methodological grounding
  • Skip quality filtering (year coverage, abstract coverage, minimum papers)
  • Not handle MPS acceleration or checkpointed batch processing
  • Produce a single scatter plot with no disease classification

This skill encodes the correct methodological decisions:

  • Uses PubMedBERT (the gold-standard biomedical language model)
  • Fetches from PubMed with exponential backoff and NCBI rate limiting
  • Quality filters: year coverage >= 70%, abstract coverage >= 95%, minimum 50 papers
  • Batch embedding with Apple MPS acceleration and CPU fallback
  • Checkpointed processing (resume after interruption)
  • HDF5 storage with gzip compression and SHA-256 checksums
  • Classification against WHO NTD list and Global South priority diseases
  • Statistical significance testing (Welch's t-test, Cohen's d)

Key Finding

Neglected tropical diseases (NTDs) are significantly more semantically isolated than other conditions (P < 0.001, Cohen's d = 0.8+). They exist in knowledge silos with limited cross-disciplinary research bridges. The 25 most isolated diseases are disproportionately Global South priority conditions.

Pipeline

05-00-heim-sem-setup.py     # Validate environment, create directories
05-01-heim-sem-fetch.py     # Retrieve PubMed abstracts (checkpointed)
05-02-heim-sem-embed.py     # Generate PubMedBERT embeddings (MPS/CPU)
05-03-heim-sem-compute.py   # Compute SII, KTP, RCC, temporal drift
05-04-heim-sem-figures.py   # Generate publication figures
05-05-heim-sem-integrate.py # Merge with biobank + clinical trial dimensions

Status

Not yet implemented. semantic_sim.py and the 05-00..05-05 pipeline scripts described above are not present in this repository yet; there is no runnable demo.

Example Output

Semantic Similarity Index
=========================
Diseases analysed: 175
Total PubMed abstracts: 13,100,000
Embedding model: PubMedBERT (768-dim)

Metric Ranges:
  SII: 0.0412 - 0.1893
  KTP: 0.6234 - 0.9187
  RCC: 0.0891 - 0.3421

Key Finding:
  NTDs show +38% higher semantic isolation
  P < 0.0001, Cohen's d = 0.84
  14/25 most isolated diseases are Global South priority

Figures saved to: demo_report/
  Fig5_Semantic_Structure.png (300 dpi)
  Fig5_Semantic_Structure.pdf (vector)

Reproducibility:
  commands.sh | environment.yml | checksums.sha256

Interpretation Guide

  • High SII: Disease research exists in a knowledge silo; limited cross-disciplinary bridges
  • Low KTP: Research on this disease has few methodological overlaps with others
  • High RCC: Diverse research approaches within the disease (many subtopics)
  • High Temporal Drift: Research focus has shifted significantly over time
  • NTDs shown in red, Global South diseases in orange, others in grey
  • The scatter plot (Panel C) reveals the inverse relationship between research volume and isolation

Citation

If you use this skill in a publication, please cite:

  • Corpas, M. et al. (2026). HEIM: Health Equity Index for Measuring structural bias in biomedical research. Under review.
  • Corpas, M. (2026). ClawBio. https://github.com/ClawBio/ClawBio

Frequently asked questions

What does the Claw Semantic Sim AI skill do?

Semantic Similarity Index for disease research literature using PubMedBERT embeddings

Why use Claw Semantic Sim on TypingMind?

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

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ClawBio/ClawBio/tree/main/skills/claw-semantic-sim. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Claw Semantic Sim?

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 Claw Semantic Sim?

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

Is the Claw Semantic Sim AI skill free?

Yes. It is published on GitHub by ClawBio 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 👇