diff-intake

द्वारा amplitude

PR या branch diff पढ़ता है और downstream analytics instrumentation skills के लिए एक संरचित YAML change brief तैयार करता है। जब भी कोई उपयोगकर्ता PR लिंक, branch comparison या raw diff साझा करे और यह समझना चाहे कि क्या बदला, किसकी tracking ज़रूरी है या किसी feature को instrument कैसे करना है, तो इसे पहले चरण के रूप में इस्तेमाल करें। “इस PR की समीक्षा करें”, “इस branch में क्या बदला”, “इस diff को instrument करने में मेरी मदद करें”, “इस बदलाव के लिए analytics coverage जाँचें” जैसे वाक्यांशों या analytics review शुरू करने के किसी भी अनुरोध पर सक्रिय करें...

npx skills add https://github.com/amplitude/mcp-marketplace --skill diff-intake

diff-intake

Follow this skill step by step. You are step 1 of the analytics instrumentation workflow. Produce a compact YAML change brief that downstream skills (discover-event-surfaces, instrument-events) will consume. Keep the output machine-readable and precise — no prose around the YAML block.

Step 1: Gather changed files and categorize

Fetch the list of changed files from the source, then categorize each one.

Fetching changes

  • PR URL gh pr view <number-or-url> gh pr view <pr-number> --json files --jq '.files[] | "\(.path)\t+\(.additions) -\(.deletions)\t"'
  • Branch comparison git log <main|master>..<branch> git diff --stat <main|master>..<branch>
  • Ambiguous mention (PR number, branch name): infer the right form and fetch without asking unless auth fails.

Categorize files

Assign each file to a category based on its path:

  • Core Logic: application source (e.g. src/auth/login.py, database/models.ts)
  • Generated: anything with generated in its path
  • Testing: test files
  • Config / Dependencies: package.json, docker-compose.yml, etc.
  • Documentation: READMEs, docs/
  • Noise: lock-files, .svg, auto-generated migrations

For each file, record: path, category, change type (Added / Modified / Deleted), and analytics likelihood (1–5).

Step 2: Build the file summary map

Read every single Core Logic file and create the file summary map. Only process and include Core Logic files.

Fetching detailed diffs

  • PR gh pr view <number-or-url> --json baseRefOid,headRefOid Using the response, get a detailed diff git diff <baseRefOid>...<headRefOid> -- <file1> <file2> <file_n>
  • Branch comparison git diff main..feature/foo -- <file1> <file2> <file_n>

For each file, record

  • summary — 2-line summary of what changed
  • stack — frontend, backend, or shared

Also derive user-facing changes and touched surfaces

While reading the diff and the changed files, also produce the higher-level signals that downstream event discovery needs:

  • user_facing_changes — a flat list of concrete behavior changes that matter to a user, PM, or analyst. Each item should describe what a user can now do, see, or experience differently. Omit purely internal refactors.
  • surfaces.components — the UI components, routes, pages, handlers, or other interaction surfaces directly involved in those user-facing changes. Prefer likely instrumentation points over low-level helpers.

For each surface, record:

  • name — component, route, page, hook, or surface name
  • file — repo-relative path
  • change — added, modified, or deleted

If the change is backend-only or has no clear interactive surface, omit surfaces.components rather than inventing one.

Step 3: Classify the overall change

Infer the change type and analytics scope:

TypeAnalytics implication
featHigh — new surfaces likely need tracking
fixLow–Medium — may affect existing event conditions
refactorLow — tracking paths may move, regression risk
perfLow — usually no tracking impact
revertMedium — need to check what tracking was lost
style / docs / test / build / ci / choreNone — skip analytics analysis

analytics_scope = highest implication present:

  • none — only no-impact types
  • low — only perf/refactor
  • medium — fix
  • high — any feature or capability addition

If analytics_scope is none, emit the brief and note that downstream skills are not needed.

Step 4: Emit the YAML brief

Output only the YAML block — no prose before or after. Follow the format exactly. List each file individually in file_summary_map (no globs).

change_brief:
  classification:
    primary: feat           # dominant conventional commit type
    types: [feat, fix]      # all types detected
    analytics_scope: high   # none | low | medium | high
    stack: frontend         # frontend | backend | fullstack
  summary: "One sentence describing the overall change"
  user_facing_changes:
    - "Users can now upload an avatar with drag-and-drop and preview it before saving."
  surfaces:
    components:
      - name: "AvatarUpload"
        file: "src/components/AvatarUpload.tsx"
        change: modified
  file_summary_map:         # each entry includes a layer field
    - file: "src/components/AvatarUpload.tsx"
      summary: "New component for avatar upload with drag-and-drop and preview"
      layer: frontend       # frontend | backend | shared
    - file: "src/api/upload.ts"
      summary: "Upload endpoint handler, validates file type and persists to S3"
      layer: backend

amplitude की और Skills

add-analytics-instrumentation
amplitude
PR, branch, file, directory या feature के लिए एंड-टू-एंड analytics instrumentation workflow। कोड पढ़ता है, पता लगाता है कि किन events को track किया जाना चाहिए, और एक ठोस instrumentation plan तैयार करता है—वह भी एक ही बार में। जब भी कोई उपयोगकर्ता PR में analytics जोड़ना चाहे, पूछे “इस PR को instrument करो”, “इस branch में tracking जोड़ो”, “इस file के लिए कौन-से analytics चाहिए”, “checkout flow को instrument करो”, “पूरा instrumentation workflow चलाओ”, या ऐसा कोई अनुरोध करे जिसका आशय कोड से आगे बढ़कर... हो, तो इस skill का उपयोग करें।
developmentdata-analysisapi
discover-analytics-patterns
amplitude
पता लगाता है कि इस कोडबेस में एनालिटिक्स ट्रैकिंग कॉल वास्तव में कैसे लिखे गए हैं—इवेंट भेजने के लिए उपयोग किए गए ठोस SDK कॉल, फ़ंक्शन सिग्नेचर और इम्पोर्ट पैटर्न। इस स्किल का उपयोग तब करें जब आपको नई ट्रैकिंग जोड़ने से पहले मौजूदा एनालिटिक्स इंस्ट्रूमेंटेशन पैटर्न समझने हों, जब कोई पूछे कि “यहाँ इवेंट कैसे ट्रैक करते हैं?”, “एनालिटिक्स सेटअप दिखाएँ”, “इस कोडबेस में एनालिटिक्स का पैटर्न क्या है?”, या जब भी instrument-events या discover-event-surfaces स्किल्स इस बारे में हों...
developmentdata-analysisapi
discover-event-surfaces
amplitude
एक change_brief YAML (diff-intake का आउटपुट) लेकर, इंस्ट्रूमेंट करने के लिए संभावित analytics events की एक विस्तृत सूची तैयार करता है। यह PM की सोच रखने वाले इंजीनियर का दृष्टिकोण अपनाता है—विचार करने योग्य हर चीज़ सामने रखता है, ताकि PM तय कर सके कि वास्तव में क्या मायने रखता है। इसे analytics instrumentation workflow के चरण 2 के रूप में इस्तेमाल करें, ठीक उसके बाद जब diff-intake एक change_brief तैयार करे। जब भी किसी उपयोगकर्ता के पास change_brief YAML हो और वह जानना चाहे कि कौन-से analytics events जोड़ने हैं, या पूछे “क्या...
data-analysisproductivitydevelopment
instrument-events
amplitude
discover-event-surfaces से प्राप्त event_candidates YAML को लेकर, priority-3 (critical) इवेंट्स के लिए एक ठोस instrumentation plan तैयार करता है। Software Architect की तरह काम करते हुए, कोडबेस में मौजूदा analytics patterns खोजता है, hinted files पढ़कर पता लगाता है कि कौन-से variables scope में हैं, chart के लिए उपयोगी न्यूनतम properties डिज़ाइन करता है और हर tracking call के लिए सटीक insertion point पहचानता है। एक संरचित JSON trackingPlan आउटपुट करता है। इसे analytics instrumentation के चरण 3 के रूप में उपयोग करें...
developmentdata-analysisapi
taxonomy
amplitude
Amplitude में इवेंट टैक्सोनॉमी जनरेशन, डेटा ऑडिटिंग और गवर्नेंस की सर्वोत्तम प्रथाओं के लिए सत्य का स्रोत। इसका उपयोग तब करें जब किसी एजेंट को इवेंट ट्रैकिंग योजनाएँ, नामकरण परंपराएँ, प्रॉपर्टी मानक, डेटा गुणवत्ता या अप्रचलन वर्कफ़्लो बनाने, मान्य करने, ऑडिट करने, स्कोर करने या उनमें सुधार सुझाने की आवश्यकता हो—इसमें किसी योजना की ग्राहक के अपने मानक (Data → Settings naming conventions और AI Context) के विरुद्ध जाँच करना भी शामिल है। इसमें नामकरण नियम, प्रॉपर्टी मानक, स्कोरिंग फ़्रेमवर्क, सुरक्षित मेटाडेटा... शामिल हैं।
data-analysisproductivityapi