Skip to content
Back to skills

Tools Workflows

ASecurity

"Use Squidpy tool-layer workflows for sliding windows,

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
datapythonapi

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill tools-workflows --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tools Workflows?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tools Workflows
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-tools-workflows/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-tools-workflows)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tools-workflows
description: "Use Squidpy tool-layer workflows for sliding windows,
  distance-to-anchor design matrices, and plotting handoffs."
disable-model-invocation: true
metadata:
  disco-role: operating
license: BSD 3-Clause
---

# Tools Workflows

Use this sub-skill when a Squidpy task needs `squidpy.tl` helper workflows for spatial windows or distance-to-anchor design matrices. Keep plotting details routed to `visualization` once the design matrix exists.

## Use This For

- Assigning observations to spatial windows with `sq.tl.sliding_window`.
- Building normalized distance-to-anchor design matrices with `sq.tl.var_by_distance`.
- Preserving library, donor, batch, or other covariates in design matrices for downstream models and plots.
- Handing a valid design matrix to `sq.pl.var_by_distance` without duplicating plot-formatting guidance.

## Route Elsewhere

- Use `datasets-and-io` for AnnData/SpatialData structure, coordinate validation, readers, and missing metadata repair.
- Use `graph-analysis` for spatial neighbor graphs, graph statistics, ligand-receptor, Ripley, Moran/Geary, Sepal, niche, or graph masking workflows.
- Use `visualization` for `sq.pl.var_by_distance` layout, palettes, axes, saving, or other plot-formatting choices after `adata.obsm[design_matrix_key]` is valid.
- Use `image-analysis` or `experimental-imaging` for image containers, segmentation, tissue tiling, QC, staining, or SpatialData image workflows.

## Start Here

1. Read `references/tools-workflows.md` for workflow recipes and output checks.
2. Read `references/api-reference.md` for focused signatures, parameters, and storage keys.
3. Read `references/troubleshooting.md` for coordinate columns, anchors, libraries, covariates, partial windows, and plot handoff failures.
4. Run `scripts/var_by_distance_smoke.py --help` to inspect the bundled no-download smoke check, then run it with `--quiet` for a compact installation/API check.

## Minimal Pattern

```python
import squidpy as sq

sq.tl.sliding_window(
    adata,
    window_size=100,
    overlap=0,
    coord_columns=("globalX", "globalY"),
    sliding_window_key="sliding_window_assignment",
)

sq.tl.var_by_distance(
    adata,
    groups="Tumor",
    cluster_key="cell_type",
    library_key="sample",
    covariates="donor",
    design_matrix_key="design_matrix",
)

sq.pl.var_by_distance(
    adata,
    var="GeneA",
    anchor_key="Tumor",
    design_matrix_key="design_matrix",
    covariate="donor",
)
```

Confirm storage keys before downstream use: `sliding_window` writes columns to `adata.obs` when `copy=False`, and `var_by_distance` writes a pandas design matrix to `adata.obsm[design_matrix_key]` when `copy=False`.

Files in this skill

  • SKILL.md2.7 KB
  • references/api-reference.md5.3 KB
  • references/tools-workflows.md6.3 KB
  • references/troubleshooting.md6.7 KB
  • scripts/var_by_distance_smoke.py6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.