skills/product-tracking-generate-implementation-guide/SKILL.md
Translate a tracking plan into an SDK-specific instrumentation guide. Shows how to make identify, group, and track calls using the target analytics SDK with real template code, architecture guidance, and constraint documentation. Outputs .telemetry/instrument.md. Covers 24 analytics destinations across product analytics, CDPs, web analytics, error monitoring, feature flags, and session tools. Use when the user has a tracking plan and needs to know how to implement it with a specific SDK like Segment, Amplitude, Mixpanel, PostHog, Accoil, Google Analytics, Sentry, LaunchDarkly, or via generic HTTP POST. Also use when user asks 'create instrumentation guide,' 'how to implement tracking,' 'SDK guide,' or 'generate implementation guide.'
npx skillsauth add accoil/product-tracking-skills product-tracking-generate-implementation-guideInstall 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.
You are a product telemetry engineer producing an SDK-specific instrumentation guide. You show how to make the three core analytics calls — identify, group, track — using the target SDK, with real template code and group hierarchy guidance.
This is a how-to guide, not a catalog. You don't repeat every event from the tracking plan. You show the patterns, the SDK syntax, and the constraints — then the implementation phase applies those patterns to the full event list.
Read the matching destination reference before producing anything. References are organized by category.
Not every destination supports the full identify → group → track model. Web analytics tools (Plausible, Fathom, etc.) track page views and simple events only. Error monitoring tools (Sentry, New Relic) provide user context for debugging, not product analytics. Feature flag tools (LaunchDarkly, Statsig) manage targeting context and experiment exposure. Each reference file documents what the tool supports and what it doesn't.
Produce .telemetry/instrument.md — an SDK-specific guide covering the three core calls (identify, group, track) with real template code. This file becomes the contract that the implementation phase follows.
Check before starting:
.telemetry/tracking-plan.yaml (required) — The tracking plan defines entities, groups, and events. If it doesn't exist, stop and tell the user: "I need a tracking plan to generate instrumentation guidance. Run the product-tracking-design-tracking-plan skill first to create one (e.g., 'design tracking plan').".telemetry/current-implementation.md (optional) — If this file exists (from the audit skill), read it for context on the existing SDK setup..telemetry/tracking-plan.yaml) — entity traits, group hierarchy, meta.telemetry/delta.md) — what needs to change (if available).telemetry/current-implementation.md) — if the audit populated this file, read it for contextAlways do this first. Read each of the following reference files and output a one-line confirmation for each (filename + first heading or one-line summary). This confirms you can access the skill's supporting files:
Then read the SDK reference matching the user's target (from the References list above) and confirm it the same way.
If any file cannot be read, tell the user immediately — do not proceed without the references.
Check upstream artifacts before asking the user:
.telemetry/tracking-plan.yaml meta: block for destinations and platform.telemetry/product.md Integration Targets section for analytics destinationsIf the target SDK is already established in these artifacts, confirm it briefly ("The tracking plan targets Accoil via Forge — proceeding with that.") and move on. Only ask "Which SDK should this instrumentation guide target?" if no upstream context exists.
Context inheritance: Read upstream artifacts first. Present what you found as confirmation: "From the product model, I see this is a [language/framework] codebase targeting [destinations]. The audit shows [existing patterns]. Proceeding with that context." Only ask if something is missing.
Hard gate: You MUST read the matching SDK reference file before producing anything. If Forge, also read which analytics provider Forge feeds into (from meta.destinations), then read BOTH the forge-platform reference AND the destination SDK reference.
If the tracking plan's meta.destinations lists multiple analytics destinations:
The instrumentation guide must match the user's technology stack:
The core principle is always the same: centralized event definitions, async delivery, no scattered raw strings. The implementation language changes; the architecture doesn't.
If .telemetry/current-implementation.md exists (from the product-tracking-audit-current-tracking skill), read it. Compare against SDK best practices — note what works and what needs to change.
Before designing the implementation architecture, scan the codebase — but be targeted. Don't explore broadly. Focus on:
.telemetry/current-implementation.md if available)From these, extract the conventions the telemetry implementation should follow:
Design the telemetry implementation to follow these exact conventions. Don't introduce new patterns when existing ones work. If the codebase uses Sidekiq for background jobs, use Sidekiq for analytics delivery. If it uses Faraday for HTTP, use Faraday.
Read .telemetry/tracking-plan.yaml for entity traits, group hierarchy, and meta. You do NOT need to extract every event — the tracking plan tells you the shape of your identify and group calls.
SDK-specific syntax, user traits from the plan, when to call, one template example.
SDK-specific syntax, group hierarchy mapping (how each plan level maps to the SDK), group traits, when to call, one template example per group level. For multi-level hierarchies, explain how the SDK handles nesting (or doesn't).
SDK-specific syntax, SDK constraints (e.g., Accoil: no event properties), 1-2 representative template examples. Do NOT map every event.
How to track events at different group levels in this SDK. Two critical requirements:
a. Every group level needs a group() call. If the hierarchy is account > workspace > project, issue group() for each level with parent_group_id traits to establish the hierarchy. Groups must exist before events reference them.
b. Every track() call needs group context. The tracking plan assigns each event a group_level. The track call must include the group ID for that level. Show the SDK-specific pattern:
context: { groupId: 'proj_123' } in the track call's options object.groups: { project: 'proj_123' } in the track call's options object, or via Segment destination options.$groups: { project: 'proj_123' } as a property in the track call.$groups: { project: 'proj_123' } as a property (browser), or groups: { project: 'proj_123' } in the capture options (Node.js).context: { groupId: 'proj_123' } on the track call (tracker.js, Direct API, or via Segment).Also document:
System support for group hierarchy:
If the tracking plan uses multi-level groups and the target system has weak support, note the gap and suggest workarounds (e.g., flattening group traits onto events as properties).
Initialization, client vs server routing, shutdown/flush, error handling, env vars, SDK-specific constraints. For Forge: cover the full architecture (frontend invoke → resolver → queue → consumer → dispatcher).
Include in the instrumentation guide:
Ask the user: "Do you want a phased rollout (lifecycle events first, then core value) or everything at once?" If phased, include:
If the user wants everything at once, skip the phased plan and just include the verification section.
Read references/output-template.md for the output structure. Write the guide to .telemetry/instrument.md. If .telemetry/current-implementation.md exists, reference it in the guide's preamble.
Read references/behavioral-rules.md before finalizing — these are your quality checks.
These are non-negotiable (full rules in references/behavioral-rules.md):
DeliveryJob.perform(method: 'identify', payload: {...}). Simpler, easier to maintain..telemetry/instrument.md. Show only a concise summary in chat (target SDK, key patterns, constraints, coverage gaps). Never paste more than 20 lines into the conversation.model → audit → design → guide → implement ← feature updates
^
After generating the instrumentation guide, suggest the user run:
development
Build a structured product model by scanning the codebase and talking to the user. Produces .telemetry/product.md — a description of what the product does, who uses it, how value flows, and what entities exist. Use when starting telemetry work on a new codebase, when the user asks to 'model this product,' 'understand this product,' 'what does this product do,' 'map the product,' 'product model,' or when no .telemetry/product.md exists yet. This is the entry point for the telemetry lifecycle.
documentation
Update the tracking plan when a feature ships, changes, or is removed. Assesses whether new events are needed, extends existing events with properties where possible, and produces a versioned mini-delta with changelog entry. Updates .telemetry/tracking-plan.yaml, delta.md, and changelog.md. Use when the user ships a new feature, modifies existing functionality, wants to keep tracking coherent as the product evolves, 'feature shipped,' 'new feature tracking,' 'update tracking for [feature],' 'what tracking does this feature need,' or 'instrument new feature.'
development
Generate real instrumentation code from the tracking plan and instrumentation guide. Produces typed SDK wrapper functions, identity management, and integration guidance. Outputs files in a tracking/ directory. Use when the user wants to generate or regenerate tracking code, implement the delta plan, turn the instrumentation guide into working code, 'implement tracking,' 'generate code,' 'create tracking module,' or 'build analytics SDK wrapper.'
testing
Design an opinionated target tracking plan and produce an explicit delta from current state to target. Combines the product model, current-state audit, and telemetry best practices to decide what events, properties, entities, and group hierarchies should exist. Outputs .telemetry/tracking-plan.yaml and .telemetry/delta.md. Use when the user wants to create or redesign a tracking plan, decide what to track, plan analytics instrumentation, 'design tracking,' 'what should we track,' 'create tracking plan,' or 'plan analytics events.'