pagespeed-audit

pagespeed-audit is a skill for Claude Code from teamniteo/hakuto. It costs 128 tokens per session (3,647 once invoked), scanned A, original, MIT.

A live check of a publicly deployed web page using Google PageSpeed Insights, which measures speed, accessibility, common web practices and search-engine readiness.

In plain words
What is it for?
Use it to test staging or production URLs, review Core Web Vitals such as loading and layout stability, and inspect suggested improvements.
Why use it?
It shows how Google evaluates the page on mobile and desktop and identifies the main issues affecting those results.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: names the AskUserQuestion tool; mentions AGENTS.md.

Part of the hakuto plugin — 14 skills, 1 command, 1 agent shipped together

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.

agentmods
npx agentmods add skills/teamniteo/hakuto/pagespeed-audit
Any agent
npx skills add teamniteo/hakuto --skill pagespeed-audit
Clone the repo
git clone --depth 1 https://github.com/teamniteo/hakuto

Made for: Claude Code.

Or install hakuto, the plugin that ships this one along with the rest of its 14 skills, 1 command, 1 agent.

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 pagespeed-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/teamniteo/hakuto/pagespeed-audit.svg)](https://agentmods.dev/skills/teamniteo/hakuto/pagespeed-audit)
Your own site
<a href="https://agentmods.dev/skills/teamniteo/hakuto/pagespeed-audit"><img src="https://agentmods.dev/badge/skills/teamniteo/hakuto/pagespeed-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 128 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,647 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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.00128 $0.03647
Opus 5 $0.00064 $0.01824
Sonnet 5 $0.00026 $0.00729
Haiku 4.5 $0.00013 $0.00365

Measured 6d ago against content hash 1decf8d4212f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

pagespeed-audit scanned grade A 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 6d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

**Use `curl`, NOT `WebFetch`.** WebFetch processes the response through a
skills/pagespeed-audit/SKILL.md · 312 lines

How it starts

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

PageSpeed Audit

Run Google's PageSpeed Insights against deployed pages and report findings.

Scope: Tests one or more public URLs. Audits both mobile and desktop strategies by default.

Critical constraint: PSI fetches the URL from Google's servers, so it cannot reach localhost, 127.0.0.1, or private network addresses. If the user provides such a URL, stop immediately and explain — point them at their deployed staging or production URL instead.


Execution Flow

0. Determine Test Scope

Parse the current invocation for URL(s) — never carry over a URL from a previous turn or assume from prior conversation context. If the user didn't pass a URL on this invocation, you must ask before fetching.

URL provided in this invocation:

No URL provided in this invocation:

  • Read AGENTS.md to find a documented production URL or page list.
  • If found, list the URLs and ask the user which to audit (use AskUserQuestion when 2–4 candidates exist).
  • If not found, ask the user for at least one deployed URL via AskUserQuestion or a plain question.
  • Do not default to a previously-audited URL, even one the user selected earlier in the same session. Ask every time.

Localhost / private addresses → reject:

  • http://localhost:*, http://127.0.0.1:*, http://0.0.0.0:*
  • RFC1918 ranges (10.*, 192.168.*, 172.16-31.*)
  • *.local, *.internal
  • Stop and tell the user: "PageSpeed Insights runs from Google's servers and can't reach private addresses. Run this against your deployed URL (staging or production) instead."

1. Check for API Key (REQUIRED)

Resolve the key from (in order): shell env, .env.local, .env. All three are checked in one Bash call:

KEY="${PAGESPEED_API_KEY:-}"
for f in .env.local .env; do
  [ -n "$KEY" ] && break
  [ -f "$f" ] && KEY=$(grep -E '^PAGESPEED_API_KEY=' "$f" | head -1 | cut -d= -f2- | tr -d '"' | tr -d "'")
done
# Don't echo the key value — print only presence to keep secrets out of chat logs.
[ -n "$KEY" ] && echo "FOUND" || echo "MISSING"

Read the full file on GitHub · 312 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 312 lines · 128 tokens per session scan A 1decf8d4212f

Subscribe to this mod's changes

pagespeed-audit is a skill published in the GitHub repository teamniteo/hakuto (5 stars, last pushed 4d ago), licensed MIT. It adds 128 tokens to every session and 3,647 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens