shinshin86/aituber-onair/connect-colab-local-llm
Claude Code and agent skill by shinshin86/aituber-onair
- community
Checking that the SKILL.md file is still in the repository.
Launch vLLM or llama.cpp as an OpenAI-compatible Chat Completions server on Google Colab through Colab MCP Go, issue a temporary trycloudflare URL with cloudflared, and verify it with the @aituber-onair/chat compatibility probe and an AITuber OnAir Core React sample. Use when requests mention running vLLM, serving a GGUF model with llama.cpp, connecting a Colab local LLM to Core, testing an OpenAI-compatible Colab endpoint, cloudflared Quick Tunnels, or operating Colab MCP Go for local LLM development.
Install
npx vskill@latest install shinshin86/aituber-onair/connect-colab-local-llmSKILL.md
Connect Colab Local LLM
Goal
Use Colab MCP Go to launch a user-selected local LLM backend on Google Colab, expose its OpenAI-compatible API safely, and prove that it works through the same @aituber-onair/chat and Core paths used by AITuber OnAir.
Use the implemented vLLM adapter for native Hugging Face generation checkpoints and the implemented llama.cpp adapter for GGUF artifacts. Keep other backends candidate-only until their endpoint, request and response shapes, streaming behavior, authentication, and model-specific options have been documented and live-verified.
Inputs
Collect or infer:
backend: defaultvllm; inferllama.cppwhen the requested artifact is
GGUF
model_id: required Hugging Face model id or accessible model pathserved_model_name: default tomodel_idmodel_revision: optional tag or commit; prefer one for reproducible runsvllm_version: default0.25.1cuda_variant: infer from the current official release assets and Colab
driver; the initial live-validated A100 path uses cu129
llama_cpp_revision: default to the last live-validated revision recorded
in references/llama-cpp.md; change it only after checking upstream support and recording the resolved commit
gguf_filename: required for a multi-file GGUF repository; infer it only
when the repository exposes one unambiguous artifact
core_example: defaultreact-pngtuber-apptest_prompt: short Japanese prompt for the final Core checkcloudflared_version: default2026.7.3; update only after checking the
official release and rerunning the public streaming probe
exposure: defaultpublicfor Colab-to-Core; uselocalonly for
notebook-internal diagnostics
- optional vLLM settings:
dtype,quantization,max_model_len, and
gpu_memory_utilization
- optional llama.cpp settings:
context_size(default4096),
n_gpu_layers (default 99 on NVIDIA), and parallel (default 1)
trust_remote_code: defaultfalse; enable only when the model requires it
and the user accepts the risk
The user handles Google login, GPU runtime selection, gated-model license acceptance, and HF_TOKEN when required. A cloudflared Quick Tunnel needs no Cloudflare account or tunnel token.
Procedure
- Read
skills/connect-colab-local-llm/references/backends.mdbefore choosing
the backend, cloudflared version, install command, or model-specific flags. When backend=llama.cpp, also read skills/connect-colab-local-llm/references/llama-cpp.md. When the user asks how to invoke this workflow or wants a copy-paste request, read skills/connect-colab-local-llm/references/request-examples.md.
- Confirm Colab MCP Go is available.
- Use
open_colab_browser_connectionwhen no Colab session is connected. - Then call
list_colab_tools. - Do not assume exact remote tool names. Select the available tools that can
inspect, create or replace, run, and monitor notebook cells.
- Inspect the Colab runtime before installing anything.
- Record GPU name, VRAM, driver/CUDA information, Python version, and free
disk space.
- Stop when there is no supported accelerator.
- Compare model size and quantization with the available VRAM. Do not rely
on model download success as proof that it will fit.
- Resolve prerequisites without exposing secrets.
- Read
HF_TOKENand optionalAITUBER_LLM_API_KEYfrom Colab Secrets. - Never put real tokens in notebook source, repository files, issue text, or
final reports.
- Do not require the user to provision an LLM API key. Generate a random
per-session key automatically before any public tunnel opens when AITUBER_LLM_API_KEY is absent.
- Authentication may be omitted only while the server remains bound to
loopback for notebook-internal diagnostics.
- Ask the user to provide missing gated-model credentials in Colab Secrets
instead of requesting the token value in chat.
- Install the selected backend without replacing the Colab system
environment.
- For vLLM, install a pinned release in a dedicated virtual environment.
Prefer the official uv flow and an explicit compatible CUDA wheel.
- For llama.cpp, clone the pinned revision and build
llama-serverwith
GGML_CUDA=ON. Record the resolved commit and build options.
- For GGUF, download the exact requested file and verify its
GGUFmagic,
byte size, and SHA-256 against the official hosting metadata before loading it.
- Do not silently replace the Colab system PyTorch or CUDA stack. Inspect
compatibility failures before changing versions or CUDA variants.
- Start the selected backend on
127.0.0.1.
- Require API-key authentication for public exposure. A loopback-only
diagnostic server may omit it.
- For vLLM, pass the key through
VLLM_API_KEYand set
--served-model-name explicitly.
- For llama.cpp, pass the key through
LLAMA_API_KEY. Use router mode with
a pinned INI preset, --no-models-autoload, and the preset section name equal to served_model_name. Do not use single-model mode for the final probe because it accepts unknown model names.
- Write output under
/content/aituber-local-llm/logs/using a
backend-specific filename.
- Redact known secrets before displaying any log excerpt. Do not print the
full command environment or process environment.
- Start the server in its own process group so cleanup stops API and engine
worker processes together.
- Add optional flags only when justified by the selected model, backend
documentation, or available VRAM.
- Do not enable arbitrary remote code by default.
- Wait for local readiness before opening a tunnel.
- Confirm the server process is alive.
- Confirm
GET /health. - Confirm authenticated
GET /v1/modelsreturnsserved_model_name. - On failure, inspect the selected backend log tail before changing
settings.
- Open a cloudflared Quick Tunnel.
- Download the pinned official
cloudflaredLinux binary and record its
resolved version.
- Start `cloudflared tunnel --url http://127.0.0.1:<port>
--no-autoupdate` in its own process group.
- Extract the temporary
https://...trycloudflare.comURL from its log. - Do not require a Cloudflare account, tunnel token, or custom domain.
- Cloudflare's documentation warns that Quick Tunnels do not support SSE,
even though cloudflared 2026.7.3 passed live vLLM and llama.cpp streaming probes. Therefore rerun the public SSE probe for every session and never infer compatibility from a previous run.
- Treat every public URL as temporary and sensitive. Keep backend API-key
authentication enabled while the Quick Tunnel is running.
- Print only the connection handoff needed by the user:
- endpoint:
https://<public-host>/v1/chat/completions
- model:
served_model_name - API key: the temporary per-session key
- server and tunnel process identifiers or cleanup instructions
- Validate the public endpoint in increasing scope.
- Confirm a Chat Completions request without the backend API key is
rejected.
- Confirm authenticated
GET /v1/models. - Confirm a non-streaming
POST /v1/chat/completions. - Confirm streaming returns incremental SSE deltas through the tunnel.
- Send a browser-style CORS preflight with
Origin,
Access-Control-Request-Method: POST, and requested authorization,content-type headers.
- Run the repository compatibility probe.
- Build
@aituber-onair/chat. - Use the exact public
/v1/chat/completionsendpoint. - Set
COMPAT_ERROR_MODELto an intentionally nonexistent model. - Keep
COMPAT_STREAM=true; a skipped or failed streaming check does not
satisfy the Core acceptance criteria.
- Validate one Core React sample.
- Start the selected sample using its documented development command.
- In LLM settings, select OpenAI-Compatible and enter the full endpoint,
exact served model name, and temporary API key.
- Send
test_promptand confirm the response appears incrementally in the
browser.
- Inspect the browser console and network request if the UI does not
update.
- Report versions, GPU, model, tunnel type, probe results, Core sample, and
remaining limitations. Then stop the server and tunnel unless the user explicitly asks to keep the Colab session running.
Compatibility Probe
Run from the repository root:
The required probe covers non-streaming, SSE streaming, conversation history, long input, intentional 4xx handling, and timeout handling. A passing probe is necessary but not sufficient; complete the browser-based Core check too.
Acceptance Criteria
Complete the task only when:
- the chosen backend and exact version are recorded
- the model fits the selected Colab runtime and reaches ready state
- the public Chat Completions endpoint requires a non-default API key
/v1/models, non-streaming chat, SSE streaming, and CORS preflight pass- all required compatibility-probe checks pass
- one Core React sample receives and displays a streamed response
- no token, temporary endpoint, notebook secret, or machine-specific path was
written to the repository
If only a non-streaming Quick Tunnel check succeeds, report a partial result. Do not describe it as Core-compatible or silently switch to another tunnel.
Failure Modes
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/connect-colab-local-llm/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/shinshin86/aituber-onair/connect-colab-local-llm)