# Compute Env Setup

Prepare reproducible setup instructions and validate a user-managed named software...

- Repository: https://github.com/aipoch/open-science (5414 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add aipoch/open-science --skill compute-env-setup -g -a claude-code -y`
Codex: `npx skills add aipoch/open-science --skill compute-env-setup -g -a codex -y`
Cursor: `npx skills add aipoch/open-science --skill compute-env-setup -g -a cursor -y`
Gemini CLI: `npx skills add aipoch/open-science --skill compute-env-setup -g -a gemini-cli -y`

## Description

Prepare reproducible setup instructions and validate a user-managed named software environment on an Open-Science SSH Compute Host, including direct SSH and Slurm hosts. Use when a remote job needs packages, modules, cache variables, or a repeatable activation that the host does not already provide.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Compute environment setup

Prepare one reproducible environment definition and instructions for one small user-managed host
activation file. Open-Science resolves `submitJob(..., { environment: '<name>' })` by sourcing
`~/.open-science/environments/<name>.sh` before the workload. Existing `~/.openscience/environments/<name>.sh` definitions remain readable in place. Before creating an activation, check both names: update the existing definition at its exact location; if both exist, ask the user which to retain. Never create a second activation just to rename the brand. The file contains activation only; it
does not install packages when a job starts.

Software environment setup and Slurm accounting service configuration are separate concerns.
An unavailable `sacct` service is not evidence that Python, Conda, modules, or the named activation
file are missing. Use the Remote Compute Skill's Slurm troubleshooting reference for scheduler
status and cancellation problems; do not make enabling accounting the only recovery path or assume
the user has administrator privileges.

The environment, package caches, images, and activation file are user-managed durable resources,
not Open-Science-owned components. This Skill may inspect them and prepare exact setup/removal
commands, but must not execute commands that create, replace, or remove those resources. The user
or host administrator runs those commands outside Open-Science and owns their lifecycle. Do not
interpret the `~/.openscience` path as app ownership.

Use `host.compute` only in `repl_execute` JavaScript. Python and R data kernels do not expose it.
Start from the Session catalog and do not guess a provider id:

```javascript
const hosts = await host.compute.listHosts()
const selected = hosts.filter((candidate) => candidate.role === 'selected')
const candidates = selected.length > 0 ? selected : hosts
```

The rest: https://github.com/aipoch/open-science/blob/HEAD/resources/skills/compute-env-setup/SKILL.md
