Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Specifies what analytics events to track, when they fire, and what properties to include, as a contract between product and engineering that prevents undertracked features. Use before engineering builds a feature or when auditing existing tracking for gaps. For the dashboard built on top of these events, use measure-dashboard-requirements instead.
.claude/skills/product-on-purpose-measure-instrumentation-spec/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -5% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 54% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 38% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 66% | 0% |
<!-- PM-Skills | https://github.com/product-on-purpose/pm-skills | Apache 2.0 -->
An instrumentation spec defines what analytics events to track, when to fire them, and what properties to include. It serves as a contract between product and engineering, ensuring consistent data collection that enables accurate measurement. Good instrumentation specs prevent the "we can't answer that question because we didn't track it" problem.
measure-dashboard-requirementsmeasure-experiment-designdeliver-prd firstmeasure-experiment-results or measure-survey-analysisWhen asked to create an instrumentation spec, follow these steps:
Start with the questions you need to answer. What will you measure? What decisions will this data inform? This prevents over-instrumentation while ensuring nothing important is missed.
List each user action or system event that should be tracked. Follow consistent naming conventions (typically noun_verb or verb_noun in snake_case). Each event should represent a distinct, meaningful action.
For each event, describe exactly when it fires. Be precise: "When user clicks Submit button" vs. "When form is submitted successfully." These are different events with different meanings.
List the properties (attributes) attached to each event. Include property name, data type, description, and example values. Properties provide context that makes events useful.
Identify persistent user-level attributes that should be associated with all events (e.g., subscription tier, account creation date). These enable segmentation in analysis.
Flag any properties that contain personally identifiable information. Document how PII should be handled - hashing, encryption, or exclusion.
When the feature sends user input to a model and the exchange is captured, extend this section to cover the trace as well. A trace is not an event: an event carries properties you chose in advance, while a trace carries what the user typed and what the model wrote back, which is free text that can contain anything the user decided to put in it. Decide and record four things: what is captured, what redaction runs before storage and whether it runs before the trace leaves the process, how long traces are retained and what deletes them, and what fraction of requests is sampled and how that sample is chosen. A uniform sample is the wrong instrument for finding rare failures; if the traces exist to diagnose bad output, oversample the flagged cases and say so.
Define how QA should verify that tracking is implemented correctly. Include steps to validate events fire at the right times with correct properties.
Use the template in references/TEMPLATE.md to structure the output. A complete spec fills every template section: Overview; Event Inventory; User Properties; PII & Privacy Considerations; Implementation Notes; and Testing Checklist.
Before finalizing, verify:
See references/EXAMPLE.md for a completed example.
Other measured skills in the registry, with their headline benchmark lift.