Skip to content
Agentmart
Submit a tool

clam

Use CLAM for weakly supervised computational pathology workflows on whole-slide images, from WSI patching through features, training, evaluation, and heatmaps.

Skill by VectorSpaceLab

IndexedApache-2.0★ 341
Write a review

Chalk Labs

Need help deploying clam?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/vectorspacelab-clam

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use CLAM for weakly supervised computational pathology workflows on whole-slide images, from WSI patching through features, training, evaluation, and heatmaps.

Use cases: presentations

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/clam

What's inside

Skill name
clam
Description
Use CLAM for weakly supervised computational pathology workflows on whole-slide images, from WSI patching through features, training, evaluation, and heatmaps.
License
Apache-2.0
Metadata
disco-role: operating
Instructions
61 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (32)

  • SKILL.md
  • pipeline-overview.md · references/
  • repo-provenance.md · references/
  • repo-routing-metadata.json · references/
  • troubleshooting.md · references/
  • clam_preflight.py · scripts/
  • SKILL.md · sub-skills/feature-extraction/
  • encoder-reference.md · sub-skills/feature-extraction/references/
  • legacy-pipeline.md · sub-skills/feature-extraction/references/
  • troubleshooting.md · sub-skills/feature-extraction/references/
  • workflows.md · sub-skills/feature-extraction/references/
  • clam_feature_command_builder.py · sub-skills/feature-extraction/scripts/
  • SKILL.md · sub-skills/heatmap-visualization/
  • configuration.md · sub-skills/heatmap-visualization/references/
  • troubleshooting.md · sub-skills/heatmap-visualization/references/
  • workflows.md · sub-skills/heatmap-visualization/references/
  • validate_heatmap_config.py · sub-skills/heatmap-visualization/scripts/
  • SKILL.md · sub-skills/training-evaluation/
  • data-formats.md · sub-skills/training-evaluation/references/
  • evaluation-reference.md · sub-skills/training-evaluation/references/
  • model-api.md · sub-skills/training-evaluation/references/
  • training-reference.md · sub-skills/training-evaluation/references/
  • troubleshooting.md · sub-skills/training-evaluation/references/
  • clam_split_recipe.py · sub-skills/training-evaluation/scripts/
  • clam_train_eval_command_builder.py · sub-skills/training-evaluation/scripts/
  • SKILL.md · sub-skills/wsi-preprocessing/
  • legacy-pipeline.md · sub-skills/wsi-preprocessing/references/
  • parameters.md · sub-skills/wsi-preprocessing/references/
  • troubleshooting.md · sub-skills/wsi-preprocessing/references/
  • workflows.md · sub-skills/wsi-preprocessing/references/
  • build_preset_template.py · sub-skills/wsi-preprocessing/scripts/
  • clam_command_builder.py · sub-skills/wsi-preprocessing/scripts/

SKILL.md (first lines)

# CLAM

Use this repo skill when a task involves CLAM: data-efficient, weakly supervised computational pathology on whole-slide images with slide-level labels. CLAM workflows usually move from WSI segmentation and patch coordinates, to feature extraction, to CLAM/MIL training and evaluation, and finally to attention heatmap visualization.

## Route First

- For raw WSIs, tissue masks, patch-coordinate `.h5` files, stitched QC images, process lists, or segmentation presets, read `sub-skills/wsi-preprocessing/SKILL.md`.
- For ResNet50, UNI, or CONCH feature extraction into `h5_files/` and `pt_files/`, read `sub-skills/feature-extraction/SKILL.md`.
- For dataset CSVs, train/validation/test splits, `main.py`, `eval.py`, CLAM_SB/CLAM_MB/MIL choices, checkpoints, or metrics, read `sub-skills/training-evaluation/SKILL.md`.
- For attention heatmaps, `create_heatmaps.py`, YAML/process-list validation, ROI heatmaps, sampled patches, or checkpoint visualization, read `sub-skills/heatmap-visualization/SKILL.md`.
- For install/import, OpenSlide, optional encoder checkpoints, GPU/runtime, or cross-workflow failures, start with `references/troubleshooting.md`.

## Pipeline Order

1. Prepare WSIs with the fast coordinate pipeline: segment tissue, generate `patches/<slide>.h5`, and optionally create masks/stitches for QC.
2. Extract patch features from those coordinate bags and original slides into feature `h5_files/` and `pt_files/`.
3. Prepare dataset CSVs and splits, then train or evaluate CLAM/MIL models against the feature root.
4. Use trained checkpoints plus heatmap YAML configuration to render attention heatmaps and sampled high-attention patches.

## Key CLAM Facts

- CLAM is script-oriented rather than an installable Python package; public workflows run repository scripts such as `create_patches_fp.py`, `extract_features_fp.py`, `main.py`, `eval.py`, and `create_heatmaps.py` from a CLAM working tree or equivalent copy.
- The documented environment targets Python 3.10 with OpenSlide, PyTorch, torchvision, timm, h5py, pandas, PyYAML, OpenCV, matplotlib, scikit-learn, scipy, tqdm, openslide-python, smooth-topk, and tensorboardX.
- `resnet50_trunc` is the default encoder; `uni_v1` needs `UNI_CKPT_PATH`; `conch_v1` needs the CONCH package plus `CONCH_CKPT_PATH`.
- ResNet50 and UNI features use `--embed_dim 1024`; CONCH features use `--embed_dim 512` in training, evaluation, and heatmap configs.
- Heavy native runs can require WSIs, OpenSlide system libraries, GPU memory, pretrained encoder checkpoints, and trained model checkpoints. Use bundled helpers for command/config preflight before launching expensive jobs.

## Public Setup Check

From a CLAM working tree, follow the upstream public setup path:

```bash
conda env create -f env.yml
conda activate clam_latest
```

For optional CONCH feature extraction, also install the upstream CONCH package and set `CONCH_CKPT_PATH`; for UNI, set `UNI_CKPT_PATH` to the downloaded checkpoint. After setup, run this minimal source-tree import check from the CLAM working tree before launching heavy workflows:

```bash
python -c "import torch, openslide, pandas; from models.model_clam import CLAM_SB; from dataset_modules.dataset_generic import Generic_MIL_Dataset; print('CLAM import ok')"
```

## References

- Read `references/pipeline-overview.md` for a concise end-to-end map of CLAM inputs, scripts, outputs, and handoffs between sub-skills.
- Read `references/troubleshooting.md` for cross-cutting install/import, OpenSlide, encoder, data-layout, GPU, and script-working-directory failures.
- Read `references/repo-provenance.md` when deciding whether this skill is stale relative to the source repository.
- `references/repo-routing-metadata.json` is structured metadata used by the managed repo-skills router during import.

## Bundled Scripts

- Run `scripts/clam_preflight.py --help` for a safe, dependency-light checklist that validates expected CLAM workflow paths and reminds agents which sub-skill owns each stage.
- Sub-skills include deeper workflow helpers for preprocessing command generation, preset CSV creation, feature extraction command generation, split/train/eval command generation, and heatmap YAML validation.

## Safety Notes

- Do not tell a future user to rely on this generated skill's source checkout or artifact reports at runtime; use bundled references and scripts.
- Do not run WSI processing, feature extraction, model training, checkpoint evaluation, or heatmap generation without confirming required data, checkpoints, runtime hardware, and output locations.
- Prefer fast dry-run helpers and YAML/CSV validation before launching GPU-heavy or storage-heavy CLAM jobs.

From VectorSpaceLab/AREX-Skill, Apache-2.0.

More from VectorSpaceLab/AREX-Skill

Signals

Stars
341
Forks
26
Open issues
0
Last commit (this folder)
Aug 26, 2026 (2 months ago)
Last release
Sep 2, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from VectorSpaceLab

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get clam running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying clam?

CallGet help
Cite this page

clam skill. Agent Mart. https://agentmart.dev/skills/vectorspacelab-clam (last updated 2026-10-24)