Skip to content
Back to skills

Observability And Growth

ASecurity

Full instrumentation from day one. PostHog consolidates product analytics + feature flags + error tracking (one platform, one bill). GA4 via GTM (14-step automation, custom dimensions over events, server-side tagging). Sentry (deep error tracking + performance). Stripe (webhook-first with idempotent processing). Listmonk on Coolify (newsletters via Amazon SES SMTP relay). PLG 7-layer framework. Programmatic SEO (5 page types). Incident auto-remediation via Sentry→Inngest pipeline. AI search (...

  • 33 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 26, 2026
ai-agentsrustgorailsapiperformancedocumentation

Works with

  • claude code
  • cli
  • api
  • mcp

Security analysis

A100/100

Scanned November 28, 2026

npx -y skills add heymegabyte/agent-skills --skill observability-and-growth --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Observability And Growth?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Observability And Growth
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/heymegabyte-observability-and-growth/badge)](https://www.skillsdirectory.com/skills/heymegabyte-observability-and-growth)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "observability-and-growth"
description: "Full instrumentation from day one. PostHog consolidates product analytics + feature flags + error tracking (one platform, one bill). GA4 via GTM (14-step automation, custom dimensions over events, server-side tagging). Sentry (deep error tracking + performance). Stripe (webhook-first with idempotent processing). Listmonk on Coolify (newsletters via Amazon SES SMTP relay). PLG 7-layer framework. Programmatic SEO (5 page types). Incident auto-remediation via Sentry→Inngest pipeline. AI search (GEO) awareness. Local business conversions (phone_click, direction_click, form_submit, booking_click) with CRO patterns for both SaaS and local."
license: "Rutgers"
compatibility:
  agentskills: ">=1.0.0"
source: "13-observability-and-growth/SKILL.md (heymegabyte/agent-skills)"
---

<!-- GENERATED by bin/gen-codex-skills.mjs from the category's SKILL.md — do not hand-edit.
     Path legend: `<agent-home>` = your AI tool's config directory
     (Claude Code: ~/.claude · Codex: ~/.codex · others: see your tool's docs). -->

# 13 — Observability and Growth

Tiered PostHog+Sentry+GA4 stacks wired from day one; feature flags, PLG patterns, incident auto-remediation.

## Instrumentation tiers

Per `_kernel/standards.md#integrations`:

- **Worker baseline** — Sentry `@sentry/cloudflare` v11 + PostHog + Workers Tracing, routed through `@theme.tools/telemetry`
- **Acquisition/marketing capability** — add consent-aware GA4/GTM and Axiom when the product requires them
- **AI/agent capability** — add Langfuse with a 2500ms fail-open boundary and AI Gateway as applicable

## PostHog (Tier 1 cornerstone)

- Snippet on every HTML page w/ `persistence:'memory'` (cookie-free); `capture_pageview` + `capture_pageleave` + `autocapture:true`
- Unified platform: product analytics + feature flags + session replay + error tracking
- CSP: `script-src` + `connect-src` for posthog domain
- Per-feature event naming: `<feature>:<action>` (`signup:complete`, `editor:save`, `share:copy`)

## Sentry (Worker baseline)

- `@sentry/cloudflare` v11 (stream trace lifecycle default since 11.0) + `withSentry` wrapper; project via `mcp__sentry__create_project` (org:`megabyte-labs`)
- `SENTRY_DSN` via `wrangler secret put`
- Pattern: `withSentry(env => ({ dsn, tracesSampleRate: 1.0, sendDefaultPii: false }), worker)`
- Breadcrumbs before risky ops; capture exception w/ context tags (`worker` | `route` | `userId`)
- Release tracking via `SENTRY_RELEASE` env; Workers Tracing handles I/O spans

## Workers Tracing / capability-driven GA4 + GTM / AI Gateway

- Workers Tracing: `[observability] enabled = true` in `wrangler.jsonc` — zero-config OTel I/O tracing; export to Axiom, Honeycomb, Grafana, Datadog via `@opentelemetry/exporter-trace-otlp-http`
- GA4 + GTM: container snippet (head script + noscript iframe); CSP: `googletagmanager.com` + `google-analytics.com` + `analytics.google.com` + `region1.google-analytics.com`; server-side tagging for EU; custom dimensions over custom events
- AI Gateway: `env.AI.run()` auto-routes; direct Anthropic: `https://gateway.ai.cloudflare.com/v1/{account}/{gateway}/anthropic/v1/messages`; caching + rate-limit + fallback + per-call logging

## Stripe + Link (accept-money default, ALL flows — per `rules/payments.md`)

- Accept default w/ Link ON everywhere (Payment Element / Checkout / Payment Links); Instant Bank Payments on high-ticket + donation flows
- Webhook-first w/ idempotent processing (D1 dedupe table `payment_events(event_id, source, processed_at)` UNIQUE)
- `Stripe-Signature` HMAC + 5-min replay window
- Mint products + prices via MCP (idempotent via `lookup_key`); subscription state machine in D1
- `STRIPE_WEBHOOK_SECRET` via `POST /v1/webhook_endpoints`

## Square (on-request rail ONLY — per `rules/payments.md`)

- Only when the prompt names Square: Web Payments SDK card form + Apple Pay + Google Pay + Cash App Pay
- `Square-Signature` HMAC-SHA256 w/ 6-hr replay window; `idempotency_key` UUID per request (24-hr dedupe)
- No 501(c)(3) discount exists (verified 2026-10) — custom rates only ≥$250K/yr

## Listmonk (newsletter — self-hosted on Coolify)

- Amazon SES SMTP relay (`LISTMONK_FROM_EMAIL`); `listmonkSendTx(env, { templateAlias, ... })` via KV-cached alias→id map
- Templates in `emails/*.html` synced via `scripts/listmonk-sync.mjs`
- Auth: `Authorization: token <user>:<key>` (Listmonk 3.x API-user pattern)

## PLG 7-Layer Framework

1. **Discovery** — SEO + AI search + word-of-mouth + paid
2. **Sign-up** — passwordless preferred (Clerk M2M JWT)
3. **Activation** — first-value-in-X-min metric (aha moment per `rules/feature-flags.md` instrumentation)
4. **Engagement** — DAU/MAU ratio, session depth
5. **Retention** — D1/D7/D30 cohort
6. **Revenue** — upgrade trigger, expansion
7. **Referral** — viral coefficient, two-sided rewards

## Programmatic SEO (5 page types)

- `/integrations/{tool}` · `/compare/{a}-vs-{b}` · `/for/{audience}` · `/templates/{type}` · `/{city}-{service}`
- Each: unique H1 + meta desc + 800+ unique words + 1 unique image + 3+ internal links + 1+ outbound citation. Cap 200 pages per axis.
- Per `rules/copy-writing.md` § pSEO + `rules/thin-source-amplification.md`.

## GEO / AI search

- Quotable answer blocks 40-60 words (LLM citation magnet); FAQPage schema highest AI-citation rate (ChatGPT / Perplexity / Google AI Overviews)
- JSON-LD facts MUST also appear as visible HTML body text; lead paragraphs answer query in <40 words
- EEAT: author bio + `Person` schema + `sameAs` + dated revision + ownership statement
- `llms.txt` at site root (DX-only, <0.3% adoption — not build gate)

## Local-business conversions + CRO

Track per `local-conversions.md`: `phone_click` (`tel:`) · `direction_click` (Google Maps) · `form_submit` · `booking_click` (Calendly/Cal.com) · `chat_click` · `review_click` (Google Business/Yelp). Each fires PostHog + Sentry breadcrumb + (Tier 2) GA4 conversion event.

CRO: sticky CTA bar on mobile · scroll-progress bar (subtle) · exit-intent modal (cart/pricing only, not blogs) · social proof near every CTA · urgency without dark patterns ("3 spots left this week" if true) · trust strip above fold · single primary CTA per surface.

## Incident auto-remediation

Sentry → Inngest pipeline: (1) Sentry webhook on `event.alert.triggered` → (2) Inngest dispatches `incident-responder` agent → (3) agent reads event, traces to source file, proposes fix, opens PR via gh MCP → (4) PR auto-merges if all CI gates pass per `rules/ai-seniority.md`.

## See submodules: posthog, ga4-gtm, sentry, stripe-billing, square-payments, listmonk, plg-framework, programmatic-seo, incident-remediation, geo-ai-search, local-conversions.

## Multi-Swarm Parallelization & OpenCode (DeepSeek) Offload Mandate

- **Domain Swarm Directive**: Wire all 7 observability rails (PostHog, GA4, GTM, Sentry, Cloudflare Web Analytics, OTLP, and Langfuse `2500ms` fail-open tracing) and Stripe/Link billing webhooks in parallel across `opencode` (DeepSeek) worktree shards.
- **Whole-change dispatch**. Apply `rules/openspec-change-ownership.md` and `rules/agent-provider-policy.md`. Assign each OpenSpec change one owner through verification. Route suitable bounded changes to OpenCode with DeepSeek through LiteLLM.
- **Architecture and verification**: Route material decisions through `rules/evidence-gated-autonomous-orchestration.md`. Its conference and risk gates govern provider selection and independence.
- **Reuse review**: Review reuse during implementation under `control-plane/RUNTIME.md`. Capture cited proposals for application code in `theme.tools`, host configuration in `install.doctor`, and agent guidance in `agent-skills`. Submit authorized findings to same-run OpenSpec admission.
- **Concurrent End-of-Prompt Delivery Closure**: Run documentation/comment reconciliation and bounded `theme.tools`, `install.doctor`, and `agent-skills` extraction reviews concurrently with proportional tests and release preparation. After reconciling those changes and generated outputs, revalidate the exact final tree. Commit only that tested tree, push it normally to `main`, promote it through the approved production rail, and run production smoke plus critical E2E verification. Fail closed without mutating production when authority, credentials, spending permission, review, recovery, validation, or provenance gates are missing; record the exact blocker instead.

## Theme.tools ecosystem contract (required)

Before implementation, load `rules/theme-tools-skill-integration.md` from the agent-skills repository and the entry for this skill in `config/theme-tools-skill-map.json`. Apply catalog-first reuse, upstream contribution, thin-consumer adoption, UI-first theme.tools implementation and test-driven verification, and `.tools/telemetry` routing proportionally to this task.

- **DeepSeek-first parallel dispatch** At intake and after each dependency clears, dispatch independent OpenSpec changes concurrently whenever doing so reduces time to verified delivery. Delegate suitable whole OpenSpec changes to OpenCode with DeepSeek through LiteLLM when it meets the acceptance bar and improves throughput. Use Codex, Gemini, or Claude for work that benefits materially from premium capability or independent review, and record concrete reasons for premium routing or limited dispatch. Scale worker count to ready work, isolation, and approved capacity.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.