.claude/skills/ci-analytics-pollution/SKILL.md
Debug unexplained analytics traffic from CI/CD pipelines hitting production. Use when: (1) Analytics show traffic to URLs that match test patterns like /this-page-does-not-exist, /test-route, or 404 test paths, (2) Traffic has near 1:1 session-to-user ratio suggesting automated hits, (3) Traffic correlates with deploy frequency, (4) HeadlessChrome or Playwright appears in user agents. Covers Playwright, Cypress, and other e2e test frameworks running against production URLs.
npx skillsauth add Dbochman/dotfiles ci-analytics-pollutionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
E2E tests configured to run against production URLs (for post-deploy verification) generate real analytics hits, polluting your data with synthetic traffic. This is especially problematic when tests hit non-existent routes for 404 verification.
Suspect CI pollution when you see:
/this-page-does-not-exist, /test-*, etc.)HeadlessChrome, Playwright, Puppeteer, CypressIdentify suspicious URLs in analytics
Look for: /this-page-does-not-exist, /404-test, /non-existent, etc.
Search codebase for those URLs
grep -r "this-page-does-not-exist" --include="*.ts" --include="*.js"
Check if tests are in e2e/integration test files
# Common locations
tests/e2e/
cypress/integration/
playwright/
Find workflows that set production BASE_URL
grep -r "BASE_URL.*production-domain.com" .github/workflows/
grep -r "baseURL.*production-domain.com" playwright.config.*
Correlate traffic timing with CI runs
For Playwright:
# .github/workflows/post-deploy-check.yml
- name: Run smoke tests on production
run: npx playwright test --grep-invert="404" # Skip 404 tests
For Cypress:
- name: Run smoke tests
run: npx cypress run --spec "cypress/e2e/smoke/**" --env SKIP_404=true
Detect and tag CI sessions via custom dimension:
// analytics.ts
const isCI = /HeadlessChrome|Playwright|Puppeteer|Cypress/.test(navigator.userAgent);
gtag('set', { 'traffic_type': isCI ? 'ci' : 'human' });
Then filter in your analytics dashboard by traffic_type != 'ci'.
// Only init analytics for real users
if (!navigator.userAgent.includes('HeadlessChrome')) {
initializeAnalytics();
}
After implementing:
Symptom: 374 sessions to /this-page-does-not-exist in GA4
Investigation:
# Found in test file
grep -r "this-page-does-not-exist" tests/
# tests/e2e/console-errors.spec.ts:172: await page.goto(`${BASE_URL}/this-page-does-not-exist`);
# Found workflow running against production
grep -r "BASE_URL" .github/workflows/
# .github/workflows/console-check.yml:55: BASE_URL: https://production-site.com
Root cause: Post-deploy workflow ran full Playwright suite including 404 test
Fix: Added --grep-invert="404" to skip 404 tests in production checks
smoke (production-safe) vs full (all tests)@production-safe tag to mark tests that can run against live sitesdevelopment
Search the web for current information, news, facts, and answers. Use when asked questions about current events, needing to look something up, finding websites, researching topics, or when you need up-to-date information beyond your training data.
development
Summarize any URL, YouTube video, podcast, PDF, or file into concise text. Use when asked to read an article, summarize a link, get the gist of a video or podcast, extract content from a URL, or when you need to understand what a web page or document contains.
development
Play music via Spotify and control Google Home speakers. Use when asked to play music, songs, artists, playlists, podcasts, or control speakers/volume/audio.
testing
Create new OpenClaw skills, modify and improve existing skills, and measure skill performance with evals. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. Also use when asked to "make a skill", "turn this into a skill", "improve this skill", or "test this skill".