[Claude Skill] feat(claude): add api-version-upgrade skill#3716
Open
harsh-joshi99 wants to merge 9 commits intomainfrom
Open
[Claude Skill] feat(claude): add api-version-upgrade skill#3716harsh-joshi99 wants to merge 9 commits intomainfrom
harsh-joshi99 wants to merge 9 commits intomainfrom
Conversation
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>
Contributor
There was a problem hiding this comment.
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.mdwith 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 |
- 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>
…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>
…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>
…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>
- 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>
|
|
||
| ## 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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
api-version-upgradeClaude skill toclaude/skills/so all contributors have access to it directly from the repoSKILL.md(full workflow) and three reference docs: common patterns, feature flags best practices, and testing guideWhat the skill does
Automates the complete workflow for upgrading API versions in action destinations:
versioning-info.tscanary patterngetApiVersion(features)Test plan
.claude/skills/api-version-upgrade//api-version-upgradein Claude Code sessions within this repo🤖 Generated with Claude Code