microsoft/deterministic-scripts
Deterministic script execution skill for HASTE. Execute scripts instead of free-form LLM behavior for consistent, repeatable operations. Use when: 'run preprocessing', 'convert format', 'parse metadata', 'generate tiles', 'build wheel', 'deploy functions'. Prevents hallucinated scripts.
npx skills add https://github.com/microsoft/haste --skill deterministic-scripts
HASTE has established scripts and commands for common operations. Agents must use these exact commands instead of generating free-form alternatives. This prevents hallucinated scripts, ensures consistency, and makes operations repeatable.
| Operation | Exact Command | Notes |
|-----------|--------------|-------|
| Build core wheel | cd hastelib && hatch build -t wheel | Auto-increments version, copies to func apps |
| Run Python tests | cd hastelib && hatch run test:pytest | Uses conda env with GDAL |
| Build UI | cd ui && npm run build | Production build via Vite |
| Lint UI | cd ui && npm run lint | ESLint with React rules |
| Install UI deps | cd ui && npm install | Uses package-lock.json |
| Create conda env | conda env create -f env.yml | Full env with GDAL and dependencies |
| Update conda env | conda env update -f env.yml | Preserves existing packages |
| Install hastelib editable | pip install -e hastelib/ | For local development hot-reload |
| Operation | Exact Command | Notes |
|-----------|--------------|-------|
| Start API locally | cd api/hastefuncapi && func host start | Requires .venv or conda env |
| Start UI locally | cd ui && swa start --app-devserver-url http://localhost:5173 --run 'npm run dev' | SWA CLI with Vite dev server |
| Start Azurite | azurite --silent --location ./data --debug ./data/debug.log | Local Azure Storage emulator |
| Start Docker stack | docker-compose -f docker/docker-compose.yml up | Full local stack |
| Operation | Exact Command | Notes |
|-----------|--------------|-------|
| Deploy Azure Function | func azure functionapp publish <NAME> --subscription <SUB> --tenant <TENANT> | After hatch build |
| Deploy SWA | cd ui && swa deploy --app-location ./dist --app-name <NAME> | After npm run build |
| Build Docker images | ./build_and_push_images.sh | Builds training + imagery prep images |
| Operation | Approach | Notes |
|-----------|----------|-------|
| COG generation | Use rasterio with COG driver profile | Never use raw GDAL CLI unless wrapping in Python |
| Tile generation | Through ImageryPreProcessor | Not manual gdal2tiles |
| Reprojection | rasterio.warp.reproject() | Always specify src_crs and dst_crs |
| Format conversion | Through provider-specific adapter | Not generic gdal_translate |
| Situation | Do This | NOT This |
|-----------|---------|----------|
| Need to run tests | hatch run test:pytest | pytest (wrong env) |
| Need to build wheel | hatch build -t wheel | python setup.py bdist_wheel |
| Need to start API | func host start | python function_app.py |
| Need Azure storage locally | azurite | Custom mock storage |
| Need to process imagery | Use ImageryPreProcessor | Write new GDAL script |
| Need to deploy | func azure functionapp publish | Manual zip deployment |
hatch run test:pytest to get the correct conda envnpm start — HASTE uses swa start with Vite dev serverpython setup.py — HASTE uses hatch/hatchling, not setuptoolsTake microsoft/deterministic-scripts from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pip, npm.
Without those the skill loads but fails at the first command.