colab-operator
БесплатноБез исполняемых скриптовНе проверенOperate Google Colab GPU/TPU runtimes from any coding agent via `colab-account` and `google-colab-cli`. Use when provisioning remote Colab GPUs or TPUs (`T4`…
от ma08★ 31 звезда на GitHubОб этом скилле
Colab Operator (colab-account + google-colab-cli)
Operate remote Google Colab runtimes non-interactively across Codex, Claude Code, and Antigravity using the keyring-free colab-account wrapper in botfiles/bin.
Always Use colab-account, Not Bare colab
Bare colab defaults to --auth=oauth2, which uses Linux SecretService / macOS Keychain (blocking or failing in headless/SSH agent sessions), or --auth=adc against global ~/.config/gcloud/application_default_credentials.json.
Instead, always invoke colab-account <alias> ...:
- Default personal account:
personal(<personal-email>, Google One AI Pro 5TB). - Isolated credentials:
~/.config/colab-cli/accounts/<alias>.json(0600), routed viaGOOGLE_APPLICATION_CREDENTIALSand--auth=adc. Never touches existing machinegcloudconfigs or work accounts. - Isolated session state:
~/.config/colab-cli/account-state/<alias>/sessions.json. - List configured aliases:
colab-account --list
Zero-Burn Inspection Commands (Start Here)
colab-account personal whoami # Verify email, scopes, and token expiry
colab-account personal ccu-info # Balance, hourly burn rate, active count, eligible GPUs/TPUs
colab-account personal ccu-info --json
colab-account personal usage # Standard CLI balance/rate summary
colab-account personal sessions # List live server-side assignments (auto-prunes stale local state)
Compute Routing: Local GPU (Research-GPU-01) vs Colab
- On
Research-GPU-01(two local A100 80GB GPUs), prefer local compute when appropriate and coordinated with ZON-389/active workload owners. - Use Colab for:
- Running GPU/TPU workloads from
sourya-macorresearch-cpu-01without SSHing jobs onto the shared GPU host. - TPU workloads (
v5e1,v6e1) unavailable locally. - Disposable, isolated experiments, quick Colab notebook compatibility checks, or overflow capacity when local GPUs are busy.
- Running GPU/TPU workloads from
Verified Account Entitlements (<personal-email>, Google One AI Pro 5TB)
Observed baseline on 2026-11-25 (500.00 monthly CCU balance):
- Eligible GPUs:
T4(1.24 CCU/hr, 15 GB VRAM, 2 vCPU / 12.7 GiB RAM),L4(2.33 CCU/hr, 22.5 GB VRAM, 12 vCPU / 53 GiB RAM),G4,A100(G4andA100are tier-eligible; allocation depends on real-time regional pool capacity and may return503 Service Unavailablewhen busy). - Eligible TPUs:
V5E1,V6E1. - Ineligible GPUs:
H100(listed inineligibleGpus; backend returns400 Bad Request). - Unsupported flags:
--high-memmay require Colab Pro+ or be ignored for single-shape accelerators (L4,v5e1,v6e1).
Standard Execution Lifecycle (Agent-Safe)
In google-colab-cli 0.8.0, colab run can occasionally hit an initial WebSocket race (RuntimeError: Connection was lost.) immediately after VM allocation, and raw colab stop lacks --all. Follow this reliable lifecycle:
1. Provision with an explicit session name
colab-account personal new -s my-job --gpu T4
# Supported --gpu: T4, L4, G4, A100 (H100 ineligible on AI Pro)
# Supported --tpu: v5e1, v6e1
Always pass -s <name>. If new fails with 503 Service Unavailable on A100/G4, fall back to --gpu L4 or --gpu T4.
2. Run code (kernel state persists across exec calls)
colab-account personal install -s my-job torch transformers
colab-account personal exec -s my-job -f train.py
colab-account personal exec -s my-job --env DATA_SPLIT=val -f eval.py
echo 'import torch; print(torch.cuda.get_device_name(0))' | colab-account personal exec -s my-job
- Default remote working directory is
/content. - Kernel variables, imports, and filesystem state in
/contentpersist acrossexeccalls untilstoporrestart-kernel. - Use
colab-account personal run --gpu T4 script.pyonly when you specifically want one-shot ephemeralnew + exec + stop(note: if0.8.0raisesConnection was lost, usenew+exec+stopinstead).
3. Transfer files or run shell commands
colab-account personal upload -s my-job local_data.csv /content/local_data.csv
colab-account personal ls -s my-job /content
colab-account personal download -s my-job /content/output.pt ./output.pt
colab-account personal ssh -s my-job -- 'nvidia-smi' </dev/null
For multi-line shell commands when SSH is unavailable or throttled (HTTP 429), use %%bash via colab-account personal exec -s my-job.
4. Mandatory Teardown (Never Leave Idle VMs)
Idle runtimes keep burning CCUs (1.24+ CCU/hr). Always stop and verify Active assignments: 0:
colab-account personal stop -s my-job
# Or tear down every local + orphaned server session via wrapper helper:
colab-account personal stop --all
colab-account personal sessions
colab-account personal usage
Parallel Agent Isolation
If multiple agents share the same alias concurrently, isolate local session state with `COLAB_SESSION_CONFIG=/path/to/scr
Установить colab-operator в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл colab-operator?
Operate Google Colab GPU/TPU runtimes from any coding agent via `colab-account` and `google-colab-cli`. Use when provisioning remote Colab GPUs or TPUs (`T4`, `L4`, `G4`, `A100`, `v5e1`, `v6e1`), running Python scripts or notebooks remotely, checking compute-unit balance (`ccu-info`), transferring files, or cleaning up Colab sessions across Codex, Claude Code, and Antigravity.
Как установить скилл colab-operator?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл colab-operator запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic