一键导入
setup-o2
Internal init-project subskill for first-time O2/SLURM remote-bridge setup, including bridge installation, permissions, SSH keys, and first connection.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Internal init-project subskill for first-time O2/SLURM remote-bridge setup, including bridge installation, permissions, SSH keys, and first connection.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Planning-centric workflow for substantial work across software, analyses, artifacts, documentation, and configuration. Invoke manually with $work-cycle when alignment matters; not for straightforward one- or two-edit requests.
Create or update developer-facing and agent-facing project documentation, or run module-scoped codebase audits. Invoke manually with $documentation for codebase maps, module documentation, codebase review/audit workflows, and README.md or AGENTS.md work.
Documentation subskill for project hygiene maintenance. Use through $documentation when the user asks to maintain, clean up, health-check, refresh AGENTS.md/notebook/TODOs, inspect git branches/PRs/stashes, or review overall project state. Do not use for codebase audit, codebase review, release-check, or module-scoped bug-finding requests; those belong to module-codebase-review.
Manual-only workflow for codebase audit, codebase review, release-check, paper-freeze-check, and module-scoped multi-agent read-only bug/code-smell audits that produce a prioritized notebook report and TODO-ready findings. Use this instead of maintain-project for requests that ask to audit or review code behavior.
Ergonomic notebook-backed TODO capture for deferred work. Invoke manually with /defer when the user asks to defer, save, park, or add a TODO for later work while preserving the current conversation context.
Initialize a project workspace for Claude Code with project instructions, repository checks, notebook scaffolding, optional remotes, and optional O2/SLURM setup. Invoke manually with /init-project for first-time project setup, notebook bootstrap, project remotes, or O2/SLURM setup.
| name | setup-o2 |
| description | Internal init-project subskill for first-time O2/SLURM remote-bridge setup, including bridge installation, permissions, SSH keys, and first connection. |
| version | 2.4.0 |
Set up remote access to Harvard O2 through remote-bridge. This subskill is for initial setup only. After the bridge is installed, configured, and connected, use the top-level use-o2 skill for job submission, bridge commands, SLURM usage, monitoring, containers, and day-to-day troubleshooting.
remote-bridge.This subskill owns:
remote-bridge CLI.~/.config/remote-bridge/permissions.toml.connection_status.Use use-o2 for:
sandboxed_sbatch.squeue, sacct, job_wait, scancel, or job efficiency.which remote-bridge
remote-bridge --version
remote-bridge rpc o2 connection_status
If connection_status shows "connected": true, setup is complete. Switch to use-o2 for actual work.
If the binary is missing, continue to installation. If the binary exists but the bridge is not running, continue to permissions and SSH validation before first connection.
remote-bridge code and binaries are not bundled with this configuration. Install the public release binary first.
curl -fsSL https://raw.githubusercontent.com/oclb/oconnorlab-agent-config/main/remote-bridge/install.sh | bash
If a specific release is needed, replace vX.Y.Z with the desired release tag:
curl -fsSL https://raw.githubusercontent.com/oclb/oconnorlab-agent-config/main/remote-bridge/install.sh \
| VERSION=vX.Y.Z bash
If no release binary is available for the platform, build from source only after confirming the source repo:
which cargo
cd "<bridge-source>/remote-bridge"
cargo build --release
mkdir -p ~/.local/bin
cp target/release/remote-bridge ~/.local/bin/remote-bridge
Ensure ~/.local/bin is on PATH for the user's shell if needed.
Create the config directory and start from the bridge's example permissions file:
mkdir -p ~/.config/remote-bridge
curl -fsSL https://raw.githubusercontent.com/oclb/oconnorlab-agent-config/main/remote-bridge/config/permissions.example.toml \
-o ~/.config/remote-bridge/permissions.toml
Ask the user for their O2 paths:
/n/data1/..../n/scratch/users/.....sif image path.Edit ~/.config/remote-bridge/permissions.toml so read/write paths match the project. At minimum, configure:
[paths]
read = [
"/n/data1/hms/dbmi/.../project-or-lab",
"/n/scratch/users/.../project"
]
write = [
"/n/scratch/users/.../project"
]
If the project will use sandboxed_sbatch, also configure Singularity defaults:
[singularity]
default_image = "/n/app/containers/users/USERNAME/python-science.sif"
scripts_dir = "/n/scratch/users/u/USERNAME/agent-scripts/"
cache_dir = "/n/scratch/users/u/USERNAME/.singularity/cache"
extra_binds = [
"/n/app:ro",
]
After editing permissions, update the checksum if the installed bridge requires it:
remote-bridge update-checksum
SSH key authentication is required. The bridge reads SSH configuration from ~/.ssh/config.
Ask whether the user already has an O2 SSH key.
If yes, identify the private key path and make sure it is referenced:
Host o2.hms.harvard.edu
IdentityFile ~/.ssh/o2_ed25519
If no, create a dedicated key:
ssh-keygen -t ed25519 -f ~/.ssh/o2_ed25519 -N "" -C "o2-cluster-access"
Add it to ~/.ssh/config:
Host o2.hms.harvard.edu
IdentityFile ~/.ssh/o2_ed25519
Copy the key to O2:
ssh-copy-id -i ~/.ssh/o2_ed25519 YOUR_USERNAME@o2.hms.harvard.edu
Test key-based access:
ssh -o BatchMode=yes -o ConnectTimeout=10 YOUR_USERNAME@o2.hms.harvard.edu echo "SSH key working"
If the test prompts for a password or fails, retry key installation before starting the bridge.
Ask the user for their O2 username, then start the bridge in a separate terminal:
remote-bridge start o2 --user YOUR_USERNAME
The user should complete Duo authentication and keep that terminal open.
Verify from the Codex terminal:
remote-bridge rpc o2 connection_status
If connected, setup is complete. Record useful project-specific paths in the project AGENTS.md, for example:
## O2 Paths
- O2 repo:
- O2 scratch:
- Default container:
Then use use-o2 for bridge operations and job submission.
remote-bridge Not FoundConfirm installation location and PATH:
ls -l ~/.local/bin/remote-bridge
echo "$PATH"
Add ~/.local/bin to the user's shell startup file if needed.
Start it in a separate terminal:
remote-bridge start o2 --user YOUR_USERNAME
Check ~/.ssh/config, key permissions, and O2 key installation:
ls -l ~/.ssh/o2_ed25519 ~/.ssh/o2_ed25519.pub
ssh -v YOUR_USERNAME@o2.hms.harvard.edu
Edit ~/.config/remote-bridge/permissions.toml to include the needed path, then run:
remote-bridge update-checksum