{"slug": "tpu-management-a-claude-code-skill-for-running-gemma-4-on-cloud-tpus", "title": "tpu-management: a Claude Code skill for running Gemma 4 on Cloud TPUs", "summary": "A developer has created tpu-management, a Claude Code skill and MCP server that automates the full lifecycle of serving Gemma 4 on Google Cloud TPUs, from zone selection and VM creation to benchmarking and teardown. The tool packages hard-won operational details such as boot disk sizing, quota handling, and vLLM flags into a set of ~40 tools, enabling natural-language commands like \"Find me a v6e-1 with available quota and serve gemma-4-12B on it.", "body_md": "Getting a Gemma 4 model serving on a Cloud TPU involves a surprising amount of ceremony: finding a zone that actually has v6e capacity, requesting flex-start VMs, sizing boot disks, wiring Hugging Face tokens through Secret Manager, picking the right vLLM flags for TPU, and remembering to tear everything down before the billing meter embarrasses you.\n\nI packaged all of that into ** tpu-management** — a Claude Code skill plus an MCP server (\n\n`tpu-devops`\n\n) — so you can just ask Claude to do it.The skill teaches Claude the full TPU serving lifecycle, and the MCP server gives it ~40 tools to execute it:\n\n`find_tpu`\n\n), check dimensioned quotas (`get_zones_with_available_quota`\n\n), estimate cost before creating anything.`vllm/vllm-tpu:nightly`\n\n, fetches the HF token from Secret Manager, and serves the model automatically.`analyze_cloud_logging`\n\n), where the self-hosted model analyzes its own infrastructure's logs.`vllm bench serve`\n\nagainst the deployment and get TTFT/throughput/P95 numbers back.It also encodes the hard-won details you'd otherwise learn at 2 a.m.: the default 10 GB boot disk that the vLLM TPU image overflows, the `TPUS_PER_TPU_FAMILY`\n\nquota that's invisible to `gcloud regions describe`\n\n, why you watch the serial console instead of SSH, and the exact vLLM flags Gemma 4 needs on TPU (`--tool-call-parser gemma4`\n\n, `--disable_chunked_mm_input`\n\n, and friends).\n\nThe fastest path is the Claude Code plugin marketplace — one command gets you the skill **and** the MCP server:\n\n```\n/plugin marketplace add xbill9/tpu-skill-claude\n/plugin install tpu-management@tpu-skill-claude\n```\n\nPrefer the classic routes? Clone and install:\n\n```\ngit clone https://github.com/xbill9/tpu-skill-claude\ncd tpu-skill-claude\nmake skill-install          # skill only, all projects\n./project-setup.sh --global # skill + MCP server registration\n```\n\nOr skip the clone entirely and unzip the packaged skill:\n\n```\ncurl -L -o /tmp/tpu-management-skill.zip \\\n  https://github.com/xbill9/tpu-skill-claude/raw/main/dist/tpu-management-skill.zip\nmkdir -p ~/.claude/skills && unzip -o /tmp/tpu-management-skill.zip -d ~/.claude/skills/\n```\n\nYou'll need an authenticated `gcloud`\n\nCLI, the TPU API enabled, and a Hugging Face token (the agent's `save_hf_token`\n\ntool stores it in Secret Manager for you). Configuration is all environment variables: `GOOGLE_CLOUD_PROJECT`\n\n, `MODEL_NAME`\n\n, `ACCELERATOR_TYPE`\n\n, `TENSOR_PARALLEL_SIZE`\n\n.\n\nOnce installed, you talk to Claude Code like this:\n\n\"Find me a v6e-1 with available quota and serve gemma-4-12B on it\"\n\nClaude checks existing resources first (the skill's rule: never create before checking what exists), sweeps zones for capacity, creates the VM with the proven flags, follows the serial console until vLLM logs \"Application startup complete,\" and hands you a working OpenAI-compatible endpoint. Then:\n\n\"Benchmark it and tear it down when done\"\n\nThe skill ships with a full reference guide (`references/tpu-builders-guide.md`\n\n) covering the TPU Builders Program: flex-start zones per TPU family, quota metrics and how to request increases, and troubleshooting — so Claude can answer capacity and billing questions even without the MCP server connected.\n\nThe repo doubles as both a Claude Code **plugin marketplace** and a plain skill repo. A `Makefile`\n\nkeeps the three distribution formats (project skill, plugin layout, zip) in sync from one set of sources, and the MCP server is a single-file FastMCP app — easy to read, easy to fork for your own model/accelerator combos.\n\nIssues and PRs welcome: [https://github.com/xbill9/tpu-skill-claude](https://github.com/xbill9/tpu-skill-claude)", "url": "https://wpnews.pro/news/tpu-management-a-claude-code-skill-for-running-gemma-4-on-cloud-tpus", "canonical_source": "https://dev.to/gde/tpu-management-a-claude-code-skill-for-running-gemma-4-on-cloud-tpus-1b1e", "published_at": "2026-07-21 00:10:45+00:00", "updated_at": "2026-07-21 00:29:35.130296+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-infrastructure", "developer-tools", "ai-agents"], "entities": ["Claude Code", "Gemma 4", "Google Cloud TPU", "vLLM", "Hugging Face", "Secret Manager", "xbill9", "FastMCP"], "alternates": {"html": "https://wpnews.pro/news/tpu-management-a-claude-code-skill-for-running-gemma-4-on-cloud-tpus", "markdown": "https://wpnews.pro/news/tpu-management-a-claude-code-skill-for-running-gemma-4-on-cloud-tpus.md", "text": "https://wpnews.pro/news/tpu-management-a-claude-code-skill-for-running-gemma-4-on-cloud-tpus.txt", "jsonld": "https://wpnews.pro/news/tpu-management-a-claude-code-skill-for-running-gemma-4-on-cloud-tpus.jsonld"}}