add-analytics-instrumentation
Skill0 starsChanged 8 months agoMITView on GitHub
End-to-end instrumentation workflow orchestrating diff-intake → discover-event-surfaces → instrument-events. Uses mcp__Amplitude__get_event_properties, mcp__Amplitude__get_project_context.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- rittmananalytics/wire-plugintheir own version, first seen Jun 10, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- rittmananalytics/wire-plugin★ 9same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository190 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessibility-auditSkill
- accessibility-complianceSkill
- ado-api-cliSkill
- ado-artifactsSkill
- ado-container-deploymentsSkill
- ado-organizationSkill
- ado-pipeline-designSkill
- ado-pipeline-optimizationSkill
- ado-pipeline-securitySkill
- ado-pipelines-opsSkill
- ado-release-managementSkill
- ado-security-policiesSkill
- ado-work-trackingSkill
- adr-writingSkill
- agentic-ai-patternsSkill
- agentic-evalSkill
- agentic-memorySkill
- agentic-reliabilitySkill
- agentic-securitySkill
- ai-data-moatSkill
- ai-harnessSkill
- ai-product-designSkill
- ai-product-monetizationSkill
- ai-product-positioningSkill
- ai-product-retentionSkill
- ai-product-validationSkill
- ai-safety-guardrailsSkill
- analyze-account-healthSkill
- analyze-ai-topicsSkill
- analyze-chartSkill
- analyze-dashboardSkill
- analyze-experimentSkill
- analyze-feedbackSkill
- compare-user-journeysSkill
- create-chartSkill
- create-dashboardSkill
- daily-briefSkill
- debug-replaySkill
- diagnose-errorsSkill
- diff-intakeSkill
- discover-analytics-patternsSkill
- discover-event-surfacesSkill
- discover-opportunitiesSkill
- instrument-eventsSkill
- investigate-ai-sessionSkill
- monitor-ai-qualitySkill
- monitor-reliabilitySkill
- replay-ux-auditSkill
- review-agent-insightsSkill
- taxonomySkill
- weekly-briefSkill
- what-would-lenny-doSkill
- analytics-reportingSkill
- api-contract-testingSkill
- api-designSkill
- authentication-patternsSkill
- blockchain-auditSkill
- brainstormingSkill
- brand-voiceSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 14 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Before a feature ships: "make sure we're tracking everything in this release"
- Distinctive: line 13
After a feature ships: "what did we miss tracking in last week's release?"
- Distinctive: line 14
When an analytics audit reveals coverage gaps in a specific user flow
- Distinctive: line 20
Ask (or infer from context) what the user has provided:
- Distinctive: line 39
Read the files directly
- Distinctive: line 44
Search git history for recent commits matching the feature
- Distinctive: line 57
Check Amplitude for existing events (no duplicates)
- Distinctive: line 78
Ask: "Does this list look complete?
- Distinctive: line 90
Test: Test case definition
- Distinctive: line 122
After presenting all event specs:
- Distinctive: line 124
Ask: "Should I implement these tracking calls directly in the codebase, or is this a spec for your team?"
- Distinctive: line 125
If implementing: write the tracking calls file by file
- Distinctive: line 126
If spec only: offer to export as markdown table or YAML tracking plan
- Distinctive: line 141
Priority triage: Not all events are equal — critical funnel events ship first.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add Analytics Instrumentation
When to Use
- This is the primary entry point for all instrumentation work — users invoke this skill, not the sub-skills directly
- A PM or engineer says "add analytics to this feature" or "track this PR"
- Before a feature ships: "make sure we're tracking everything in this release"
- After a feature ships: "what did we miss tracking in last week's release?"
- When an analytics audit reveals coverage gaps in a specific user flow
Core Jobs
Step 0: Capture Intent and Classify Input
Ask (or infer from context) what the user has provided:
| Input Type | How to Detect | Ingestion Path |
| PR URL | github.com/.../pull/NNN | Fetch diff via GitHub API |
| Branch name | feat/, fix/, etc. | Run git diff main...branch |
| File or directory | /src/... path | Read files directly |
| Feature description | Free text | Search codebase for relevant files |
Confirm: "I'll instrument the [checkout flow / PR #234 / feat/new-onboarding] — is that right?"
Step 1: Gather Code (Invoke Diff-Intake)
For PR or branch input:
- Fetch the diff or run git commands to get changed files
- Invoke the
diff-intakeskill logic to produce the structured YAML brief - Output: YAML brief with
new_surfaces,removed_surfaces,changed_behaviors
For file/directory input:
- Read the files directly
- Identify analytics-relevant code (UI components, handlers, API calls)
- Produce an equivalent YAML brief inline
For feature description input:
- Search git history for recent commits matching the feature
- Find the relevant files in the codebase
- Produce the YAML brief from code inspection
Validation: Confirm the brief captures what the user expected. Show a 3-bullet summary:
- "N new UI surfaces found (screens, forms, buttons)"
- "N behaviors changed in existing flows"
- "Estimated N new events needed"
Step 2: Discover Event Surfaces (Invoke Discover-Event-Surfaces)
Pass the YAML brief to the discover-event-surfaces skill logic:
- Check Amplitude for existing events (no duplicates)
- Map each new surface to candidate events
- Apply naming convention (verb_noun snake_case)
- Identify required properties per event
- Flag funnel-critical events
- Prioritize by business value (critical / high / medium / low)
Show results grouped by priority:
CRITICAL (funnel steps — must track):
- checkout_confirmation_viewed
- order_placed
HIGH (key engagement — should track):
- shipping_address_submitted
- promo_code_applied
MEDIUM (informational — nice to have):
- order_details_expandedAsk: "Does this list look complete? Are there events you'd add or remove before I write the specs?"
Step 3: Generate Tracking Plan (Invoke Instrument-Events)
For each approved event candidate, invoke instrument-events logic to produce the full spec:
For each event, present:
- What: Event name and trigger condition
- Why: Business question this event answers
- Where: Exact file and code location
- Properties: Full type-annotated property table
- Code: Ready-to-paste tracking call in the project's SDK style
- Test: Test case definition
Format as sequential steps an engineer can follow:
## Event 1: checkout_confirmation_viewed
WHY: Measures how many users successfully reach order confirmation
(critical for purchase funnel conversion rate).
WHERE: src/pages/checkout/ConfirmationPage.tsx — in useEffect after order loads
WHAT TO ADD:
useEffect(() => {
if (!order?.id) return;
track(Events.CHECKOUT_CONFIRMATION_VIEWED, {
order_id: order.id,
order_total: order.totalAmount,
payment_method: order.paymentMethod,
items_count: order.items.length,
});
}, [order]);
PROPERTIES:
order_id (string, required): "ord_abc123"
order_total (number, required, USD): 49.99
payment_method (string, required): credit_card | paypal | apple_pay
items_count (number, required): 3Final Confirmation
After presenting all event specs:
- Ask: "Should I implement these tracking calls directly in the codebase, or is this a spec for your team?"
- If implementing: write the tracking calls file by file
- If spec only: offer to export as markdown table or YAML tracking plan
Also offer: "Would you like me to add these events to your Amplitude tracking plan taxonomy?"
MCP Tools
mcp__Amplitude__get_event_properties— check existing events before proposing new ones; match property naming to existing schemamcp__Amplitude__get_project_context— confirm the Amplitude project and get project ID for any schema lookups
Key Concepts
- Orchestration skill: This skill calls the logic of three sub-skills in sequence — users never need to invoke the sub-skills manually
- Tracking plan: The full output of this workflow — a document specifying every event, its trigger, and its properties
- Funnel completeness: A tracking plan is only valuable if it covers every step in the user's critical path — gaps break conversion analysis
- Event-by-event review: Presenting results event-by-event (not all at once) helps users catch mistakes before implementation
- Priority triage: Not all events are equal — critical funnel events ship first; lower-priority events can be a follow-up
Output Format
Three-phase output:
Phase 1 — Brief Summary (after diff-intake):
Found N changes across X files.
New surfaces: <list>
Changed behaviors: <list>
Estimated events needed: NPhase 2 — Event Candidate Review (after discover-event-surfaces):
Grouped by priority (CRITICAL / HIGH / MEDIUM / LOW)
Await user confirmation before proceedingPhase 3 — Implementation Specs (after instrument-events):
One section per event with: WHY / WHERE / WHAT TO ADD / PROPERTIES
Followed by: offer to implement or exportDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

