Steps
- Ask what to profile. Suggest common patterns for this repo:
import spatialdata
from spatialdata import SpatialData
from spatialdata_io import xenium
- Run:
profimp --html "<import_stmt>" > /tmp/profimp.html
- 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.
Use this skill with your AI agent:
Open on Skill Issue to copy, download, or add to your library.
Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.