# Profimp

> Profile Python import time using profimp and open a waterfall HTML report. Use when investigating slow startup or wanting to identify which imports are most expensive. Use when this capability is needed.

- Skill: `tomevault-io/profimp` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/profimp`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/profimp/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/profimp

---


## Steps

1. Ask what to profile. Suggest common patterns for this repo:
    - `import spatialdata`
    - `from spatialdata import SpatialData`
    - `from spatialdata_io import xenium`

2. Run:

```bash
profimp --html "<import_stmt>" > /tmp/profimp.html
```

3. Open the report:
    - macOS: `open /tmp/profimp.html`
    - Linux: `xdg-open /tmp/profimp.html`
    - Either: `python -m webbrowser /tmp/profimp.html`

## Notes

- The report is a waterfall chart showing every sub-import and its timing.
- To compare before/after: `cp /tmp/profimp.html /tmp/profimp-before.html` before re-running.
- `pixi run python -m profimp` also works if `profimp` is not on PATH.

---
> Source: [scverse/spatialdata](https://github.com/scverse/spatialdata) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-07-02 -->

