nextjs-vercel-analytics

nextjs-vercel-analytics is a skill for Codex from jimtin/production-ai. It costs 103 tokens per session (1,252 once invoked), scanned A, original, MIT.

Instructions for adding privacy-safe Vercel Web Analytics to a Next.js application. Next.js is a web framework, and Vercel Web Analytics measures visits and custom events without sending personally identifying information in event data.

In plain words
What is it for?
Use it to implement, review, or repair analytics in App Router or Pages Router apps, including client and server events and local checks.
Why use it?
It provides a consistent way to track page views and typed events while avoiding accidental collection of personal data. It also accounts for both major Next.js routing styles.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions AGENTS.md; $skill-name invocation.

Good fit Use it to implement, review, or repair analytics in App Router or Pages Router apps, including client and server events and local checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jimtin/production-ai/nextjs-vercel-analytics
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 jimtin/production-ai --skill nextjs-vercel-analytics
Clone the repo
git clone --depth 1 https://github.com/jimtin/production-ai

Made for: Codex.

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 nextjs-vercel-analytics

README.md
[![agentmods](https://agentmods.dev/badge/skills/jimtin/production-ai/nextjs-vercel-analytics/github.svg)](https://agentmods.dev/skills/jimtin/production-ai/nextjs-vercel-analytics)
Your own site
<a href="https://agentmods.dev/skills/jimtin/production-ai/nextjs-vercel-analytics"><img src="https://agentmods.dev/badge/skills/jimtin/production-ai/nextjs-vercel-analytics/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 nextjs-vercel-analytics

Your own site · 80×15
<a href="https://agentmods.dev/skills/jimtin/production-ai/nextjs-vercel-analytics"><img src="https://agentmods.dev/badge/skills/jimtin/production-ai/nextjs-vercel-analytics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,252 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00103 $0.01252
Opus 5 $0.00051 $0.00626
Sonnet 5 $0.00021 $0.00250
Haiku 4.5 $0.00010 $0.00125

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

Security

Grade A, and why

nextjs-vercel-analytics scanned grade A with 0 findings 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 8d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/nextjs-vercel-analytics/SKILL.md · 98 lines

How it starts

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

Next.js Vercel Analytics

Purpose

Use this skill to implement Vercel Web Analytics in a Next.js repo with a typed, privacy-safe event contract shared by frontend and backend tracking. Default scope is analytics only: pageviews plus custom client/server events.

Out of scope unless explicitly requested: Speed Insights, OpenTelemetry, tracing, runtime log drains, dashboards, alerts, third-party analytics, and querying analytics data from Vercel.

Required Starting Point

Before editing code:

  1. Read repo instructions: root AGENTS.md, repo-local AGENTS.md, package manager files, and existing test commands.
  2. Identify router mode:
    • App Router: app/layout.* or src/app/layout.*
    • Pages Router: pages/_app.* or src/pages/_app.*
  3. Search existing instrumentation before adding anything:
    • rg -n "@vercel/analytics|Analytics|track\\(|analytics|telemetry|posthog|plausible|segment|gtag|dataLayer" .
  4. Check current official Vercel docs and latest stable @vercel/analytics version at implementation time. Do not rely on model memory for version freshness.
  5. Confirm that Web Analytics is enabled, or must be enabled, in the target Vercel project dashboard.
  6. Confirm whether custom events are expected. If yes, ask whether the Vercel project has the required custom-event entitlement. Current Vercel docs state Web Analytics is available on all plans, while custom events require Pro or Enterprise.

Implementation Workflow

  1. Install package.

    • Use the repo's package manager.
    • Install latest stable @vercel/analytics.
    • Update package manifest and lockfile together.
  2. Add pageview analytics.

    • App Router: import { Analytics } from @vercel/analytics/next in the root layout and render <Analytics /> near the end of <body>.
    • Pages Router: import { Analytics } from @vercel/analytics/next in _app and render <Analytics /> with the app shell.
    • Preserve existing layout structure, providers, metadata, and server/client component boundaries.

Read the full file on GitHub · 98 lines

Files

What ships with it

6 files 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. 8d ago First seen · 98 lines · 103 tokens per session scan A eb684abe2c94

Subscribe to this mod's changes

nextjs-vercel-analytics is a skill published in the GitHub repository jimtin/production-ai (1 stars, last pushed 2mo ago), licensed MIT. It adds 103 tokens to every session and 1,252 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. 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

git-workflow

This skill should be used when the user asks to "create git commit", "manage branches", "follow git workflow", "use Conventional Commits", "handle merge conflicts", or asks about git branching strategies, version control best practices, pull request workflows. Provides comprehensive Git workflow guidance for team…

Galaxy-Dawn/claude-scholar · 64 tokens

daily-paper-generator

Use when the user asks to generate daily paper digests on a general topic. This skill supports both arXiv and bioRxiv (or either one), then produces structured Chinese/English summaries for selected papers.

Galaxy-Dawn/claude-scholar · 47 tokens

codex-autoresearch

Run autonomous, measurable experiments in a Git repository: change one hypothesis, verify a numeric metric, keep improvements, and revert failures. Use when the user wants Codex to keep iterating toward a numeric target in the foreground or as a detached background run. Do not use for ordinary one-shot coding…

leo-lilinxiao/codex-autoresearch · 80 tokens

neo4j-modeling-skill

Design, review, and refactor Neo4j graph data models. Use when choosing node labels vs relationship types vs properties, migrating relational/document schemas to graph, detecting anti-patterns (generic labels, supernodes, missing constraints), designing intermediate nodes for n-ary relationships, enforcing schema with…

neo4j-contrib/neo4j-skills · 152 tokens

clipboard

Copy text to clipboard with optional rich formatting. Triggers on "copy to clipboard", "copy that", "pbcopy", "copy formatted", "copy rich text".

CodeAlive-AI/ai-driven-development · 36 tokens

agent-safety

Use when bounding an LLM agent that already runs — scoping its task domain, gating tools to least privilege, defending against prompt injection in untrusted web/email/RAG text, requiring human approval on irreversible actions, capping runtime and cost, or triaging what it already did. NOT building the loop, tools, or…

ericrisco/rsc-harness · 79 tokens