[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74MFBS14ZWN68H6MQVMHWTN":3,"skill-same:01M74MFBS14ZWN68H6MQVMHWTN":105},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M74MFBS14ZWN68H6MQVMHWTN","remote-compute-modal",null,"Run GPU jobs on the user's own Modal account via host.compute.create('byoc:modal', ...). Covers the create→submit→wait_for_notification flow, the compute_provider kernel for env setup, image\u002Fvolume resolution, and the two approval cards. Load once you've decided to dispatch to Modal.","pengqianhan\u002FAI-Human-Research-OS","pengqianhan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4286531?v=4","01M74M3DT9HNZ6HPAK8TX69EX9","PengqianHan","01M74M3DTVSN2GXW0JH2W396FK",3,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: remote-compute-modal\ndescription: Run GPU jobs on the user's own Modal account via host.compute.create('byoc:modal', ...). Covers the create→submit→wait_for_notification flow, the compute_provider kernel for env setup, image\u002Fvolume resolution, and the two approval cards. Load once you've decided to dispatch to Modal.\nlicense: Apache-2.0\n---\n\nYou're dispatching to the user's Modal account: containers spin up in Modal's\ncloud, on hardware you name in plain terms (gpu\u002Fcpu\u002Fmemory\u002Ftimeout), under\ntheir workspace, on their bill. That's the reason there are\ntwo approval cards rather than one, and the reason the env-setup surface is\na separate kernel rather than something you can call inline from the\ncontrol-plane kernel: each card is the user consenting to a specific,\nbounded use of their credential, and the architecture keeps those grants\nlegible by keeping the surfaces apart.\n\nIf `compute.create('byoc:modal', …)` returns `unknown provider 'byoc:modal'`,\nModal isn't enabled in this install — ask the user to enable it under\n*Settings → Compute → Modal* (or surface the prompt; you can't enable it for\nthem).\n\nFor first-time environment setup, see `env-setup.md` in this skill\ndirectory — it walks through driving the `compute_provider` kernel to\nbuild and record images.\n\n## Two timeouts, one timeline\n\nModal has two deadline timers. Both live INSIDE the sandbox, and neither\ncan cost you the outputs of a job that ran. The timeline every job runs\non:\n\n1. Container life starts at sandbox creation — staging the inputs counts\n   against it, so a big upload spends container time before the job runs.\n2. The job runs. If it exceeds its own budget (the job timeout below), it\n   is TERMed there.\n3. Near end of container life — one harvest margin before the provider\n   destroys the sandbox — the in-sandbox **harvest watchdog** TERMs\n   whatever is still running. It runs on the sandbox's own clock, so a\n   wrong desktop clock or a slow upload can't make it fire late.\n4. After any TERM there is a grace window for checkpoint-on-TERM handlers\n   to flush, then the process group is stopped.\n5. Whatever is under `.\u002Fout\u002F` (plus the logs) is tarred and staged\n   UNCONDITIONALLY — on success, timeout, failure, and crash alike — and\n   harvested back into the workspace. Staging is unconditional; delivery\n   isn't. If the stream is refused or gives up (`result_rejected`,\n   `harvest_failed`), the staged copy waits on the sandbox, and a third,\n   post-job timer — the **idle watchdog** — terminates it after ~30 min\n   of inactivity. See \"When the job fails\".\n\nThe **container timeout** (`provider_params.modal.timeout`) is how long\nthe sandbox lives; omitted, it fills from the Settings default for this\nprovider (*Settings → Compute → Modal*; ceiling: Modal's 24 h platform\nlifetime, minus the staging margins — 85,500 s). The **job timeout**\n(`timeout_seconds` on `submit_job`) is an optional runaway guard for one\njob; omitted, it defaults to the container's remaining life minus the\nharvest margin. Name one when you know the job's budget — a hung job then\ncosts that budget, not the whole container, and the warm container\nsurvives for the next submit.\n\nA deadline-ended job lands as `status: 'timed_out'` — not a generic\nfailure — with its partial outputs already harvested, plus a note saying\nthe deadline (not the workload) ended the run and suggesting the remedy:\na larger `timeout_seconds`, or resuming from a harvested checkpoint. A\ndeadline ends the run, never the results.\n\n## Two surfaces, one provider\n\nYou reach Modal two ways. They share confinement and credentials but answer\ndifferent questions, and confusing them is the most common way to waste a\nturn.\n\n`host.compute.create('byoc:modal', provider_params={'modal': {...}})` is\nthe **job surface**. It runs in the `repl` tool — same as\n`remote-compute-ssh` — and is what you use for anything with\ninputs\u002Foutputs you want harvested into the workspace, anything on a GPU, and\nanything long enough that you'd want to reattach if the daemon restarts. The\ncall itself is a stateless constructor — the **tier card** (provider, image,\n`1× A100-40GB · 8 CPU · 32 GB`, container timeout, volumes) and the actual\nSandbox creation both happen on the first `submit_job()`.\n`submit_job`\u002F`result`\u002F`call_command`\u002F`attach_job`\u002F`close` then work exactly\nas for SSH: `.result()` is **non-blocking** — the daemon's poller probes the\nsandbox, harvests `out.tar.gz` into `hpc\u002F\u003CjobId>\u002F`, and emits a\n`compute_done` notification when done. To wait, exit the cell after\n`submit_job` and use the `wait_for_notification` brain-tool. What reaches\nthe remote is what was in the workspace files you named, and what comes\nback lands under `hpc\u002F\u003CjobId>\u002F` through the same hardened extractor.\n\n`compute_provider({'provider': 'modal', 'code': '…'})` is the **environment\nsurface** — a Python shell with the user's Modal SDK already authenticated,\nrunning in its own confined process. Use it to *prepare* compute: build\ncontainer images JIT in the user's workspace, populate model-weight volumes\nby running the downloads on Modal's own infrastructure (so wide-internet\nfetches never traverse the local allowlist), check what assets already\nexist, run a short CPU smoke probe. Its first cell in a session fires the\n**kernel card** — *\"environment setup — build images, populate volumes, CPU\nprobes ≤30 min; GPU jobs ask separately\"* — and once granted, subsequent\ncells in this kernel's lifetime (idle-timeout ~15 min) run without further\nprompts. The kernel will reject `gpu=` on `Sandbox.create` and clamp\n`timeout` to ≤30 min — the kernel's own probe budget, separate from the\njob surface's container timeout. It's a redirect to the job surface, not\na fence; you've already been handed the credential. **Terminate every\nsandbox you create here** — `sb.terminate()` in the same cell, in a\n`try\u002Ffinally` if you `exec` in between (`build_env`'s hydrate models\nthis). Nothing reaps it mid-session: the idle timeout kills the\n*kernel*, never your sandboxes — the ≤30-min clamp only bounds how long\na forgotten one bills.\n\nThe shape of a good run is: read what's already known about this workspace,\ndecide whether the env you need exists, build it via the `compute_provider`\nkernel if it doesn't, then run the actual job through `compute.create()`.\nThe two cards appear at most once each per session — and on a warm second\nsession with a project-level grant, neither.\n\n\n## Workflow\n\nEvery `host.compute.*` call here runs via the **`repl` tool**; the\n`compute_provider` kernel is reached via the **`compute_provider` tool**.\nNeither is the `python` tool. All three share your workspace directory but\nnot memory — pass data through files.\n\nStart with `compute_details({provider: 'byoc:modal', mode: 'read'})`. Below\nthe orientation line is the per-workspace ledger — `### env:\u003Cname>@\u003Cspec_sha>`\nblocks recording images that already exist in this user's Modal workspace,\nthe volumes they pair with, and any free-text notes a previous session left.\nThe `spec_sha` is the content hash of the env's source file in this binary,\nso a ledger entry whose hash matches is one you can use without rebuilding:\npass its image ref straight to `compute.create()` and the kernel card never\nappears. A mismatch means the env definition changed in this release — the\nold image still works but isn't what the current env file describes, so\ntreat it as absent.\n\nIf what you need isn't in the ledger, build it in a `compute_provider`\ncell. Two helpers are pre-bound there alongside `modal` and `app`:\n\n- `list_envs()` → `{name: META, …, '_envs_dir': path}` for every bundled\n  env (packages, GPU tier, secrets it needs)\n- `build_env(name, *, hydrate=False)` → builds the image, returns\n  `{'image': 'im-…', 'spec_sha', 'volumes', 'env', 'hydrate'}`\n\nTo inspect what an env actually installs (the `modal.Image` chain) before\nbuilding, read the source from the **control-plane kernel** (a `repl`\ncell) — it's a skill asset:\n\n```python\n# repl tool\nprint(host.skills.read('remote-compute-modal', 'envs\u002Fproteomics_jax_gpu.py')['content'])\n```\n\nDon't `find` for it from bash — the path differs across builds.\n\n```python\n# compute_provider tool, provider='modal'\nneed = {'transformers', 'torch'}\nenvs = list_envs()\nprint({n: m for n, m in envs.items()\n       if not n.startswith('_') and need \u003C= set(m.get('packages', []))})\n# → {'proteomics_gpu': {'packages': [...], 'gpu_default': 'A100-80GB', ...}}\n\nr = build_env('proteomics_gpu', hydrate=True)\nprint(r['image'], r['spec_sha'], r['volumes'])\n```\n\nCarry `r['image']` (the `im-…` reference, NOT the env name) back to the\ncontrol-plane kernel (a `repl` cell) and pass it to\n`provider_params.modal.image` — and, for a bundled env, its NAME as\n`provider_params.modal.env`: the host then reads the env's\n`META[\"egress_domains\"]` from the SHIPPED file at every submit, so the\ndeclaration survives rebuilds (a pointer into the shipped catalog, not a\npower). The two kernels share a working directory but not memory, so the\nsimplest handoff is a workspace JSON file:\n\n```python\n# compute_provider tool — last line of the build cell\nimport json; json.dump(r, open('built_env.json', 'w'))\n```\n\nAppend a `### env:\u003Cname>@\u003Cspec_sha>` block to `compute_details` so the\nnext session reads the `im-…` ref straight from there and skips the\n`compute_provider` cell entirely. **Pass `r['image']` (the `im-…` ref) to\n`provider_params.modal.image`.** The adapter will resolve a bare env name\nfrom the ledger as a fallback, but that's brittle — the ledger entry can\nbe stale or absent. Treat the build as its own task with its own validation;\ndon't fold it into a job submission. See `env-setup.md` for ad-hoc patches\nand gated weights.\n\nFor a quick inline call (no inputs, output is just stdout), use\n`submit_job` with no `inputs`. The `compute_done` notification payload\ncarries `status` \u002F `exit_code` \u002F `featured_files`, plus `error_kind`,\n`system_hint`, and `deadline_fired` when set — read those disclosures\nfrom the notification itself (a deadline-truncated rc-0 job announces\npartial outputs there). For `stdout_tail`, re-enter the kernel and read\nit from `.result()` after the notification arrives (`call_command` is SSH-only — it bails on a `byoc:`\nhandle):\n\n```python\n# repl tool — cell ① submits and RETURNS\nimport json\nr = json.load(open('built_env.json'))\nc = host.compute.create('byoc:modal', provider_params={'modal': {\n    'image': r['image'],          # the im-… ref (bare name fallback brittle)\n    'env': 'proteomics_gpu',      # bundled-env NAME → its shipped egress declaration applies\n    'gpu': 'A100',                # timeout omitted → container gets the Settings default\n    'volumes': r['volumes'],\n}})\nj = c.submit_job(\n    intent='load esm2_t6 on GPU',\n    command='python -c \"from transformers import EsmModel; import torch; '\n            'm = EsmModel.from_pretrained(\\\\\"facebook\u002Fesm2_t6_8M_UR50D\\\\\").cuda(); '\n            'print(torch.cuda.get_device_name())\"',\n    timeout_seconds=300,          # job guard — this probe finishes in 5 min or it's hung\n)\nprint('JOB_ID:', j.job_id)   # ← cell ends here; kernel never blocks\n```\n\nThen exit the cell and use `wait_for_notification`. When the\n`compute_done` notification arrives, its payload has `status` \u002F\n`exit_code` \u002F `featured_files`, plus `error_kind` \u002F `system_hint` \u002F\n`deadline_fired` when set. For `stdout_tail`, re-enter the kernel:\n\n```python\n# repl tool — cell ② after the compute_done notification\nprint(c.attach_job('\u003CJOB_ID>').result()['stdout_tail'])  # non-blocking — poller already harvested\nc.close()\n```\n\nFor a full job with inputs and harvested outputs:\n\n```python\n# repl tool — cell ① submits and RETURNS\nc = host.compute.create('byoc:modal', provider_params={'modal': {\n    'image':   r['image'],               # 'im-…' from build_env(); bare-name fallback exists but is brittle\n    'env':     'proteomics_jax_gpu',     # bundled-env NAME → its shipped egress declaration applies\n    'gpu':     'A100-40GB',\n    'cpu':     8,\n    'memory':  32768,                    # MiB — Modal's unit, not GiB\n    'volumes': {'\u002Fcache': 'af2-params'}, # mount path → Modal Volume name\n    'timeout': 3600,                     # container lifetime, seconds — optional; omitted → Settings default; ceiling: Modal's 24 h platform limit\n}})\n# → tier card → Sandbox.create() under the user's workspace → handle bound to sandbox_id\n\njob = c.submit_job(\n    intent='colabfold on target.fasta — 1× A100, ~40 min',\n    command='colabfold_batch target.fasta out\u002F --num-recycle 3 --model-type alphafold2_ptm',\n    inputs=[{'src': 'target.fasta', 'dst_filename': 'target.fasta'}],\n    outputs=['out\u002Franked_0.pdb', {'glob': 'out\u002F*.json', 'visibility': 'featured'},\n             {'glob': '*.log', 'visibility': 'hidden'}],\n    timeout_seconds=2700,                # job guard — optional; default = remaining container life − harvest margin\n)\nprint('JOB_ID:', job.job_id)   # ← cell ends here\n```\n\nThen `wait_for_notification` — the `compute_done` payload includes\n`featured_files`, so you can `save_artifacts(payload['featured_files'])`\ndirectly without re-entering the kernel. If you want the full dict\n(`stdout_tail` \u002F `stderr_tail` \u002F `job_wall_s`):\n\n```python\n# repl tool — cell ② after the compute_done notification\nr = c.attach_job('\u003CJOB_ID>').result()  # non-blocking read of compute_usage.result\nsave_artifacts(r['featured_files'])\nc.close()\n```\n\n`r['job_wall_s']` is the seconds `run.sh` ran on the remote — the actual\nGPU\u002Fcompute duration.\n\n`timeout` is the container's lifetime; `timeout_seconds` guards one job\ninside it. Both are optional: `timeout` fills from the Settings default,\n`timeout_seconds` from the container's remaining life minus the harvest\nmargin. Name a `timeout_seconds` when you know the job's budget — a hung\njob then costs that budget and the warm container survives. At either\ndeadline the job is TERMed, given grace, and its outputs are staged and\nharvested as on success — the job lands as `status: 'timed_out'`\n(deadline-terminated, outputs harvested), not a generic failure.\n\n`inputs=` stage **flat** into the workdir root. `dst_filename` is a bare\nfilename — `'inputs\u002Fgfp.fasta'` is rejected at submit (the file would land\nat `\u002Fwork\u002Fgfp.fasta`, not where the command expects). `src` can be a path;\n`dst_filename` can't. Omit it to default to `basename(src)`. Need a dir\nlayout? `mkdir -p` it inside `command=`.\n\n**Sizing `inputs=` — and when to use a Volume instead.** Inputs are\nstdin-streamed through a confined path at ~0.65–0.81 MiB\u002Fs effective\n(measured) — budget staging time from that: 1 GiB ≈ 20–26 minutes of\nupload before the job starts, spent from container life. The host\nbudgets staging from input size with a planning rate it cannot verify\n(upload speed isn't controllable), so a slower-than-planned upload never\nendangers the harvest — the watchdog's absolute-clock backstop still\nprotects the staging window; the job just gets less runtime than\nnominal. If an upload dies outright, the submit fails LOUDLY with a\ntransport error and no phantom job. Practical sizing: code, configs, and\nsmall data are what `inputs=` is for; it is workable up to its **1 GiB\nper-submit cap** (slow but fine — budget the ~20–26 min of staging near\nthe cap). Anything above 1 GiB is refused at submit time, so beyond it a\nVolume is the only path — and the better one well before that. Volumes\n(Files-tab import, or a `compute_provider` cell; mount via\n`provider_params.modal.volumes`) persist on Modal disks across jobs and\ncost zero upload per submit.\n\n**Checkpoint long jobs as they run.** Write progress to `.\u002Fout\u002F` (or a\nVolume) periodically: at either deadline the workload gets TERM, then a\ngrace window for checkpoint-on-TERM handlers, and whatever is under\n`out\u002F` is staged and harvested unconditionally. A job that checkpoints\nloses at most one interval to a deadline — never the run. Keep `.\u002Fout\u002F`\ncheckpoints SMALL (≈ ≤100 MB compressed): the harvest stream back to the\nhost runs in a bounded (~2 min) window, so a multi-GB `.\u002Fout\u002F` risks\n`harvest_failed` even though staging succeeded — large checkpoints\nbelong on a Volume, with only small summaries under `.\u002Fout\u002F`.\n\n**Only `.\u002Fout\u002F` is harvested.** The wrapper tars `out\u002F` + `stdout.log` +\n`stderr.log` — nothing else. `outputs=` globs are a *post-harvest* filter\n(featured\u002Fhidden), not a what-to-collect directive. If your tool\nwrites to cwd, a Volume mount (e.g. `\u002Fatlas`), or `$HOME`, end `command=`\nwith `cp -r \u003Cresults> out\u002F` (or point the tool's `-o`\u002F`--output` at `out\u002F`).\nA successful job with an empty `out\u002F` returns only the log paths in\n`output_files` plus a `system_hint` telling you so.\n\n`command=` is interpolated into a `run.sh` and run via `bash run.sh`.\nFor anything beyond a single program-with-args — nested quotes, inline\n`python -c \"…\"`, heredocs, pipelines — write the script to a workspace\nfile and ship it via `inputs=`, then `command='bash script.sh'` or\n`command='python script.py'`. Multi-layer shell escaping inside\n`command=` is the most common cause of `syntax error near unexpected\ntoken` failures.\n\n`provider_params.modal` uses **Modal's own kwarg names** — Modal's docs are\nthe docs. The adapter resolves the strings to SDK objects (env name → its\n`im-*` from the `compute_details` ledger; volume name → `Volume.from_name`)\nand passes the rest through to `Sandbox.create(**params)`. An absent\n`timeout` fills from the Settings default before the tier card renders,\nso the card shows the real lifetime. A `timeout` above Modal's 24 h\nplatform cap or out-of-range hardware is rejected with `invalid_request`\nbefore any helper spawns; nothing is silently clamped.\n\n## The image-reference rule\n\n`image` is **always a string**. A `modal.Image` object built in a\n`compute_provider` cell cannot cross to the control-plane kernel — they are\nseparate Python processes under separate confinement invocations, and a live\nSDK handle is meaningless on the other side. So the pattern is:\n\n```python\n# compute_provider tool — env setup (`modal` and `app` are pre-bound)\nimg = (modal.Image.from_registry('nvidia\u002Fcuda:12.4.1-runtime-ubuntu22.04',\n                                 add_python='3.11')\n       .pip_install('chai_lab==0.6.1'))\nimg.build(app)\nprint(img.object_id)          # → 'im-7f3a2e…' — read this string\n```\n\n```python\n# repl tool — job\nc = host.compute.create('byoc:modal', provider_params={'modal': {\n    'image': 'im-7f3a2e…',    # the string, not the object\n    ...\n}})\n```\n\nThe adapter validates an `im-*` literal via `Image.from_id()`, which fails\nclosed on a foreign or fabricated id, so a typo surfaces as `not_found`\nbefore any GPU spins. An env name is looked up in the ledger first\nand resolved to the recorded `im-*`; on a miss the adapter returns\n`image_build_failed` with copy pointing at\n`compute-env-setup` rather than triggering a build inline.\n\n## What latency to expect\n\nMeasured against real Modal during validation — set timeouts and user-status\nmessages from these, not guesses:\n\n| phase | typical | notes |\n|---|---|---|\n| `Image.from_registry(..., add_python=...).pip_install(...).build(app)` | 130–360s | one-time per `im-*`; runs on Modal's CPU build infra, not your tier |\n| `compute.create()` (stateless ctor) | \u003C1ms | just returns a handle — no container, no card |\n| first `submit_job()` on a handle, A100 | ~18–30s cold start + job runtime | creates the container (image pull + boot); raises the tier card |\n| first `submit_job()` on a handle, H100 | ~20–25s + job runtime | similar; queue wait can add when capacity is tight |\n| subsequent `submit_job()` on same handle | ~5–10s + job runtime | reuses the warm container — weights\u002Fcaches stay hot |\n\nSo budget ~3–6 min for a fresh env's first GPU result, and ~5–10s per\nsubsequent `submit_job()` on the same handle. If a first cold start is\npast ~90s, that's queue wait, not a hang — surface it rather than retrying.\n\n## When the user gives you a budget\n\nA user who says \"stay under eight GPUs\" or \"keep it to a hundred at a\ntime\" is giving you a number that the prompt alone can't enforce. You'll\nwrite it into the orchestrator's instructions, but the sub-agents you\ndelegate to start with fresh context — they never see that line, and\neach one will reasonably try to use as much compute as its own task\nseems to warrant. Across a wide fan-out that drifts well past whatever\nthe user had in mind, and the first sign is usually the bill.\n\n`host.compute.set_concurrency_limit(k)` exists so the user's number\nbecomes a property of the session rather than a sentence in a prompt.\nCall it once before delegating; the daemon stores it against the session\nroot, counts every sub-agent's live job against the same `k`, and\nquietly holds any submit that would put the session over (the SDK\nretries with backoff under the hood). Sub-agent code is unchanged — the\nhold sits below `submit_job`, not in the agent.\n\nChoosing `k` has one constraint beyond the user's intent: each provider\nalso has its own ceiling, and that ceiling refuses rather than queues.\nA session limit above it doesn't fail, it just stops being the binding\nconstraint — submits past the provider's own ceiling error instead of\nwaiting. `host.compute.status()` returns both your `k` and the\nprovider ceilings, so you can pick a value that actually queues. When\nthe user hasn't given a number, leaving the limit unset keeps today's\nbehaviour; set one yourself only if a fan-out is wide enough to threaten\nthe provider cap and you'd rather queue than fail.\n\n## Warm reuse, reattachment, and `close()`\n\nOne handle = one container. The first `submit_job()` creates it;\nsubsequent calls reuse it warm (weights\u002FXLA cache stay hot). The poller's\nharvest does **not** terminate the container — it runs until `c.close()`,\n~30 min of inactivity (the sandbox's PID-1 **idle watchdog** — a kill,\nnot a harvest: anything unharvested goes with the container), or its\ncontainer timeout, whichever comes first. Until then a finished — or\nfailed — job's container bills idle. **Every handle ends with\n`c.close()`** — after its last job, not between jobs, and not while its\nsandbox holds the only copy of unrecovered outputs\n(`result_rejected`\u002F`harvest_failed` — see \"When the job fails\"). Close\nonce the final `compute_done` has arrived and the harvest is confirmed;\nif the next job on this handle is imminent, or the user asked to keep\nthe container warm across jobs, leave it open and close when the\nsequence ends. Near end of life the **harvest watchdog** stops any\nrunning job early enough to stage its outputs, so even the last job\ncomes back harvested. A warm container is reused only when its\nremaining life covers the next job's deadline plus margin; otherwise\nthe submit transparently\ncreates a fresh sandbox (one more cold start, same handle) and says so\nin a `[note]` line on the submit result.\n**Sequential only**: each submit wipes `\u002Fwork`, so call job N+1's\n`submit_job()` after job N's `compute_done` notification arrives; for\nparallel jobs use separate handles. A second `create()` with different\n`{gpu, cpu, memory}` is a separate container and a separate card. The\ndetached wrapper survives a Claude Science daemon restart — on restart you'll see\n\"1 job reattached\" rather than a cold start.\n\n**Multiple parallel jobs** (separate handles): submit all in one `repl`\ncell, then loop `wait_for_notification` → act on every entry in\n`notifications` (several may arrive at once) → repeat until it returns\n`{status:'error'}` (= none left). Don't poll `.result()`.\n\n**Before you finish the task**: every handle closed (unless the user\nasked to keep one warm, or its sandbox holds unrecovered\n`result_rejected`\u002F`harvest_failed` outputs), and no sandbox of yours\nstill alive in the `compute_provider` kernel\n(`modal.Sandbox.list(app_id=app.app_id)` shows what's running). Tear\ndown job-surface containers with `c.close()`, never a raw\n`sb.terminate()` — only `close()` consults the host's\nrecoverable-outputs gate. Reserve `sb.terminate()` for sandboxes you\ncreated in the kernel, and only ones you recognise from this session —\nwarm containers from other Claude Science installs share the same app.\n\n## When the job fails\n\nA failed job's container stays up on purpose, so you can fix and\nre-submit warm — but \"stays up\" has a clock on it: the in-sandbox idle\nwatchdog terminates it after ~30 min of inactivity, and reading files\noff it does not reset that clock. If you aren't re-submitting on this\nhandle now, `c.close()` it and diagnose from the harvested tails and\noutputs below — except on `result_rejected` and `harvest_failed`,\nwhere the sandbox holds the only copy of the output; read those\nentries before you touch `close()`. For every other kind, closing\nloses only what the harvest didn't catch (a core dump, a verbose log,\na `residency:'remote'` output) — and `.download()` can't save it here:\nscp is SSH-only and errors on a `byoc:` handle. Read any such file off\nthe live sandbox from a `compute_provider` cell BEFORE you close: find\nit with `modal.Sandbox.list(app_id=app.app_id,\ntags={\"claude-science-job\": \"\u003Cjob_id>\"})` — the tag names the job\nwhose submit cold-started the container: your failed job, unless you\nchained submits on a warm handle (each fresh sandbox announces itself\nin a `[note]` on its submit result) — then `sb.exec(\"cat\", \"\u003Cpath>\")`\nto pull the bytes.\n\nRead `r['exit_code']`, `r['stdout_tail']`, and `r['stderr_tail']`. A job\nthat hit a deadline lands as `status: 'timed_out'` with its partial\noutputs already harvested into `hpc\u002F\u003Cjob_id>\u002F` — check `stdout_tail` for\nprogress and resubmit with a larger `timeout_seconds` (or resume from a\nharvested checkpoint) only if the work was actually cut short. The\nerrors that come back as `kind` rather than a non-zero exit code map cleanly\nonto where to look:\n\n`image_build_failed` — Modal's layer build errored: a yanked PyPI version,\na base-image pull failure, a pin that no longer resolves. The build-log\ntail is in the `compute_provider` cell where you ran `build_env()`; fix the\nenv file and rebuild there. No image reference was produced, so the ledger\nstays clean. If you passed an env name to `create()` without ever building\nit, the name is valid but no image is in the ledger yet — `build_env()` it\nfirst.\n\n`unauthorized` — token rotated or revoked. The `compute_provider` kernel\nwill have already exited on the first 401; the next cell respawns and\nre-reads `~\u002F.modal.toml`, so the user fixing their token is the whole fix.\n\n`quota_exhausted` — workspace quota, concurrent-GPU limit, or spend cap.\nFor the concurrent limit, first free what you hold: `c.close()` finished\nhandles (not one holding unrecovered outputs — see below) and terminate\nkernel sandboxes you're done with — idle warm containers count against\nit. A spend cap isn't freed by closing — accrued spend stays accrued. If\nit still trips, surface the copy verbatim and pause; raising the limit\nis the user's billing decision.\n\n`rate_limited` — a request-rate throttle on the token, not capacity:\nclosing containers frees nothing here. Back off ~60s and stagger\nfan-out submissions, per the copy.\n\n`ownership_mismatch` — another install sharing this workspace token adopted\nthe warm sandbox first. The adapter cold-starts a fresh one; nothing for you\nto do beyond noting the banner.\n\n`result_rejected` (`compressed_cap_exceeded`) — output archive larger than\nthe consented cap. Nothing was written to the workspace and the sandbox is\nstill warm with `out.tar.gz` intact; the user gets a raise-and-retry\naffordance that re-streams without re-running. The sandbox holds the only\ncopy of the output — do **not** `c.close()` until it's resolved, and\nsurface it to the user now, not at end of task: the Compute panel lists\nthe job as recoverable for 24 h, but that listing only blocks\nClaude Science-side kills (a queued `close()` is deferred ~15 min, then\nexecutes) — the in-sandbox idle watchdog still terminates the sandbox\nafter ~30 min of inactivity, only copy included.\n\n`harvest_failed` — the output stream gave up after retries; the warm\nsandbox likewise holds the only copy. Same rule: no `c.close()` until\nthe outputs are recovered — and the recovery path is the user's, not\nyours: they retrieve from the recovery list in the Compute panel\n(`.download()` errors on a `byoc:` handle, and reuse on it is gated).\nSame clocks as above: surface it immediately.\n\n`input_changed` — a submit input was rewritten (or deleted\u002Fswapped) between\nvalidation and staging: the transport re-hashes the bytes it actually\nuploads and compares them to the sha256 captured at validation time.\nNothing was uploaded and the job never started. Re-run `submit_job()` so\nthe input is re-validated; if it keeps tripping, something is still writing\nthat file — wait for the writer to finish before resubmitting.\n\nA plain non-zero `exit_code` with logs is the science tool failing on\ninputs — same diagnosis as on SSH.\n\n## What to record\n\nAfter a successful build, append the `### env:\u003Cname>@\u003Cspec_sha>` block to\n`compute_details` — env-setup.md §\"Recording the result\" has the snippet.\nThat ledger is the durable record; don't also write the same facts to\nmemory. Do NOT record build timings, `validated:` dates, or sha256\nconfirmations — `spec_sha` already encodes staleness and the rest is\nnoise. Gotchas you hit (a documented invocation that failed, a flag you\nhad to add, a quota you bumped into) are worth a free-text line.\n\n## GPU tier reference\n\n| `gpu` value | device | VRAM |\n|---|---|---|\n| `\"A10G\"` | NVIDIA A10 | 24 GB |\n| `\"A100\"` | A100-SXM4-40GB | 40 GB |\n| `\"A100-80GB\"` | A100-SXM4-80GB | 80 GB |\n| `\"H100\"` | H100 80GB HBM3 | 80 GB |\n\nEach bundled env carries a `gpu_default` in its `META` — what its author\nsized for the typical workload. Start there; reach for a bigger tier when\nyou have a concrete reason (the model is documented as needing >40 GB, the\nlast attempt OOM'd), not as a hedge. The approval card shows the tier you\npicked, but the grant is keyed on provider only, so once approved for this\nconversation a tier change doesn't raise a new card — the user is trusting\nyour judgment on sizing after the first approval.\n\n## Volumes\n\nPass `volumes={\"\u002Fweights\": \"\u003Cvol-name>\"}` in `provider_params.modal`. The\nmount is a symlink to `\u002F__modal\u002Fvolumes\u002F\u003Cid>\u002F` — always reference it by the\nmount path, never the resolved target.\n\nThe Files tab lists `byoc:modal` alongside SSH hosts: at `\u002F` it shows\nVolumes as top-level directories, and inside one you can browse, import,\nand download files (same pane as SSH). The path's first segment is the\nVolume's *name*, not a mount path. For scripted listing use a\n`compute_provider` cell:\n`modal.Volume.from_name('\u003Cname>').iterdir('\u002F', recursive=False)`.\n\n## Modal Environment (Settings → Compute → modal → Environment)\n\nOptional, beside the *Default app* setting. A Modal **Environment** is\nthe workspace namespace apps, images, volumes and sandboxes live in —\nwith the app, one of the two coordinates every Modal name resolves\nunder. Claude Science resolves every named object it touches (`App.lookup`,\n`Volume.from_name`) in the configured Environment, and the\n`compute_provider` kernel is started inside it, so `build_env()` \u002F\n`HYDRATE` and an env file's own `modal.Volume.from_name(...)` calls\nland there too. Blank — the default — sends no environment at all and\nModal uses its own default (normally `main`, or whatever\n`~\u002F.modal.toml` says). You cannot set or change it: it is\nhost\u002FUI-written (`compute_providers.modal_environment`), never a\n`provider_params.modal` field (the schema rejects `environment` \u002F\n`environment_name` outright), and the ledger cannot reach it.\n\n### Which Environment and App am I in?\n\nA kernel binds its coordinates at spawn — Environment, app, egress\nposture — and never re-reads them, while the user can change the\nSettings at any time; a change only reaches what gets created next.\n`compute_provider_config()` is how you find out where you actually\nstand:\n\n```python\n# ── compute_provider tool ──\ncompute_provider_config()\n# → {'provider': 'byoc:modal', 'environment': 'team-bio',\n#    'app_name': 'claude-science-default', 'egress_mode': 'allowlist',\n#    'config_hash': '93e1a4c20b7f'}\n\n# …and after the user changes the Environment, Default app or Network\n# Restrictions mode there, the same call:\n# ComputeProviderConfigStale: compute provider config is out of date:\n#   this kernel was started with config 93e1a4c20b7f but the provider\n#   Settings now hash to 4be09f12aa31. Restart the compute_provider\n#   kernel (close it and open a new one) to pick up the new\n#   Environment\u002Fapp\u002FNetwork Restrictions configuration.\n```\n\nCall it before anything expensive. If it returns, trust every value in\nthe dict (`environment: None` means Modal's workspace default;\n`app_name` is already resolved). If it raises, the Settings moved\nafter this kernel started and there is exactly one remedy: close this\n`compute_provider` kernel and open a fresh one, which is born into the\nnew configuration. `build_env()` makes the same check before building,\nso a stale kernel cannot spend twenty minutes on an image in a\nnamespace the next `submit_job()` — which always follows the live\nSettings — will never look at.\n\nSandboxes follow the same birth rule. A fresh `submit_job()` takes the\nSettings of the moment it creates its sandbox; a warm-reuse submit\nkeeps the Environment, app and egress fence its sandbox was born under\n(see *Warm reuse, reattachment, and `close()`*). So a Settings change\n— an egress change included — reaches your next fresh sandbox, never a\nwarm one, and nothing ever moves: images, volumes and running\nsandboxes stay where they were created, reachable again the moment the\nsetting points back.\n\n\n## Network egress from the job sandbox\n\nWhat the job container can reach on the network is a per-provider setting\n(`Settings → Compute → modal → Network Restrictions`), not something you\nchoose per submit. The host stamps it onto every new sandbox as Modal's\n`outbound_domain_allowlist` (or `block_network`). Four states:\n\n- **Not configured** (`NULL`, the default for new connections and for any\n  provider enabled before this setting existed) and **Unrestricted** — the\n  sandbox has open internet. The byoc_submit card shows no egress row.\n- **Allowlist** — the sandbox may only open outbound connections to a\n  list the HOST computes at approval time:\n  `(mirror of the user's local sandbox allowlist ∪ a built-in seed of\n  pull-only wheel indexes — download.pytorch.org, pypi.nvidia.com — when\n  the policy mirrors) ∪ (the policy's extra domains) ∪ (the env's\n  declared domains)`. A `mirror:false` policy is never seeded (it is the\n  user's explicit \"exactly my list\"). The card shows the exact final\n  list (`Egress limited to N domains`) with each part attributed; only\n  portable domain patterns are mirrored (a local bare `*` or interior\n  wildcard is dropped and disclosed, never sent to Modal where it means\n  something else); and when there is no local allowlist to mirror\n  (network isolation off or unavailable) the resolution is unrestricted\n  and the card says so. Two hosts are never seeded:\n  `storage.googleapis.com` (hydrate the weights volume instead) and the\n  write-capable Hugging Face hub\u002FCDNs — an env that pulls from HF at\n  job time declares `huggingface.co` + `*.hf.co` itself.\n- **No network** — the user chose to create every new job sandbox with\n  `block_network`: *all* outbound connections refused. This is a kill\n  switch, decided before any allowlist input is even read. The env's\n  `egress_domains` \u002F the ledger's `egress:` line are **ignored** under\n  it — there is deliberately no channel, yours or an env's, that can\n  open a hole in it — and the card says\n  \"all outbound network is blocked (provider policy: No network)\".\n\nYou influence exactly one input to that merge: which env declaration\napplies. `META[\"egress_domains\"]` is the list of hosts the env's\n*documented job-time commands* need (e.g. `api.colabfold.com` for the\ndefault ColabFold MSA server). For a **bundled** env, pass its NAME as\n`provider_params.modal.env` (or let the `### env:` ledger block name\nit): the host reads the declaration from the SHIPPED file, so it\nsurvives every rebuild and can only select among shipped, reviewed\nsets. For an **ad-hoc** env (`build_env(path=…)`), record the `egress:`\nledger line (see `env-setup.md`); that text is agent-written, so the\nhost re-validates and caps it. Either way it is a **request the user\nalways sees, never an authority** — it lands on the card as\n`(+K declared by this env)`, and a standing \"always allow\" grant never\nskips a card that carries env-declared domains. Declare the exact\njob-time hosts only (`HYDRATE` runs in the `compute_provider` kernel,\noutside the fence), and you cannot set or widen the policy itself:\n`provider_params` rejects `egress_allowlist` \u002F\n`outbound_domain_allowlist` outright and `compute_details` cannot reach\nthe column.\n\n### Skill-driven jobs and the fence\n\nA skill is just commands inside a fenced sandbox: every host its\ndocumented flow dials at job time either rides the merge above or dies\nas a connection reset. So declare an env's job-time hosts (its\n`META[\"egress_domains\"]` \u002F the ledger's `egress:` line) BEFORE the\nfirst submit, and move big one-time fetches — weights, checkpoints,\nsequence databases — out of the job entirely: bake them at image build\nor stage them from the `compute_provider` kernel into a Volume, neither\nof which is fenced (`env-setup.md` → *\"Tool recipes that survive the\negress fence\"* has the runnable recipes). *Settings → Compute → modal →\nNetwork Restrictions → Additional domains* is the user-side fallback for\na fetch that truly must happen inside the job.\n\n### Knowing the policy, and reading a network failure\n\nYou never have to guess what a job is allowed to reach, because the host\ntells you twice — three times when a `compute_provider` kernel is open:\n`compute_provider_config()['egress_mode']` there names the mode the\n*next* sandbox will be created under, before any submit spends a card.\nAt submit time the reply carries an `egress` line and\n`submit_job` prints it — `[egress] sandbox egress at creation: allowlist\n(2 domains; mirror off; +0 from the env)` — and the same string lives on\nthe handle as `job.egress`. That line describes the sandbox for its whole\nlife: the policy is captured when the sandbox is created, so what you see\nthere is what every command in that job runs under, no matter what the\nSettings screen says five minutes later. Then, if the job's output ends up\ncarrying connection-level failures and the sandbox was fenced, the result\nand the `compute_done` notification carry a second host-authored line\nstarting with `[egress]` that names the policy, its size, and the remedy.\nBoth lines are written by the host from the policy it actually enforced —\nthey are evidence you can repeat to the user verbatim, not something you\nhave to infer.\n\nKnowing how a fence fails is what lets you attribute instead of flail.\nModal's allowlist is a TLS\u002F443 SNI filter, so it never answers at the\nHTTP layer; everything it refuses dies below that, and each spelling\ntells you which rule you hit. These are the shapes we observed live, not\ntheory:\n\n| what the output says | under an allowlist it means | under No network it means |\n|---|---|---|\n| `Connection reset by peer` \u002F `ECONNRESET` on an `https:\u002F\u002F` URL | the host is not on the sandbox's list | (everything already fails earlier, at DNS) |\n| `Network is unreachable` \u002F `ENETUNREACH` | the request was not TLS on port 443 — plain `http:\u002F\u002F`, a non-443 port, or a raw socket — and the filter refuses those even for an *allowed* domain | no route to anything |\n| `Temporary failure in name resolution` \u002F `EAI_AGAIN` \u002F `Could not resolve host` | rare under an allowlist (DNS itself is up) | the normal shape: there is no DNS and no network at all |\n\nA `4xx`\u002F`5xx`, on the other hand, means the host *was* reachable and\nanswered; that is an application problem, not the policy.\n\nThe fix depends on the failure class, and the `[egress]` hint names the\nsuspect host (when the output names one) and the remedy. A host that\nsimply isn't listed: ask the user to add exactly that name under\n*Settings → Compute → modal → Network Restrictions → Additional domains*\n(or, for an env's documented commands, declare it in\n`META[\"egress_domains\"]`). A non-TLS \u002F non-443 failure (`apt-get`, an\n`http:\u002F\u002F` mirror, a raw socket): no allowlist edit can fix it — use\nHTTPS or do that install at image-build time, which is not fenced.\n`storage.googleapis.com` during a lazy weights download: hydrate the\nenv's volume from the `compute_provider` kernel instead of opening the\nworld's most general bucket host. Under *No network* there is nothing to\nadd by design. Every policy is read only when a sandbox is **created**,\nso resubmit on a **fresh handle** — retrying in (or warm-reusing) the\nfailed sandbox repeats the failure byte for byte.\n\nThree moves look productive here and are not. Retrying the same command\nin the same sandbox cannot succeed, because nothing inside a sandbox can\nchange its policy. Asking the user to switch to *Unrestricted* because\none domain is missing trades their whole egress posture for a one-line\nallowlist edit — name the domain instead. And probing from inside the\njob (\"let me curl a few sites to test the network\") only reproduces the\nfailure you already have; the `[egress]` line and `job.egress` already\ntell you the policy without spending a container on it.\n\nTwo Modal-side caveats worth knowing before you debug \"the network is\nbroken\": Modal documents `outbound_domain_allowlist` as a **Beta**\nfeature, and it filters by TLS SNI, so it applies to **TLS on port 443\nonly** — once an allowlist is set, plain-HTTP and non-443 traffic from\nthe sandbox is refused regardless of the domain (we verified this live:\n`http:\u002F\u002Fexample.com` is refused even with `example.com` on the list). A\ntool that fetches over `http:\u002F\u002F` will fail under any allowlist even if\nits host is listed; the fix is the tool's HTTPS endpoint, not a wider\nallowlist.\n\n## Common env gotchas\n\nThese are tool-level quirks, not architecture — things the bundled env files\nalready handle but that bite when you're writing an ad-hoc env or debugging\na job that should have worked.\n\n- **`Volume.from_name(...)` returns a lazy handle** — `vol.object_id` raises `AttributeError: unhydrated` until the volume is mounted into a `Sandbox.create(volumes={...})`. Don't try to read it; record the volume *name* (that's what `provider_params.modal.volumes` takes anyway).\n- **rdkit** (deepchem, molfeat, aizynthfinder): needs `apt_install(\"libxrender1\", \"libxext6\")` or `rdkit.Chem.Draw` import fails on `libXrender.so.1`. The `chemistry_gpu` env includes these.\n- **dgl** CUDA wheels live at `data.dgl.ai`, not PyPI. `envs\u002Fproteomics_rfd_diffdock_gpu.py` shows the `find_links=` pattern.\n- **DestVI** is `scvi.model.DestVI`, not `scvi.external.DestVI` (moved in scvi-tools ≥1.0).\n- Small model weights (esm2_t6_8M, bert-tiny) auto-download to `\u002Froot\u002F.cache` on first use — fine for smoke; for repeated jobs hydrate a Volume once.\n- **Volume + `TORCH_HOME` path**: torch.hub appends its own `hub\u002F` subdir. If you mount the volume at `\u002Fweights` and want torch to find checkpoints there, set `TORCH_HOME=\u002Fweights` (torch then reads `\u002Fweights\u002Fhub\u002Fcheckpoints\u002F`). Setting `TORCH_HOME=\u002Fweights\u002Fhub` makes it look at `\u002Fweights\u002Fhub\u002Fhub\u002F` and re-download.\n- **molfeat**: use `from molfeat.trans.fp import FPVecTransformer; FPVecTransformer(kind=\"ecfp:4\")(smiles)` — `MoleculeTransformer` raises on default config.\n","You're dispatching to the user's Modal account: containers spin up in Modal's\ncloud, on hardware you name in plain terms (gpu\u002Fcpu\u002Fmemory\u002Ftimeout), under\ntheir workspace, on their bill. That's the reason there are\ntwo approval cards rather than one, and the reason the env-setup surface is\na separate kernel rather than something you can call inline from the\ncontrol-plane kernel: each card is the user consenting to a specific,\nbounded use of their credential, and the architecture keeps those grants\nlegible by keeping the surfaces apart.\n\nIf `compute.create('byoc:modal', …)` returns `unknown provider 'byoc:modal'`,\nModal isn't enabled in this install — ask the user to enable it under\n*Settings → Compute → Modal* (or surface the prompt; you can't enable it for\nthem).\n\nFor first-time environment setup, see `env-setup.md` in this skill\ndirectory — it walks through driving the `compute_provider` kernel to\nbuild and record images.\n\n## Two timeouts, one timeline\n\nModal has two deadline timers. Both live INSIDE the sandbox, and neither\ncan cost you the outputs of a job that ran. The timeline every job runs\non:\n\n1. Container life starts at sandbox creation — staging the inputs counts\n   against it, so a big upload spends container time before the job runs.\n2. The job runs. If it exceeds its own budget (the job timeout below), it\n   is TERMed there.\n3. Near end of container life — one harvest margin before the provider\n   destroys the sandbox — the in-sandbox **harvest watchdog** TERMs\n   whatever is still running. It runs on the sandbox's own clock, so a\n   wrong desktop clock or a slow upload can't make it fire late.\n4. After any TERM there is a grace window for checkpoint-on-TERM handlers\n   to flush, then the process group is stopped.\n5. Whatever is under `.\u002Fout\u002F` (plus the logs) is tarred and staged\n   UNCONDITIONALLY — on success, timeout, failure, and crash alike — and\n   harvested back into the workspace. Staging is unconditional; delivery\n   isn't. If the stream is refused or gives up (`result_rejected`,\n   `harvest_failed`), the staged copy waits on the sandbox, and a third,\n   post-job timer — the **idle watchdog** — terminates it after ~30 min\n   of inactivity. See \"When the job fails\".\n\nThe **container timeout** (`provider_params.modal.timeout`) is how long\nthe sandbox lives; omitted, it fills from the Settings default for this\nprovider (*Settings → Compute → Modal*; ceiling: Modal's 24 h platform\nlifetime, minus the staging margins — 85,500 s). The **job timeout**\n(`timeout_seconds` on `submit_job`) is an optional runaway guard for one\njob; omitted, it defaults to the container's remaining life minus the\nharvest margin. Name one when you know the job's budget — a hung job then\ncosts that budget, not the whole container, and the warm container\nsurvives for the next submit.\n\nA deadline-ended job lands as `status: 'timed_out'` — not a generic\nfailure — with its partial outputs already harvested, plus a note saying\nthe deadline (not the workload) ended the run and suggesting the remedy:\na larger `timeout_seconds`, or resuming from a harvested checkpoint. A\ndeadline ends the run, never the results.\n\n## Two surfaces, one provider\n\nYou reach Modal two ways. They share confinement and credentials but answer\ndifferent questions, and confusing them is the most common way to waste a\nturn.\n\n`host.compute.create('byoc:modal', provider_params={'modal': {...}})` is\nthe **job surface**. It runs in the `repl` tool — same as\n`remote-compute-ssh` — and is what you use for anything with\ninputs\u002Foutputs you want harvested into the workspace, anything on a GPU, and\nanything long enough that you'd want to reattach if the daemon restarts. The\ncall itself is a stateless constructor — the **tier card** (provider, image,\n`1× A100-40GB · 8 CPU · 32 GB`, container timeout, volumes) and the actual\nSandbox creation both happen on the first `submit_job()`.\n`submit_job`\u002F`result`\u002F`call_command`\u002F`attach_job`\u002F`close` then work exactly\nas for SSH: `.result()` is **non-blocking** — the daemon's poller probes the\nsandbox, harvests `out.tar.gz` into `hpc\u002F\u003CjobId>\u002F`, and emits a\n`compute_done` notification when done. To wait, exit the cell after\n`submit_job` and use the `wait_for_notification` brain-tool. What reaches\nthe remote is what was in the workspace files you named, and what comes\nback lands under `hpc\u002F\u003CjobId>\u002F` through the same hardened extractor.\n\n`compute_provider({'provider': 'modal', 'code': '…'})` is the **environment\nsurface** — a Python shell with the user's Modal SDK already authenticated,\nrunning in its own confined process. Use it to *prepare* compute: build\ncontainer images JIT in the user's workspace, populate model-weight volumes\nby running the downloads on Modal's own infrastructure (so wide-internet\nfetches never traverse the local allowlist), check what assets already\nexist, run a short CPU smoke probe. Its first cell in a session fires the\n**kernel card** — *\"environment setup — build images, populate volumes, CPU\nprobes ≤30 min; GPU jobs ask separately\"* — and once granted, subsequent\ncells in this kernel's lifetime (idle-timeout ~15 min) run without further\nprompts. The kernel will reject `gpu=` on `Sandbox.create` and clamp\n`timeout` to ≤30 min — the kernel's own probe budget, separate from the\njob surface's container timeout. It's a redirect to the job surface, not\na fence; you've already been handed the credential. **Terminate every\nsandbox you create here** — `sb.terminate()` in the same cell, in a\n`try\u002Ffinally` if you `exec` in between (`build_env`'s hydrate models\nthis). Nothing reaps it mid-session: the idle timeout kills the\n*kernel*, never your sandboxes — the ≤30-min clamp only bounds how long\na forgotten one bills.\n\nThe shape of a good run is: read what's already known about this workspace,\ndecide whether the env you need exists, build it via the `compute_provider`\nkernel if it doesn't, then run the actual job through `compute.create()`.\nThe two cards appear at most once each per session — and on a warm second\nsession with a project-level grant, neither.\n\n\n## Workflow\n\nEvery `host.compute.*` call here runs via the **`repl` tool**; the\n`compute_provider` kernel is reached via the **`compute_provider` tool**.\nNeither is the `python` tool. All three share your workspace directory but\nnot memory — pass data through files.\n\nStart with `compute_details({provider: 'byoc:modal', mode: 'read'})`. Below\nthe orientation line is the per-workspace ledger — `### env:\u003Cname>@\u003Cspec_sha>`\nblocks recording images that already exist in this user's Modal workspace,\nthe volumes they pair with, and any free-text notes a previous session left.\nThe `spec_sha` is the content hash of the env's source file in this binary,\nso a ledger entry whose hash matches is one you can use without rebuilding:\npass its image ref straight to `compute.create()` and the kernel card never\nappears. A mismatch means the env definition changed in this release — the\nold image still works but isn't what the current env file describes, so\ntreat it as absent.\n\nIf what you need isn't in the ledger, build it in a `compute_provider`\ncell. Two helpers are pre-bound there alongside `modal` and `app`:\n\n- `list_envs()` → `{name: META, …, '_envs_dir': path}` for every bundled\n  env (packages, GPU tier, secrets it needs)\n- `build_env(name, *, hydrate=False)` → builds the image, returns\n  `{'image': 'im-…', 'spec_sha', 'volumes', 'env', 'hydrate'}`\n\nTo inspect what an env actually installs (the `modal.Image` chain) before\nbuilding, read the source from the **control-plane kernel** (a `repl`\ncell) — it's a skill asset:\n\n```python\n# repl tool\nprint(host.skills.read('remote-compute-modal', 'envs\u002Fproteomics_jax_gpu.py')['content'])\n```\n\nDon't `find` for it from bash — the path differs across builds.\n\n```python\n# compute_provider tool, provider='modal'\nneed = {'transformers', 'torch'}\nenvs = list_envs()\nprint({n: m for n, m in envs.items()\n       if not n.startswith('_') and need \u003C= set(m.get('packages', []))})\n# → {'proteomics_gpu': {'packages': [...], 'gpu_default': 'A100-80GB', ...}}\n\nr = build_env('proteomics_gpu', hydrate=True)\nprint(r['image'], r['spec_sha'], r['volumes'])\n```\n\nCarry `r['image']` (the `im-…` reference, NOT the env name) back to the\ncontrol-plane kernel (a `repl` cell) and pass it to\n`provider_params.modal.image` — and, for a bundled env, its NAME as\n`provider_params.modal.env`: the host then reads the env's\n`META[\"egress_domains\"]` from the SHIPPED file at every submit, so the\ndeclaration survives rebuilds (a pointer into the shipped catalog, not a\npower). The two kernels share a working directory but not memory, so the\nsimplest handoff is a workspace JSON file:\n\n```python\n# compute_provider tool — last line of the build cell\nimport json; json.dump(r, open('built_env.json', 'w'))\n```\n\nAppend a `### env:\u003Cname>@\u003Cspec_sha>` block to `compute_details` so the\nnext session reads the `im-…` ref straight from there and skips the\n`compute_provider` cell entirely. **Pass `r['image']` (the `im-…` ref) to\n`provider_params.modal.image`.** The adapter will resolve a bare env name\nfrom the ledger as a fallback, but that's brittle — the ledger entry can\nbe stale or absent. Treat the build as its own task with its own validation;\ndon't fold it into a job submission. See `env-setup.md` for ad-hoc patches\nand gated weights.\n\nFor a quick inline call (no inputs, output is just stdout), use\n`submit_job` with no `inputs`. The `compute_done` notification payload\ncarries `status` \u002F `exit_code` \u002F `featured_files`, plus `error_kind`,\n`system_hint`, and `deadline_fired` when set — read those disclosures\nfrom the notification itself (a deadline-truncated rc-0 job announces\npartial outputs there). For `stdout_tail`, re-enter the kernel and read\nit from `.result()` after the notification arrives (`call_command` is SSH-only — it bails on a `byoc:`\nhandle):\n\n```python\n# repl tool — cell ① submits and RETURNS\nimport json\nr = json.load(open('built_env.json'))\nc = host.compute.create('byoc:modal', provider_params={'modal': {\n    'image': r['image'],          # the im-… ref (bare name fallback brittle)\n    'env': 'proteomics_gpu',      # bundled-env NAME → its shipped egress declaration applies\n    'gpu': 'A100',                # timeout omitted → container gets the Settings default\n    'volumes': r['volumes'],\n}})\nj = c.submit_job(\n    intent='load esm2_t6 on GPU',\n    command='python -c \"from transformers import EsmModel; import torch; '\n            'm = EsmModel.from_pretrained(\\\\\"facebook\u002Fesm2_t6_8M_UR50D\\\\\").cuda(); '\n            'print(torch.cuda.get_device_name())\"',\n    timeout_seconds=300,          # job guard — this probe finishes in 5 min or it's hung\n)\nprint('JOB_ID:', j.job_id)   # ← cell ends here; kernel never blocks\n```\n\nThen exit the cell and use `wait_for_notification`. When the\n`compute_done` notification arrives, its payload has `status` \u002F\n`exit_code` \u002F `featured_files`, plus `error_kind` \u002F `system_hint` \u002F\n`deadline_fired` when set. For `stdout_tail`, re-enter the kernel:\n\n```python\n# repl tool — cell ② after the compute_done notification\nprint(c.attach_job('\u003CJOB_ID>').result()['stdout_tail'])  # non-blocking — poller already harvested\nc.close()\n```\n\nFor a full job with inputs and harvested outputs:\n\n```python\n# repl tool — cell ① submits and RETURNS\nc = host.compute.create('byoc:modal', provider_params={'modal': {\n    'image':   r['image'],               # 'im-…' from build_env(); bare-name fallback exists but is brittle\n    'env':     'proteomics_jax_gpu',     # bundled-env NAME → its shipped egress declaration applies\n    'gpu':     'A100-40GB',\n    'cpu':     8,\n    'memory':  32768,                    # MiB — Modal's unit, not GiB\n    'volumes': {'\u002Fcache': 'af2-params'}, # mount path → Modal Volume name\n    'timeout': 3600,                     # container lifetime, seconds — optional; omitted → Settings default; ceiling: Modal's 24 h platform limit\n}})\n# → tier card → Sandbox.create() under the user's workspace → handle bound to sandbox_id\n\njob = c.submit_job(\n    intent='colabfold on target.fasta — 1× A100, ~40 min',\n    command='colabfold_batch target.fasta out\u002F --num-recycle 3 --model-type alphafold2_ptm',\n    inputs=[{'src': 'target.fasta', 'dst_filename': 'target.fasta'}],\n    outputs=['out\u002Franked_0.pdb', {'glob': 'out\u002F*.json', 'visibility': 'featured'},\n             {'glob': '*.log', 'visibility': 'hidden'}],\n    timeout_seconds=2700,                # job guard — optional; default = remaining container life − harvest margin\n)\nprint('JOB_ID:', job.job_id)   # ← cell ends here\n```\n\nThen `wait_for_notification` — the `compute_done` payload includes\n`featured_files`, so you can `save_artifacts(payload['featured_files'])`\ndirectly without re-entering the kernel. If you want the full dict\n(`stdout_tail` \u002F `stderr_tail` \u002F `job_wall_s`):\n\n```python\n# repl tool — cell ② after the compute_done notification\nr = c.attach_job('\u003CJOB_ID>').result()  # non-blocking read of compute_usage.result\nsave_artifacts(r['featured_files'])\nc.close()\n```\n\n`r['job_wall_s']` is the seconds `run.sh` ran on the remote — the actual\nGPU\u002Fcompute duration.\n\n`timeout` is the container's lifetime; `timeout_seconds` guards one job\ninside it. Both are optional: `timeout` fills from the Settings default,\n`timeout_seconds` from the container's remaining life minus the harvest\nmargin. Name a `timeout_seconds` when you know the job's budget — a hung\njob then costs that budget and the warm container survives. At either\ndeadline the job is TERMed, given grace, and its outputs are staged and\nharvested as on success — the job lands as `status: 'timed_out'`\n(deadline-terminated, outputs harvested), not a generic failure.\n\n`inputs=` stage **flat** into the workdir root. `dst_filename` is a bare\nfilename — `'inputs\u002Fgfp.fasta'` is rejected at submit (the file would land\nat `\u002Fwork\u002Fgfp.fasta`, not where the command expects). `src` can be a path;\n`dst_filename` can't. Omit it to default to `basename(src)`. Need a dir\nlayout? `mkdir -p` it inside `command=`.\n\n**Sizing `inputs=` — and when to use a Volume instead.** Inputs are\nstdin-streamed through a confined path at ~0.65–0.81 MiB\u002Fs effective\n(measured) — budget staging time from that: 1 GiB ≈ 20–26 minutes of\nupload before the job starts, spent from container life. The host\nbudgets staging from input size with a planning rate it cannot verify\n(upload speed isn't controllable), so a slower-than-planned upload never\nendangers the harvest — the watchdog's absolute-clock backstop still\nprotects the staging window; the job just gets less runtime than\nnominal. If an upload dies outright, the submit fails LOUDLY with a\ntransport error and no phantom job. Practical sizing: code, configs, and\nsmall data are what `inputs=` is for; it is workable up to its **1 GiB\nper-submit cap** (slow but fine — budget the ~20–26 min of staging near\nthe cap). Anything above 1 GiB is refused at submit time, so beyond it a\nVolume is the only path — and the better one well before that. Volumes\n(Files-tab import, or a `compute_provider` cell; mount via\n`provider_params.modal.volumes`) persist on Modal disks across jobs and\ncost zero upload per submit.\n\n**Checkpoint long jobs as they run.** Write progress to `.\u002Fout\u002F` (or a\nVolume) periodically: at either deadline the workload gets TERM, then a\ngrace window for checkpoint-on-TERM handlers, and whatever is under\n`out\u002F` is staged and harvested unconditionally. A job that checkpoints\nloses at most one interval to a deadline — never the run. Keep `.\u002Fout\u002F`\ncheckpoints SMALL (≈ ≤100 MB compressed): the harvest stream back to the\nhost runs in a bounded (~2 min) window, so a multi-GB `.\u002Fout\u002F` risks\n`harvest_failed` even though staging succeeded — large checkpoints\nbelong on a Volume, with only small summaries under `.\u002Fout\u002F`.\n\n**Only `.\u002Fout\u002F` is harvested.** The wrapper tars `out\u002F` + `stdout.log` +\n`stderr.log` — nothing else. `outputs=` globs are a *post-harvest* filter\n(featured\u002Fhidden), not a what-to-collect directive. If your tool\nwrites to cwd, a Volume mount (e.g. `\u002Fatlas`), or `$HOME`, end `command=`\nwith `cp -r \u003Cresults> out\u002F` (or point the tool's `-o`\u002F`--output` at `out\u002F`).\nA successful job with an empty `out\u002F` returns only the log paths in\n`output_files` plus a `system_hint` telling you so.\n\n`command=` is interpolated into a `run.sh` and run via `bash run.sh`.\nFor anything beyond a single program-with-args — nested quotes, inline\n`python -c \"…\"`, heredocs, pipelines — write the script to a workspace\nfile and ship it via `inputs=`, then `command='bash script.sh'` or\n`command='python script.py'`. Multi-layer shell escaping inside\n`command=` is the most common cause of `syntax error near unexpected\ntoken` failures.\n\n`provider_params.modal` uses **Modal's own kwarg names** — Modal's docs are\nthe docs. The adapter resolves the strings to SDK objects (env name → its\n`im-*` from the `compute_details` ledger; volume name → `Volume.from_name`)\nand passes the rest through to `Sandbox.create(**params)`. An absent\n`timeout` fills from the Settings default before the tier card renders,\nso the card shows the real lifetime. A `timeout` above Modal's 24 h\nplatform cap or out-of-range hardware is rejected with `invalid_request`\nbefore any helper spawns; nothing is silently clamped.\n\n## The image-reference rule\n\n`image` is **always a string**. A `modal.Image` object built in a\n`compute_provider` cell cannot cross to the control-plane kernel — they are\nseparate Python processes under separate confinement invocations, and a live\nSDK handle is meaningless on the other side. So the pattern is:\n\n```python\n# compute_provider tool — env setup (`modal` and `app` are pre-bound)\nimg = (modal.Image.from_registry('nvidia\u002Fcuda:12.4.1-runtime-ubuntu22.04',\n                                 add_python='3.11')\n       .pip_install('chai_lab==0.6.1'))\nimg.build(app)\nprint(img.object_id)          # → 'im-7f3a2e…' — read this string\n```\n\n```python\n# repl tool — job\nc = host.compute.create('byoc:modal', provider_params={'modal': {\n    'image': 'im-7f3a2e…',    # the string, not the object\n    ...\n}})\n```\n\nThe adapter validates an `im-*` literal via `Image.from_id()`, which fails\nclosed on a foreign or fabricated id, so a typo surfaces as `not_found`\nbefore any GPU spins. An env name is looked up in the ledger first\nand resolved to the recorded `im-*`; on a miss the adapter returns\n`image_build_failed` with copy pointing at\n`compute-env-setup` rather than triggering a build inline.\n\n## What latency to expect\n\nMeasured against real Modal during validation — set timeouts and user-status\nmessages from these, not guesses:\n\n| phase | typical | notes |\n|---|---|---|\n| `Image.from_registry(..., add_python=...).pip_install(...).build(app)` | 130–360s | one-time per `im-*`; runs on Modal's CPU build infra, not your tier |\n| `compute.create()` (stateless ctor) | \u003C1ms | just returns a handle — no container, no card |\n| first `submit_job()` on a handle, A100 | ~18–30s cold start + job runtime | creates the container (image pull + boot); raises the tier card |\n| first `submit_job()` on a handle, H100 | ~20–25s + job runtime | similar; queue wait can add when capacity is tight |\n| subsequent `submit_job()` on same handle | ~5–10s + job runtime | reuses the warm container — weights\u002Fcaches stay hot |\n\nSo budget ~3–6 min for a fresh env's first GPU result, and ~5–10s per\nsubsequent `submit_job()` on the same handle. If a first cold start is\npast ~90s, that's queue wait, not a hang — surface it rather than retrying.\n\n## When the user gives you a budget\n\nA user who says \"stay under eight GPUs\" or \"keep it to a hundred at a\ntime\" is giving you a number that the prompt alone can't enforce. You'll\nwrite it into the orchestrator's instructions, but the sub-agents you\ndelegate to start with fresh context — they never see that line, and\neach one will reasonably try to use as much compute as its own task\nseems to warrant. Across a wide fan-out that drifts well past whatever\nthe user had in mind, and the first sign is usually the bill.\n\n`host.compute.set_concurrency_limit(k)` exists so the user's number\nbecomes a property of the session rather than a sentence in a prompt.\nCall it once before delegating; the daemon stores it against the session\nroot, counts every sub-agent's live job against the same `k`, and\nquietly holds any submit that would put the session over (the SDK\nretries with backoff under the hood). Sub-agent code is unchanged — the\nhold sits below `submit_job`, not in the agent.\n\nChoosing `k` has one constraint beyond the user's intent: each provider\nalso has its own ceiling, and that ceiling refuses rather than queues.\nA session limit above it doesn't fail, it just stops being the binding\nconstraint — submits past the provider's own ceiling error instead of\nwaiting. `host.compute.status()` returns both your `k` and the\nprovider ceilings, so you can pick a value that actually queues. When\nthe user hasn't given a number, leaving the limit unset keeps today's\nbehaviour; set one yourself only if a fan-out is wide enough to threaten\nthe provider cap and you'd rather queue than fail.\n\n## Warm reuse, reattachment, and `close()`\n\nOne handle = one container. The first `submit_job()` creates it;\nsubsequent calls reuse it warm (weights\u002FXLA cache stay hot). The poller's\nharvest does **not** terminate the container — it runs until `c.close()`,\n~30 min of inactivity (the sandbox's PID-1 **idle watchdog** — a kill,\nnot a harvest: anything unharvested goes with the container), or its\ncontainer timeout, whichever comes first. Until then a finished — or\nfailed — job's container bills idle. **Every handle ends with\n`c.close()`** — after its last job, not between jobs, and not while its\nsandbox holds the only copy of unrecovered outputs\n(`result_rejected`\u002F`harvest_failed` — see \"When the job fails\"). Close\nonce the final `compute_done` has arrived and the harvest is confirmed;\nif the next job on this handle is imminent, or the user asked to keep\nthe container warm across jobs, leave it open and close when the\nsequence ends. Near end of life the **harvest watchdog** stops any\nrunning job early enough to stage its outputs, so even the last job\ncomes back harvested. A warm container is reused only when its\nremaining life covers the next job's deadline plus margin; otherwise\nthe submit transparently\ncreates a fresh sandbox (one more cold start, same handle) and says so\nin a `[note]` line on the submit result.\n**Sequential only**: each submit wipes `\u002Fwork`, so call job N+1's\n`submit_job()` after job N's `compute_done` notification arrives; for\nparallel jobs use separate handles. A second `create()` with different\n`{gpu, cpu, memory}` is a separate container and a separate card. The\ndetached wrapper survives a Claude Science daemon restart — on restart you'll see\n\"1 job reattached\" rather than a cold start.\n\n**Multiple parallel jobs** (separate handles): submit all in one `repl`\ncell, then loop `wait_for_notification` → act on every entry in\n`notifications` (several may arrive at once) → repeat until it returns\n`{status:'error'}` (= none left). Don't poll `.result()`.\n\n**Before you finish the task**: every handle closed (unless the user\nasked to keep one warm, or its sandbox holds unrecovered\n`result_rejected`\u002F`harvest_failed` outputs), and no sandbox of yours\nstill alive in the `compute_provider` kernel\n(`modal.Sandbox.list(app_id=app.app_id)` shows what's running). Tear\ndown job-surface containers with `c.close()`, never a raw\n`sb.terminate()` — only `close()` consults the host's\nrecoverable-outputs gate. Reserve `sb.terminate()` for sandboxes you\ncreated in the kernel, and only ones you recognise from this session —\nwarm containers from other Claude Science installs share the same app.\n\n## When the job fails\n\nA failed job's container stays up on purpose, so you can fix and\nre-submit warm — but \"stays up\" has a clock on it: the in-sandbox idle\nwatchdog terminates it after ~30 min of inactivity, and reading files\noff it does not reset that clock. If you aren't re-submitting on this\nhandle now, `c.close()` it and diagnose from the harvested tails and\noutputs below — except on `result_rejected` and `harvest_failed`,\nwhere the sandbox holds the only copy of the output; read those\nentries before you touch `close()`. For every other kind, closing\nloses only what the harvest didn't catch (a core dump, a verbose log,\na `residency:'remote'` output) — and `.download()` can't save it here:\nscp is SSH-only and errors on a `byoc:` handle. Read any such file off\nthe live sandbox from a `compute_provider` cell BEFORE you close: find\nit with `modal.Sandbox.list(app_id=app.app_id,\ntags={\"claude-science-job\": \"\u003Cjob_id>\"})` — the tag names the job\nwhose submit cold-started the container: your failed job, unless you\nchained submits on a warm handle (each fresh sandbox announces itself\nin a `[note]` on its submit result) — then `sb.exec(\"cat\", \"\u003Cpath>\")`\nto pull the bytes.\n\nRead `r['exit_code']`, `r['stdout_tail']`, and `r['stderr_tail']`. A job\nthat hit a deadline lands as `status: 'timed_out'` with its partial\noutputs already harvested into `hpc\u002F\u003Cjob_id>\u002F` — check `stdout_tail` for\nprogress and resubmit with a larger `timeout_seconds` (or resume from a\nharvested checkpoint) only if the work was actually cut short. The\nerrors that come back as `kind` rather than a non-zero exit code map cleanly\nonto where to look:\n\n`image_build_failed` — Modal's layer build errored: a yanked PyPI version,\na base-image pull failure, a pin that no longer resolves. The build-log\ntail is in the `compute_provider` cell where you ran `build_env()`; fix the\nenv file and rebuild there. No image reference was produced, so the ledger\nstays clean. If you passed an env name to `create()` without ever building\nit, the name is valid but no image is in the ledger yet — `build_env()` it\nfirst.\n\n`unauthorized` — token rotated or revoked. The `compute_provider` kernel\nwill have already exited on the first 401; the next cell respawns and\nre-reads `~\u002F.modal.toml`, so the user fixing their token is the whole fix.\n\n`quota_exhausted` — workspace quota, concurrent-GPU limit, or spend cap.\nFor the concurrent limit, first free what you hold: `c.close()` finished\nhandles (not one holding unrecovered outputs — see below) and terminate\nkernel sandboxes you're done with — idle warm containers count against\nit. A spend cap isn't freed by closing — accrued spend stays accrued. If\nit still trips, surface the copy verbatim and pause; raising the limit\nis the user's billing decision.\n\n`rate_limited` — a request-rate throttle on the token, not capacity:\nclosing containers frees nothing here. Back off ~60s and stagger\nfan-out submissions, per the copy.\n\n`ownership_mismatch` — another install sharing this workspace token adopted\nthe warm sandbox first. The adapter cold-starts a fresh one; nothing for you\nto do beyond noting the banner.\n\n`result_rejected` (`compressed_cap_exceeded`) — output archive larger than\nthe consented cap. Nothing was written to the workspace and the sandbox is\nstill warm with `out.tar.gz` intact; the user gets a raise-and-retry\naffordance that re-streams without re-running. The sandbox holds the only\ncopy of the output — do **not** `c.close()` until it's resolved, and\nsurface it to the user now, not at end of task: the Compute panel lists\nthe job as recoverable for 24 h, but that listing only blocks\nClaude Science-side kills (a queued `close()` is deferred ~15 min, then\nexecutes) — the in-sandbox idle watchdog still terminates the sandbox\nafter ~30 min of inactivity, only copy included.\n\n`harvest_failed` — the output stream gave up after retries; the warm\nsandbox likewise holds the only copy. Same rule: no `c.close()` until\nthe outputs are recovered — and the recovery path is the user's, not\nyours: they retrieve from the recovery list in the Compute panel\n(`.download()` errors on a `byoc:` handle, and reuse on it is gated).\nSame clocks as above: surface it immediately.\n\n`input_changed` — a submit input was rewritten (or deleted\u002Fswapped) between\nvalidation and staging: the transport re-hashes the bytes it actually\nuploads and compares them to the sha256 captured at validation time.\nNothing was uploaded and the job never started. Re-run `submit_job()` so\nthe input is re-validated; if it keeps tripping, something is still writing\nthat file — wait for the writer to finish before resubmitting.\n\nA plain non-zero `exit_code` with logs is the science tool failing on\ninputs — same diagnosis as on SSH.\n\n## What to record\n\nAfter a successful build, append the `### env:\u003Cname>@\u003Cspec_sha>` block to\n`compute_details` — env-setup.md §\"Recording the result\" has the snippet.\nThat ledger is the durable record; don't also write the same facts to\nmemory. Do NOT record build timings, `validated:` dates, or sha256\nconfirmations — `spec_sha` already encodes staleness and the rest is\nnoise. Gotchas you hit (a documented invocation that failed, a flag you\nhad to add, a quota you bumped into) are worth a free-text line.\n\n## GPU tier reference\n\n| `gpu` value | device | VRAM |\n|---|---|---|\n| `\"A10G\"` | NVIDIA A10 | 24 GB |\n| `\"A100\"` | A100-SXM4-40GB | 40 GB |\n| `\"A100-80GB\"` | A100-SXM4-80GB | 80 GB |\n| `\"H100\"` | H100 80GB HBM3 | 80 GB |\n\nEach bundled env carries a `gpu_default` in its `META` — what its author\nsized for the typical workload. Start there; reach for a bigger tier when\nyou have a concrete reason (the model is documented as needing >40 GB, the\nlast attempt OOM'd), not as a hedge. The approval card shows the tier you\npicked, but the grant is keyed on provider only, so once approved for this\nconversation a tier change doesn't raise a new card — the user is trusting\nyour judgment on sizing after the first approval.\n\n## Volumes\n\nPass `volumes={\"\u002Fweights\": \"\u003Cvol-name>\"}` in `provider_params.modal`. The\nmount is a symlink to `\u002F__modal\u002Fvolumes\u002F\u003Cid>\u002F` — always reference it by the\nmount path, never the resolved target.\n\nThe Files tab lists `byoc:modal` alongside SSH hosts: at `\u002F` it shows\nVolumes as top-level directories, and inside one you can browse, import,\nand download files (same pane as SSH). The path's first segment is the\nVolume's *name*, not a mount path. For scripted listing use a\n`compute_provider` cell:\n`modal.Volume.from_name('\u003Cname>').iterdir('\u002F', recursive=False)`.\n\n## Modal Environment (Settings → Compute → modal → Environment)\n\nOptional, beside the *Default app* setting. A Modal **Environment** is\nthe workspace namespace apps, images, volumes and sandboxes live in —\nwith the app, one of the two coordinates every Modal name resolves\nunder. Claude Science resolves every named object it touches (`App.lookup`,\n`Volume.from_name`) in the configured Environment, and the\n`compute_provider` kernel is started inside it, so `build_env()` \u002F\n`HYDRATE` and an env file's own `modal.Volume.from_name(...)` calls\nland there too. Blank — the default — sends no environment at all and\nModal uses its own default (normally `main`, or whatever\n`~\u002F.modal.toml` says). You cannot set or change it: it is\nhost\u002FUI-written (`compute_providers.modal_environment`), never a\n`provider_params.modal` field (the schema rejects `environment` \u002F\n`environment_name` outright), and the ledger cannot reach it.\n\n### Which Environment and App am I in?\n\nA kernel binds its coordinates at spawn — Environment, app, egress\nposture — and never re-reads them, while the user can change the\nSettings at any time; a change only reaches what gets created next.\n`compute_provider_config()` is how you find out where you actually\nstand:\n\n```python\n# ── compute_provider tool ──\ncompute_provider_config()\n# → {'provider': 'byoc:modal', 'environment': 'team-bio',\n#    'app_name': 'claude-science-default', 'egress_mode': 'allowlist',\n#    'config_hash': '93e1a4c20b7f'}\n\n# …and after the user changes the Environment, Default app or Network\n# Restrictions mode there, the same call:\n# ComputeProviderConfigStale: compute provider config is out of date:\n#   this kernel was started with config 93e1a4c20b7f but the provider\n#   Settings now hash to 4be09f12aa31. Restart the compute_provider\n#   kernel (close it and open a new one) to pick up the new\n#   Environment\u002Fapp\u002FNetwork Restrictions configuration.\n```\n\nCall it before anything expensive. If it returns, trust every value in\nthe dict (`environment: None` means Modal's workspace default;\n`app_name` is already resolved). If it raises, the Settings moved\nafter this kernel started and there is exactly one remedy: close this\n`compute_provider` kernel and open a fresh one, which is born into the\nnew configuration. `build_env()` makes the same check before building,\nso a stale kernel cannot spend twenty minutes on an image in a\nnamespace the next `submit_job()` — which always follows the live\nSettings — will never look at.\n\nSandboxes follow the same birth rule. A fresh `submit_job()` takes the\nSettings of the moment it creates its sandbox; a warm-reuse submit\nkeeps the Environment, app and egress fence its sandbox was born under\n(see *Warm reuse, reattachment, and `close()`*). So a Settings change\n— an egress change included — reaches your next fresh sandbox, never a\nwarm one, and nothing ever moves: images, volumes and running\nsandboxes stay where they were created, reachable again the moment the\nsetting points back.\n\n\n## Network egress from the job sandbox\n\nWhat the job container can reach on the network is a per-provider setting\n(`Settings → Compute → modal → Network Restrictions`), not something you\nchoose per submit. The host stamps it onto every new sandbox as Modal's\n`outbound_domain_allowlist` (or `block_network`). Four states:\n\n- **Not configured** (`NULL`, the default for new connections and for any\n  provider enabled before this setting existed) and **Unrestricted** — the\n  sandbox has open internet. The byoc_submit card shows no egress row.\n- **Allowlist** — the sandbox may only open outbound connections to a\n  list the HOST computes at approval time:\n  `(mirror of the user's local sandbox allowlist ∪ a built-in seed of\n  pull-only wheel indexes — download.pytorch.org, pypi.nvidia.com — when\n  the policy mirrors) ∪ (the policy's extra domains) ∪ (the env's\n  declared domains)`. A `mirror:false` policy is never seeded (it is the\n  user's explicit \"exactly my list\"). The card shows the exact final\n  list (`Egress limited to N domains`) with each part attributed; only\n  portable domain patterns are mirrored (a local bare `*` or interior\n  wildcard is dropped and disclosed, never sent to Modal where it means\n  something else); and when there is no local allowlist to mirror\n  (network isolation off or unavailable) the resolution is unrestricted\n  and the card says so. Two hosts are never seeded:\n  `storage.googleapis.com` (hydrate the weights volume instead) and the\n  write-capable Hugging Face hub\u002FCDNs — an env that pulls from HF at\n  job time declares `huggingface.co` + `*.hf.co` itself.\n- **No network** — the user chose to create every new job sandbox with\n  `block_network`: *all* outbound connections refused. This is a kill\n  switch, decided before any allowlist input is even read. The env's\n  `egress_domains` \u002F the ledger's `egress:` line are **ignored** under\n  it — there is deliberately no channel, yours or an env's, that can\n  open a hole in it — and the card says\n  \"all outbound network is blocked (provider policy: No network)\".\n\nYou influence exactly one input to that merge: which env declaration\napplies. `META[\"egress_domains\"]` is the list of hosts the env's\n*documented job-time commands* need (e.g. `api.colabfold.com` for the\ndefault ColabFold MSA server). For a **bundled** env, pass its NAME as\n`provider_params.modal.env` (or let the `### env:` ledger block name\nit): the host reads the declaration from the SHIPPED file, so it\nsurvives every rebuild and can only select among shipped, reviewed\nsets. For an **ad-hoc** env (`build_env(path=…)`), record the `egress:`\nledger line (see `env-setup.md`); that text is agent-written, so the\nhost re-validates and caps it. Either way it is a **request the user\nalways sees, never an authority** — it lands on the card as\n`(+K declared by this env)`, and a standing \"always allow\" grant never\nskips a card that carries env-declared domains. Declare the exact\njob-time hosts only (`HYDRATE` runs in the `compute_provider` kernel,\noutside the fence), and you cannot set or widen the policy itself:\n`provider_params` rejects `egress_allowlist` \u002F\n`outbound_domain_allowlist` outright and `compute_details` cannot reach\nthe column.\n\n### Skill-driven jobs and the fence\n\nA skill is just commands inside a fenced sandbox: every host its\ndocumented flow dials at job time either rides the merge above or dies\nas a connection reset. So declare an env's job-time hosts (its\n`META[\"egress_domains\"]` \u002F the ledger's `egress:` line) BEFORE the\nfirst submit, and move big one-time fetches — weights, checkpoints,\nsequence databases — out of the job entirely: bake them at image build\nor stage them from the `compute_provider` kernel into a Volume, neither\nof which is fenced (`env-setup.md` → *\"Tool recipes that survive the\negress fence\"* has the runnable recipes). *Settings → Compute → modal →\nNetwork Restrictions → Additional domains* is the user-side fallback for\na fetch that truly must happen inside the job.\n\n### Knowing the policy, and reading a network failure\n\nYou never have to guess what a job is allowed to reach, because the host\ntells you twice — three times when a `compute_provider` kernel is open:\n`compute_provider_config()['egress_mode']` there names the mode the\n*next* sandbox will be created under, before any submit spends a card.\nAt submit time the reply carries an `egress` line and\n`submit_job` prints it — `[egress] sandbox egress at creation: allowlist\n(2 domains; mirror off; +0 from the env)` — and the same string lives on\nthe handle as `job.egress`. That line describes the sandbox for its whole\nlife: the policy is captured when the sandbox is created, so what you see\nthere is what every command in that job runs under, no matter what the\nSettings screen says five minutes later. Then, if the job's output ends up\ncarrying connection-level failures and the sandbox was fenced, the result\nand the `compute_done` notification carry a second host-authored line\nstarting with `[egress]` that names the policy, its size, and the remedy.\nBoth lines are written by the host from the policy it actually enforced —\nthey are evidence you can repeat to the user verbatim, not something you\nhave to infer.\n\nKnowing how a fence fails is what lets you attribute instead of flail.\nModal's allowlist is a TLS\u002F443 SNI filter, so it never answers at the\nHTTP layer; everything it refuses dies below that, and each spelling\ntells you which rule you hit. These are the shapes we observed live, not\ntheory:\n\n| what the output says | under an allowlist it means | under No network it means |\n|---|---|---|\n| `Connection reset by peer` \u002F `ECONNRESET` on an `https:\u002F\u002F` URL | the host is not on the sandbox's list | (everything already fails earlier, at DNS) |\n| `Network is unreachable` \u002F `ENETUNREACH` | the request was not TLS on port 443 — plain `http:\u002F\u002F`, a non-443 port, or a raw socket — and the filter refuses those even for an *allowed* domain | no route to anything |\n| `Temporary failure in name resolution` \u002F `EAI_AGAIN` \u002F `Could not resolve host` | rare under an allowlist (DNS itself is up) | the normal shape: there is no DNS and no network at all |\n\nA `4xx`\u002F`5xx`, on the other hand, means the host *was* reachable and\nanswered; that is an application problem, not the policy.\n\nThe fix depends on the failure class, and the `[egress]` hint names the\nsuspect host (when the output names one) and the remedy. A host that\nsimply isn't listed: ask the user to add exactly that name under\n*Settings → Compute → modal → Network Restrictions → Additional domains*\n(or, for an env's documented commands, declare it in\n`META[\"egress_domains\"]`). A non-TLS \u002F non-443 failure (`apt-get`, an\n`http:\u002F\u002F` mirror, a raw socket): no allowlist edit can fix it — use\nHTTPS or do that install at image-build time, which is not fenced.\n`storage.googleapis.com` during a lazy weights download: hydrate the\nenv's volume from the `compute_provider` kernel instead of opening the\nworld's most general bucket host. Under *No network* there is nothing to\nadd by design. Every policy is read only when a sandbox is **created**,\nso resubmit on a **fresh handle** — retrying in (or warm-reusing) the\nfailed sandbox repeats the failure byte for byte.\n\nThree moves look productive here and are not. Retrying the same command\nin the same sandbox cannot succeed, because nothing inside a sandbox can\nchange its policy. Asking the user to switch to *Unrestricted* because\none domain is missing trades their whole egress posture for a one-line\nallowlist edit — name the domain instead. And probing from inside the\njob (\"let me curl a few sites to test the network\") only reproduces the\nfailure you already have; the `[egress]` line and `job.egress` already\ntell you the policy without spending a container on it.\n\nTwo Modal-side caveats worth knowing before you debug \"the network is\nbroken\": Modal documents `outbound_domain_allowlist` as a **Beta**\nfeature, and it filters by TLS SNI, so it applies to **TLS on port 443\nonly** — once an allowlist is set, plain-HTTP and non-443 traffic from\nthe sandbox is refused regardless of the domain (we verified this live:\n`http:\u002F\u002Fexample.com` is refused even with `example.com` on the list). A\ntool that fetches over `http:\u002F\u002F` will fail under any allowlist even if\nits host is listed; the fix is the tool's HTTPS endpoint, not a wider\nallowlist.\n\n## Common env gotchas\n\nThese are tool-level quirks, not architecture — things the bundled env files\nalready handle but that bite when you're writing an ad-hoc env or debugging\na job that should have worked.\n\n- **`Volume.from_name(...)` returns a lazy handle** — `vol.object_id` raises `AttributeError: unhydrated` until the volume is mounted into a `Sandbox.create(volumes={...})`. Don't try to read it; record the volume *name* (that's what `provider_params.modal.volumes` takes anyway).\n- **rdkit** (deepchem, molfeat, aizynthfinder): needs `apt_install(\"libxrender1\", \"libxext6\")` or `rdkit.Chem.Draw` import fails on `libXrender.so.1`. The `chemistry_gpu` env includes these.\n- **dgl** CUDA wheels live at `data.dgl.ai`, not PyPI. `envs\u002Fproteomics_rfd_diffdock_gpu.py` shows the `find_links=` pattern.\n- **DestVI** is `scvi.model.DestVI`, not `scvi.external.DestVI` (moved in scvi-tools ≥1.0).\n- Small model weights (esm2_t6_8M, bert-tiny) auto-download to `\u002Froot\u002F.cache` on first use — fine for smoke; for repeated jobs hydrate a Volume once.\n- **Volume + `TORCH_HOME` path**: torch.hub appends its own `hub\u002F` subdir. If you mount the volume at `\u002Fweights` and want torch to find checkpoints there, set `TORCH_HOME=\u002Fweights` (torch then reads `\u002Fweights\u002Fhub\u002Fcheckpoints\u002F`). Setting `TORCH_HOME=\u002Fweights\u002Fhub` makes it look at `\u002Fweights\u002Fhub\u002Fhub\u002F` and re-download.\n- **molfeat**: use `from molfeat.trans.fp import FPVecTransformer; FPVecTransformer(kind=\"ecfp:4\")(smiles)` — `MoleculeTransformer` raises on default config.\n",{"name":5,"license":15,"description":7},"main","e71245365df78e06cd166602744bf2491f79910e","research-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal",0,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS","https:\u002F\u002Fpengqianhan.github.io\u002FAI-Human-Research-OS\u002F","https:\u002F\u002Fgithub.com\u002Fpengqianhan","Ph.D. candidate of The University of Auckland, New Zealand","2026-11-14 18:08:16",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add pengqianhan\u002FAI-Human-Research-OS --skill remote-compute-modal",{"tool":39,"command":40},"bunx","bunx skills add pengqianhan\u002FAI-Human-Research-OS --skill remote-compute-modal",{"tool":42,"command":43},"pnpm","pnpm dlx skills add pengqianhan\u002FAI-Human-Research-OS --skill remote-compute-modal","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal\u002FSKILL.md",true,[47,53,59,63,67,71,75,79,83,87,91,95,99],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"env-setup.md","REFERENCE","参考文档",14431,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal\u002Fenv-setup.md",{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"envs\u002Fchemistry_gpu.py","SCRIPT","脚本",1080,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal\u002Fenvs\u002Fchemistry_gpu.py",{"path":60,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":61,"sourceHtmlUrl":62},"envs\u002Fesmfold2_gpu.py",7122,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal\u002Fenvs\u002Fesmfold2_gpu.py",{"path":64,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":65,"sourceHtmlUrl":66},"envs\u002Fgenomics_evo2_gpu.py",2968,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal\u002Fenvs\u002Fgenomics_evo2_gpu.py",{"path":68,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":69,"sourceHtmlUrl":70},"envs\u002Fproteomics_boltz_gpu.py",2272,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal\u002Fenvs\u002Fproteomics_boltz_gpu.py",{"path":72,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":73,"sourceHtmlUrl":74},"envs\u002Fproteomics_gpu.py",3198,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal\u002Fenvs\u002Fproteomics_gpu.py",{"path":76,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":77,"sourceHtmlUrl":78},"envs\u002Fproteomics_jax_gpu.py",2782,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal\u002Fenvs\u002Fproteomics_jax_gpu.py",{"path":80,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":81,"sourceHtmlUrl":82},"envs\u002Fproteomics_openfold_gpu.py",5218,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal\u002Fenvs\u002Fproteomics_openfold_gpu.py",{"path":84,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":85,"sourceHtmlUrl":86},"envs\u002Fproteomics_rfd_diffdock_gpu.py",5144,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal\u002Fenvs\u002Fproteomics_rfd_diffdock_gpu.py",{"path":88,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":89,"sourceHtmlUrl":90},"envs\u002Fsinglecell_gpu.py",4564,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal\u002Fenvs\u002Fsinglecell_gpu.py",{"path":92,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":93,"sourceHtmlUrl":94},"provider.json",409,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal\u002Fprovider.json",{"path":96,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":97,"sourceHtmlUrl":98},"provider.py",39816,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal\u002Fprovider.py",{"path":100,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":103,"sourceHtmlUrl":104},"requirements.lock","OTHER","其他",72112,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fclaude-science-skills\u002Fskills\u002Fremote-compute-modal\u002Frequirements.lock",[106,114,121,128,135,142],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":110,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":19},"01M74MWYTHT498SVMN823896T7","workflow-skill-creator","Distills a completed user workflow or interaction into a reusable agent skill. Use when the user asks to turn their workflow, interaction, or multi-step process into a skill, or when they say \"make this a skill\", \"create a skill from what we just did\", \"package this workflow\" or similar. Do not use for creating skills from scratch without an existing workflow (use a generic skill-creator for that).","MIT","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Fworkflow_skill_creator\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":110,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":19},"01M74MWWVCFZ8HQS8840F1V1FT","uv","Checks whether the uv Python package manager is installed and installs it if missing. Ensures uv is on PATH. Use when another skill requires uv as a prerequisite.","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Fuv\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":110,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":19},"01M74MWRH5BTSWZ2C5PCTD5FV9","uniprot-database","Access protein metadata, function, taxonomy, and sequences across UniProtKB, UniParc, and UniRef. Use when searching for proteins, mapping identifiers, or retrieving functional annotations and publications. Don't use for sequence alignment, protein folding, or sequence similarity search (use specialized skills for those tasks).","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Funiprot_database\u002FSKILL.md",[],[],{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":110,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":19},"01M74MWN1D3ER9F1FZPWH8HQC1","unibind-database","Queries the UniBind database for experimentally validated transcription factor (TF) binding sites. Use when retrieving direct TF-DNA interaction datasets, downloading binding site coordinates (BED\u002FFASTA) for local analysis, or listing available datasets by species, cell line, or TF name. Don't use to query specific intervals, locations, genes, motif models or expression data.","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Funibind_database\u002FSKILL.md",[],[],{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":110,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":19},"01M74MWHHB5QZY3NR2FYA1EK4N","ucsc-conservation-and-tfbs","Fetch Evolutionary Conservation scores (phyloP, phastCons) and Transcription Factor Binding Sites (TFBS) from the UCSC Genome Browser. Use when analyzing whether genomic variants or regions are evolutionarily conserved, functionally important, or bounded by TF regulators across major projects (ENCODE, JASPAR, ReMap).","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Fucsc_conservation_and_tfbs\u002FSKILL.md",[],[],{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":110,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":19},"01M74MWERYHSY87P21FDMVE6BA","string-database","Query the STRING database for protein-protein interactions (PPIs), functional enrichment, and homology. Use when the user asks about interactions between specific proteins, interaction evidence, confidence scores, protein interaction partners, or pathway enrichments.","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Fstring_database\u002FSKILL.md",[],[]]