agentleFS
fmindfmind/dotfiles/skills/colab/SKILL.md

colab

Skill13 starsChanged 4 days agoMITView on GitHub

Run code on Colab GPUs or TPUs and track compute units.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • fmind/dotword for word, first seen Nov 8, 2026

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use colab to inspect existing sessions or run work on an accelerator the workstation lacks.

    line 15
  2. Very specific:

    Check colab version and installed help, then use colab --auth adc sessions and colab --auth adc status.

    line 23
  3. Very specific:

    Use colab --auth adc usage for compute-unit rate and balance.

    line 25
  4. Distinctive:

    Follow this workflow only when remote execution is in scope.

    line 29
  5. Very specific:

    Treat the VM as disposable: keep secrets off the session beyond what the task needs.

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Google Colab CLI

Use colab to inspect existing sessions or run work on an accelerator the workstation lacks. The official Colab skill documents every command; this skill owns provider selection, session hygiene, and the spend boundary.

Authentication

Pass the global --auth adc or --auth oauth2 before every subcommand: CLI 0.7.5 defaults to OAuth, so do not rely on implicit defaults or upstream main. ADC reuses credentials from gcloud; for user ADC, run dot login colab, which requests the configured ADC grant only when it lacks the Colab scopes and verifies session access (--dry-run previews the native commands; the authentication guide owns its scopes and semantics). Session state lives under ~/.config/colab-cli/. Examples assume ADC; substitute oauth2 for an existing OAuth profile.

Inspect without allocating

Check colab version and installed help, then use colab --auth adc sessions and colab --auth adc status; they synchronize session metadata without allocating or stopping a VM. Check authentication diagnostics before interpreting an empty listing as success.

Use colab --auth adc usage for compute-unit rate and balance; if it is unavailable, report a missing capability instead of allocating a VM. colab pay opens a purchase page and is not a balance query. Session inspection does not require new, run, exec, or stop.

Run accelerator work

Follow this workflow only when remote execution is in scope; establish the authorized accelerator, duration, and budget before allocation.

  1. Prefer ephemeral runs for self-persisting scripts: colab run rents a VM, runs the script, and attempts to release it. Save needed artifacts to an authorized durable destination before the script exits; local VM files disappear on release. Use an explicitly managed session when artifacts must be downloaded afterwards. A shebang #!/usr/bin/env -S colab --auth adc run --gpu T4 --timeout 3600 supports single-file execution per python-script.

    colab --auth adc run --gpu T4 --timeout 3600 train.py
  2. Keep a session only while iterating: colab --auth adc new -s <name> --gpu L4 (or --tpu v6e1), then colab --auth adc exec -s <name> -f snippet.py --timeout 600. Use upload, download, ls, status, and log with the same provider; verify and retrieve needed artifacts before stopping.
  3. Stop what you started and verify release: colab --auth adc stop -s <name>, then refresh colab --auth adc sessions; an idle session keeps consuming compute units. CLI 0.7.5's ephemeral cleanup suppresses release errors, so a successful run exit or “Session terminated” message is not release proof. Check authentication diagnostics and the backend listing before reporting cleanup complete.

Gotchas

  • Override the 30-second default: colab run and colab exec abort code execution after 30 seconds unless --timeout <seconds> covers the whole job.
  • Let Colab pick the kernel client: google-colab-cli 0.7.5 pins jupyter-kernel-client==0.9.0; let Colab select its compatible client instead of adding a conflicting mise with override.
  • Treat allocation side doors as spend: colab ssh creates a VM when no session exists or the -s session is missing, and colab run --keep skips the release, so both need the same authority as colab new; colab pay opens the compute-units purchase page.
  • Keep the client log private: google-colab-cli 0.7.5 writes short-lived Google access tokens into ~/.config/colab-cli/colab.log (mode 0644); never read it into context, attach it, or quote it, and count matches instead of printing lines when diagnosing.
  • Treat the VM as disposable: keep secrets off the session beyond what the task needs; use colab drivemount only when Drive data is required.

Official Skills

Upstream: googlecolab/google-colab-cli, the same source colab skill prints. Follow the shared vendor-skill policy and select only the Colab workflow needed by the project.

Documentation

  • Colab CLI
  • Releases: google-colab-cli tags
  • ML workflows: python-mlops owns data validation, training, experiments, and model delivery.
  • Companion skills: kaggle, hf, python-script, gcloud.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.