kienbui1995/magic-powers/add-analytics-instrumentation
Claude Code and agent skill by kienbui1995/magic-powers
- community
Checking that the SKILL.md file is still in the repository.
End-to-end instrumentation workflow orchestrating diff-intake → discover-event-surfaces → instrument-events. Uses mcp__Amplitude__get_event_properties, mcp__Amplitude__get_project_context.
Install
npx vskill@latest install kienbui1995/magic-powers/add-analytics-instrumentationSKILL.md
The same SKILL.md was published earlier as kienbui1995/magic-powers/add-analytics-instrumentation.
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:
Ask: "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:
Final 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):
Phase 2 — Event Candidate Review (after discover-event-surfaces):
Phase 3 — Implementation Specs (after instrument-events):
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/amplitude/add-analytics-instrumentation/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kienbui1995/magic-powers/add-analytics-instrumentation)