cloud-run-puppeteer

cloud-run-puppeteer is a skill for Claude Code from tranhieutt/software_development_department. It costs 51 tokens per session (1,132 once invoked), scanned C, original, MIT.

A deployment guide for running Puppeteer, a tool that controls a headless Chrome browser, on Google Cloud Run, a service that runs containers without managing servers.

In plain words
What is it for?
Deploying browser automation jobs and headless Chrome services to Cloud Run using Docker.
Why use it?
It documents the Cloud Run settings, system libraries, and secret handling needed to prevent Chrome launch failures and silent timeouts.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Deploying browser automation jobs and headless Chrome services to Cloud Run using Docker.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tranhieutt/software_development_department/cloud-run-puppeteer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tranhieutt/software_development_department --skill cloud-run-puppeteer
Clone the repo
git clone --depth 1 https://github.com/tranhieutt/software_development_department

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cloud-run-puppeteer

README.md
[![agentmods](https://agentmods.dev/badge/skills/tranhieutt/software_development_department/cloud-run-puppeteer/github.svg)](https://agentmods.dev/skills/tranhieutt/software_development_department/cloud-run-puppeteer)
Your own site
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/cloud-run-puppeteer"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/cloud-run-puppeteer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cloud-run-puppeteer

Your own site · 80×15
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/cloud-run-puppeteer"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/cloud-run-puppeteer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,132 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.01132
Opus 5 $0.00026 $0.00566
Sonnet 5 $0.00010 $0.00226
Haiku 4.5 $0.00005 $0.00113

Measured 11d ago against content hash 50be4e1316c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade C, and why

cloud-run-puppeteer scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

&& rm -rf /var/lib/apt/lists/*
.claude/skills/cloud-run-puppeteer/SKILL.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cloud Run + Puppeteer Deployment Guide

Hard-won lessons from deploying Puppeteer to Cloud Run. These are non-obvious gotchas that cost significant debug time.

MUST: Use gen2 Execution Environment

Cloud Run gen1 uses gVisor sandbox — blocks Linux syscalls Chrome needs to create processes. Puppeteer will hang/timeout silently.

gcloud run deploy my-service \
  --execution-environment gen2   # <-- required for Chrome/Puppeteer

Never deploy a Puppeteer service on gen1.


MUST: Install Chrome System Dependencies

node:18 base image does not include libraries Chrome needs. Missing any one of these causes launch failure.

FROM node:18

RUN apt-get update && apt-get install -y \
    ca-certificates fonts-liberation fonts-ipafont-gothic fonts-wqy-zenhei \
    libasound2 libatk-bridge2.0-0 libatk1.0-0 libcairo2 libcups2 \
    libdbus-1-3 libdrm2 libgbm1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 \
    libpango-1.0-0 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 \
    libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 \
    libxss1 libxtst6 xdg-utils --no-install-recommends \
    && rm -rf /var/lib/apt/lists/*

MUST: Secret Manager mount path ngoài WORKDIR

Nếu mount secret vào cùng path với WORKDIR, volume mount sẽ che toàn bộ thư mục — chỉ còn file secret, code biến mất.

# SAI — mount trùng WORKDIR /app
--set-secrets "/app/service-account.json=my-secret:latest"

# ĐÚNG — mount ra path riêng
--set-secrets "/secrets/service-account.json=my-secret:latest"
ENV GOOGLE_CREDS_PATH=/secrets/service-account.json

Windows/Git Bash warning: --set-env-vars với path Unix sẽ bị Git Bash convert thành Windows path. Set ENV trực tiếp trong Dockerfile thay vì truyền qua CLI.


Puppeteer Launch Config cho Cloud Run

const browser = await puppeteer.launch({
    headless: 'new',
    timeout: 60000,          // cold start cần thời gian — mặc định 30s không đủ
    args: [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-dev-shm-usage',   // /dev/shm nhỏ trong container
        '--single-process',
        '--no-zygote',
        '--disable-gpu',
    ],
});

Read the full file on GitHub · 142 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 142 lines · 51 tokens per session scan C 50be4e1316c2

Subscribe to this mod's changes

cloud-run-puppeteer is a skill published in the GitHub repository tranhieutt/software_development_department (72 stars, last pushed 3mo ago), licensed MIT. It adds 51 tokens to every session and 1,132 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

playwright-cli

Automates browser interactions for testing and validating your own web applications using playwright-cli. Use when you need terminal-first browser control for navigation, form filling, screenshots, tracing, bound browser sessions, debugging, or generating Playwright test code. Only use against applications you own or…

testdino-hq/playwright-skill · 64 tokens

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

datit309/supergraph · 35 tokens

terraform

Use this skill when writing, reviewing, or debugging Terraform infrastructure code. This covers module design, remote state management, workspace strategies, variable validation, provider pinning, and secure handling of sensitive outputs. The AI will act as a Terraform specialist who follows HashiCorp best practices…

DongDuong2001/pudo-code-system · 0 tokens

argo-cd

Use this skill when designing GitOps delivery workflows with Argo CD. This covers Application and AppProject CRDs, the App of Apps pattern, sync policies and waves, health checks, RBAC configuration, and integrating Argo CD into a multi-environment or multi-cluster strategy. The AI will act as a GitOps specialist who…

DongDuong2001/pudo-code-system · 0 tokens

cloud-browser-automation

Use cloud browser services (Browserbase) for Cloudflare bypass, JavaScript rendering, and stealth scraping when local tools fail.

kevinnft/ai-agent-skills · 29 tokens

cm-identity-guard

Verify and lock project identity before ANY git push, Cloudflare deploy, or Supabase operation. Essential when working with multiple GitHub accounts (personal + work), multiple Cloudflare accounts, or multiple Supabase/Neon projects. Prevents wrong-account deploys, cross-project secret leaks, and git history…

tody-agent/codymaster · 69 tokens