Skip to content

[Claude Skill] feat(claude): add api-version-upgrade skill#3716

Open
harsh-joshi99 wants to merge 9 commits intomainfrom
add-api-version-upgrade-skill
Open

[Claude Skill] feat(claude): add api-version-upgrade skill#3716
harsh-joshi99 wants to merge 9 commits intomainfrom
add-api-version-upgrade-skill

Conversation

@harsh-joshi99
Copy link
Copy Markdown
Contributor

@harsh-joshi99 harsh-joshi99 commented Apr 13, 2026

Summary

  • Adds the api-version-upgrade Claude skill to claude/skills/ so all contributors have access to it directly from the repo
  • Includes SKILL.md (full workflow) and three reference docs: common patterns, feature flags best practices, and testing guide

What the skill does

Automates the complete workflow for upgrading API versions in action destinations:

  • Detects current version, fetches and analyzes changelogs for breaking changes
  • Implements upgrades behind feature flags using the versioning-info.ts canary pattern
  • Updates all API call sites to use getApiVersion(features)
  • Adds tests for both stable and canary versions
  • Creates a PR with breaking changes documentation

Test plan

  • Verify skill files are present at .claude/skills/api-version-upgrade/
  • Confirm skill is invocable via /api-version-upgrade in Claude Code sessions within this repo

🤖 Generated with Claude Code

Adds the api-version-upgrade Claude skill to the repo so it's available
to all contributors working in this codebase. Includes the main SKILL.md
workflow and reference docs for common patterns, feature flags, and testing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 13, 2026 06:03
@harsh-joshi99 harsh-joshi99 marked this pull request as draft April 13, 2026 06:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Claude skill (api-version-upgrade) to standardize and automate API version upgrade work for action destinations, including feature-flag canary patterns, changelog analysis, and testing guidance.

Changes:

  • Introduces claude/skills/api-version-upgrade/SKILL.md with an end-to-end upgrade workflow (steps, commands, templates).
  • Adds reference docs covering common versioning patterns, feature-flag best practices, and a testing guide for upgrades.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
claude/skills/api-version-upgrade/SKILL.md Main workflow doc for performing API version upgrades behind a feature flag, including testing + PR creation steps
claude/skills/api-version-upgrade/references/testing-guide.md Guidance on running/updating tests during API upgrades
claude/skills/api-version-upgrade/references/feature-flags.md Reference on feature-flag lifecycle, naming, rollout/monitoring guidance
claude/skills/api-version-upgrade/references/common-patterns.md Catalog of versioning patterns used in destinations, with example snippets

Comment thread .claude/skills/api-version-upgrade/references/testing-guide.md
Comment thread claude/skills/api-version-upgrade/SKILL.md Outdated
Comment thread .claude/skills/api-version-upgrade/SKILL.md
Comment thread claude/skills/api-version-upgrade/SKILL.md Outdated
Comment thread claude/skills/api-version-upgrade/references/common-patterns.md Outdated
Comment thread .claude/skills/api-version-upgrade/SKILL.md
harsh-joshi99 and others added 2 commits April 26, 2026 15:05
- Fix all test commands to use `TZ=UTC yarn cloud jest --testPathPattern="src/destinations/..."` per CLAUDE.md
- Remove false warning about --testPathPattern being unavailable
- Replace __validation__ directory references with opt-in script guidance (no such dir exists in repo)
- Remove claim that validation-report.md is gitignored; recommend sanitized PR summary instead of committing raw output
- Fix Klaviyo example: align constant names (*_API_VERSION everywhere, not mixed *_REVISION)
- Clarify step numbering: steps 0–8 + sub-step 5.5 = 10 headers, /8 denominator is intentional

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…testing.md

`yarn cloud test --testPathPattern=src/destinations/<dest>` is the documented
command in docs/testing.md. Replace all remaining `yarn cloud jest` references
with the correct form.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 26, 2026 09:41
…ation pattern

Adds the direct node/jest.js form that IDEs generate when running a single
test case, alongside the workspace-level yarn cloud test command.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@harsh-joshi99 harsh-joshi99 changed the title feat(claude): add api-version-upgrade skill [Skill] feat(claude): add api-version-upgrade skill Apr 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.

Comment thread .claude/skills/api-version-upgrade/references/feature-flags.md
Comment thread .claude/skills/api-version-upgrade/references/testing-guide.md
Comment thread .claude/skills/api-version-upgrade/references/feature-flags.md
Comment thread claude/skills/api-version-upgrade/SKILL.md Outdated
Comment thread claude/skills/api-version-upgrade/SKILL.md Outdated
Comment thread claude/skills/api-version-upgrade/references/common-patterns.md Outdated
Comment thread .claude/skills/api-version-upgrade/references/common-patterns.md
Comment thread claude/skills/api-version-upgrade/references/common-patterns.md Outdated
@harsh-joshi99 harsh-joshi99 changed the title [Skill] feat(claude): add api-version-upgrade skill [Claude Skill] feat(claude): add api-version-upgrade skill Apr 26, 2026
harsh-joshi99 and others added 2 commits April 26, 2026 15:18
…ments

- Move skill from claude/skills/ to .claude/skills/ so Claude Code can discover it
- Update SKILL.md frontmatter to match existing skill format (version, list-style
  allowed-tools, AskUserQuestion, disable-model-invocation)
- Replace generic FLAGON_NAME = 'destination-canary-version' with
  '{destination-slug}-canary-version' placeholder throughout to prevent collisions
- Replace inaccurate CM360 real-world example with Google Enhanced Conversions,
  which actually uses this canary pattern in the repo
- Update "Used by" list: CM360 → Google Enhanced Conversions
- Fix PR template flag name placeholder in feature-flags.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 26, 2026 11:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread .claude/skills/api-version-upgrade/references/common-patterns.md Outdated
Comment thread .claude/skills/api-version-upgrade/SKILL.md Outdated
Comment thread .claude/skills/api-version-upgrade/SKILL.md Outdated
Comment thread .claude/skills/api-version-upgrade/SKILL.md
…ents

- Fix vv21 double-prefix bug in GEC URL example (version already contains 'v')
- Replace scoped Bash(cmd *) allowlist with plain `- Bash` to match other skills
- Reword import/first claim: not an enforced lint rule, just a style guideline

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread .claude/skills/api-version-upgrade/SKILL.md
Comment thread .claude/skills/api-version-upgrade/references/testing-guide.md
Comment thread .claude/skills/api-version-upgrade/references/feature-flags.md
@harsh-joshi99 harsh-joshi99 marked this pull request as ready for review April 27, 2026 07:23
AnkitSegment and others added 2 commits April 30, 2026 15:34
- Add Step 1.2: Detect destination mode (cloud vs browser)
- Split Step 4 into 4A (cloud mode - feature flags) and 4B (browser mode - opt-in)
- Update Step 5: Add browser-specific test patterns (SDK loading tests)
- Update mandatory requirements to clarify mode-specific patterns
- Add routing logic to guide between cloud and browser implementations

Key differences documented:
- Cloud: runtime feature flags, getApiVersion(features), features parameter
- Browser: opt-in via dropdown, no runtime flag, SDK from CDN

This maintains all existing cloud-mode logic while adding deterministic
support for browser destinations based on Braze web upgrade experience.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 30, 2026 11:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.


## Pattern 1: Canary with versioning-info.ts (Preferred)

**Used by**: Google Enhanced Conversions, The Trade Desk CRM
source ~/.nvm/nvm.sh && nvm use 22.13.1

# Run browser destination tests
TZ=UTC yarn test --testPathPattern="destinations/{destination}" --no-coverage
which gh && gh --version
which yarn && yarn --version
which node && node --version
which nvm || (source ~/.nvm/nvm.sh && nvm --version)
Comment on lines +554 to +557
- **Feature Flags at Segment**: [Internal docs link]
- **Rollout best practices**: [Internal docs link]
- **Monitoring dashboards**: [Dashboard links]
- **On-call runbooks**: [Runbook links]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants