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.
npx skills add kws-projects/react-boilerplate --skill analytics-and-monitoringgit clone --depth 1 https://github.com/kws-projects/react-boilerplateWrote 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.
[](https://agentmods.dev/skills/kws-projects/react-boilerplate/analytics-and-monitoring)<a href="https://agentmods.dev/skills/kws-projects/react-boilerplate/analytics-and-monitoring"><img src="https://agentmods.dev/badge/skills/kws-projects/react-boilerplate/analytics-and-monitoring/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.
<a href="https://agentmods.dev/skills/kws-projects/react-boilerplate/analytics-and-monitoring"><img src="https://agentmods.dev/badge/skills/kws-projects/react-boilerplate/analytics-and-monitoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01427 |
| Opus 5 | $0.00000 | $0.00714 |
| Sonnet 5 | $0.00000 | $0.00285 |
| Haiku 4.5 | $0.00000 | $0.00143 |
Grade A, and why
analytics-and-monitoring 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 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.
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.
How it starts
The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analytics & Monitoring
Work with the GA4 analytics and Sentry error-monitoring integrations in this project. Use when adding events, capturing errors, configuring user identity, managing consent, or troubleshooting the integration.
Architecture overview
Both integrations follow the adapter pattern: a thin typed wrapper in
src/lib/ owns the SDK, and all other code uses the adapter (or the React
hooks) — never the raw SDK.
src/lib/analytics.ts → GA4 gtag.js adapter
src/lib/monitoring.ts → Sentry adapter (also re-exports ErrorBoundary)
src/types/analytics.ts → Typed event definitions
src/types/monitoring.ts → Error context / user / breadcrumb types
src/hooks/useAnalytics.ts → React hook (route-aware)
src/hooks/useMonitoring.ts → React hook
src/hooks/usePageTracking.ts → Auto page-view on route change
src/components/ErrorFallback.tsx → Fallback UI for SentryErrorBoundary
GA4 — Adding a new tracked event
-
Define the event shape in
src/types/analytics.ts:export type FeatureUsedEvent = { name: 'feature_used' params: { feature: string; duration_ms?: number } } -
Add it to the
AnalyticsEventunion in the same file. -
Track it from feature code:
import { analytics } from '@/lib/analytics' analytics.track({ name: 'feature_used', params: { feature: 'export' } })Or via the hook:
const { track } = useAnalytics() track({ name: 'feature_used', params: { feature: 'export' } })
Event naming rules (GA4)
- Use
snake_case, max 40 characters. - Avoid GA4 reserved names:
click,error,first_visit,page_view,scroll,session_start,user_engagement. - Prefer recommended events (
login,sign_up,search,share,select_content,exception) when they fit — GA4 provides enhanced reporting for these.
User identification (GA4)
analytics.setUserId(user.id) // after login — internal ID only, no PII
analytics.setUserProperties({ plan: 'pro' }) // user-scoped custom dimensions
analytics.clearUserId() // on logout
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.
- 11d ago First seen · 181 lines · 0 tokens per session scan A 487fba417cd1
analytics-and-monitoring is a skill published in the GitHub repository kws-projects/react-boilerplate (3 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,427 tokens. 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.
Other skills, from other repositories
i18n-date-patterns
Implements internationalization (i18n) in React applications. Covers user-facing strings, date/time handling, locale-aware formatting, ICU MessageFormat, and RTL support. Use when building multilingual UIs or formatting dates/currency.
traffic-diagnosis
Systematically diagnose why traffic changed — spike, drop, or shift in mix. Follow these steps in order. Each step narrows the hypothesis.
ultracite
Ultracite is a zero-config linting and formatting preset for JavaScript/TypeScript projects. Use when: (1) Setting up or initializing Ultracite in a project (ultracite init), (2) Running linting or formatting commands (check, fix, doctor), (3) Writing or reviewing JS/TS code in a project that uses Ultracite — to…
rtl-bug-repro
Reproduce an RTL bug with a minimal TB and isolate root cause via waveform diff — 'reproduce this bug', 'minimal repro TB', regression failure isolation.
integration-rule-engine
A declarative routing engine that turns ticket / error attributes (reporter, label, project, area path, error class, environment) into a tag + AI agent + priority assignment, so cross-source workflows ("security tickets always go to the OWASP reviewer") stay out of code and in user-editable rules.
bug-screenshot-annotation
Turns a raw bug screenshot into a QA-style annotated evidence image — circles/ovals around the broken region, arrows, callout text boxes, a 'BUG — ' corner badge, and axis tick-marks for date/offset bugs. Use whenever a bug is visual or positional (overlapping elements, misalignment, wrong date/offset on a chart axis…