diff-intake
amplitude/mcp-marketplace
Parse PR diffs into structured YAML briefs for analytics instrumentation workflows.
What is diff-intake?
diff-intake reads a PR or branch diff and produces a machine-readable YAML change brief that downstream analytics skills consume. Use this as the first step when reviewing code changes to understand what changed, identify user-facing behavior shifts, and prepare for event instrumentation.
- Fetches and categorizes changed files from PR URLs, branch comparisons, or raw diffs
- Reads Core Logic files and builds a detailed file summary map with layer classification (frontend/backend/shared)
- Identifies user-facing changes and interaction surfaces (components, routes, handlers) relevant to analytics
- Classifies the overall change type (feat/fix/refactor/perf/etc.) and determines analytics scope (none/low/medium/high)
- Emits a compact, machine-readable YAML brief for downstream event discovery and instrumentation skills
How to install diff-intake
npx skills add https://github.com/amplitude/mcp-marketplace --skill diff-intake- Git repository access (local or via gh CLI)
- GitHub CLI (gh) installed for PR fetching, or ability to provide raw diffs
- Access to the branch or PR being analyzed
How to use diff-intake
- 1.Provide a PR URL, branch name, or raw diff when asking the skill to analyze changes
- 2.The skill will fetch the diff and categorize all changed files
- 3.It will read Core Logic files in detail and extract user-facing changes and interaction surfaces
- 4.Review the emitted YAML brief to understand what changed and which surfaces need instrumentation
- 5.Pass the YAML brief to downstream skills (discover-event-surfaces, instrument-events) for event discovery and tracking setup
Use cases
- Start an analytics review workflow when a user shares a PR link and asks 'what changed' or 'help me instrument this'
- Determine which surfaces need event tracking before running discover-event-surfaces or instrument-events skills
- Quickly assess analytics impact of a code change by classifying it as feature, fix, refactor, or chore
- Prepare a structured handoff document for analytics teams reviewing a feature branch or pull request
- Identify user-facing behavior changes that should be tracked for product analytics
- Analytics engineers instrumenting new features
- Product managers reviewing code changes for tracking coverage
- Developers preparing PRs and wanting to understand instrumentation needs
- Teams using multi-step analytics instrumentation workflows
diff-intake FAQ
Provide the diff text directly. The skill will parse it to categorize files and extract changes without needing GitHub CLI access.
No. diff-intake produces a structured brief for downstream skills. Use discover-event-surfaces and instrument-events to actually define and add tracking.
Only Core Logic files (application source code). Generated, test, config, documentation, and noise files are categorized but not read in detail.
By classifying the change type (feat/fix/refactor/perf/etc.). Features and capability additions get 'high' scope; fixes get 'medium'; refactors and perf get 'low'; style/docs/test/build/ci/chore get 'none'.
The skill will emit the brief with an empty user_facing_changes list and note that downstream analytics skills are not needed.
Full instructions (SKILL.md)
Source of truth, from amplitude/mcp-marketplace.
name: diff-intake description: > Reads a PR or branch diff and produces a structured YAML change brief for downstream analytics instrumentation skills. Use this as the first step whenever a user shares a PR link, branch comparison, or raw diff and wants to understand what changed, what needs tracking, or how to instrument a feature. Trigger on phrases like "review this PR", "what changed in this branch", "help me instrument this diff", "check analytics coverage for this change", or any request to start the analytics review workflow.
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
generatedin 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,headRefOidUsing the response, get a detailed diffgit 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 changedstack— 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 namefile— repo-relative pathchange—added,modified, ordeleted
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:
| Type | Analytics implication |
|---|---|
| feat | High — new surfaces likely need tracking |
| fix | Low–Medium — may affect existing event conditions |
| refactor | Low — tracking paths may move, regression risk |
| perf | Low — usually no tracking impact |
| revert | Medium — need to check what tracking was lost |
| style / docs / test / build / ci / chore | None — skip analytics analysis |
analytics_scope = highest implication present:
none— only no-impact typeslow— only perf/refactormedium— fixhigh— 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
Related skills
More from amplitude/mcp-marketplace and the wider catalog.

discover-analytics-patterns
Discover how your codebase instruments analytics events—SDK calls, patterns, and naming conventions.

discover-event-surfaces
Generate exhaustive analytics event candidates from code changes for PM review.

instrument-events
Generate concrete analytics instrumentation plans from event candidates for critical tracking implementation.

taxonomy
Source of truth for event taxonomy generation, data auditing, and governance in Amplitude.

angular-component
DEPRECATED: Create modern Angular v20+ standalone components with signals and OnPush change detection.

angular-di
DEPRECATED: Use official Angular skills instead. Dependency injection patterns for Angular v20+.