/mattpocock-skills:telemetry-designfrom mattpocock-skills
Define product analytics events, structured logs, system metrics, and error boundaries for a feature. Use when designing telemetry, observability, tracking plans, or verifying event emissions in tests.
Ships in mattpocock-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
If you cannot observe how a feature behaves in production, you cannot know whether it solved the user's problem or degraded system stability. This skill specifies the telemetry and observability requirements for any new capability or architectural change.
Every feature specification or technical plan should define its telemetry across four pillars:
Track user actions and funnel progression to measure feature adoption and success metrics.
noun_action or object_action format (e.g. checkout_started, filter_applied, invite_sent).user_id, organization_id, feature_variant, item_count).Provide searchable, machine-readable log lines for debugging operational failures.
DEBUG: Verbose diagnostics disabled in production by default.INFO: Normal lifecycle events (e.g. worker started, job completed, transaction processed).WARN: Recoverable anomalies or degraded operations (e.g. cache miss fallback, rate limit approaching).ERROR: Unrecoverable failures affecting a user transaction or background job.correlation_id, trace_id, tenant_id, duration_ms).Define numeric time-series metrics to monitor system health and performance:
feature_invocations_total, payment_failures_total).api_request_duration_seconds{endpoint="upload"}).active_websocket_connections, queue_depth).When designing telemetry for a spec or feature, format the output as follows:
### Telemetry & Success Metrics Specification
#### Behavioral Analytics Events
| Event Name | Trigger Moment | Required Properties | Success Metric Target |
| --- | --- | --- | --- |
| `export_requested` | User clicks Export button | `format: "csv" \| "json"`, `item_count: number` | Track feature usage volume |
| `export_completed` | File generation completes | `duration_ms: number`, `byte_size: number` | P95 latency < 3000ms |
| `export_failed` | Generation errors out | `error_code: string`, `retry_count: number` | Error rate < 0.5% |
#### Structured Logs
- `INFO`: `export.started` with `{ export_id, user_id, format }`
- `ERROR`: `export.failed` with `{ export_id, error_code, stack_trace, duration_ms }`
#### Service Metrics & Alert Rules
- Metric: `exports_processed_total{status="success|failure", format="csv|json"}`
- Metric: `export_processing_seconds` (Histogram with buckets `[0.1, 0.5, 1, 2, 5, 10]`)
- Alert: Trigger P2 alert when `rate(exports_processed_total{status="failure"}[5m]) / rate(exports_processed_total[5m]) > 0.02`.
#### TDD Seam Verification
In test suites, assert that `analytics.track` and `logger.error` are invoked with exact payloads when testing the execution seam.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub op3616windows/skills --plugin mattpocock-skills48 skills in this plugin
/ask-mattAsk which skill or flow fits your situation. A router over the skills in this repo./chief-of-staffPursue a long-running goal in a single session by co-ordinating subagents./claude-handoffHand the current conversation off to a fresh background agent that picks up the work immediately./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary./code-reviewReview the changes since a fixed point (commit, branch, tag, or merge-base) along three axes: Standards (does the code follow this repo's documented coding standards?), Spec (does the code match what the originating issue/spec asked for?), and Security (does the code introduce AppSec or privacy vulnerabilities?). Runs all three reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X"./diagnosing-bugsDiagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.