docs: harden destination-generator skill from PR feedback + document /orchestrate#3852
Open
mdkhan-tw wants to merge 1 commit into
Open
docs: harden destination-generator skill from PR feedback + document /orchestrate#3852mdkhan-tw wants to merge 1 commit into
mdkhan-tw wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
Adds and expands documentation around using Claude Code “skills” to scaffold Segment action-destinations, including a new /orchestrate end-to-end flow and stronger guidance for batching, typing, snapshots, and registration conventions.
Changes:
- Adds a new top-level README section introducing Claude Code scaffolding commands.
- Expands
.claude/skillsdocs with an/orchestratequick path and updated generated file conventions. - Updates the
/generate-destinationcommand guidance (batching, typed I/O, snapshot tests, and avoiding placeholder destination IDs).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| README.md | Adds a “Generate a Destination with Claude Code” section and command list. |
| .claude/skills/README.md | Adds /orchestrate documentation and updates generated destination structure/conventions. |
| .claude/skills/QUICK_START.md | Adds an /orchestrate fast path and updates the file map. |
| .claude/commands/generate-destination.md | Adds detailed generator rules for file organization, batching, typed requests/responses, and snapshot testing. |
Comment on lines
+54
to
+59
| | Command | What it does | | ||
| | ----------------------- | ----------------------------------------------- | | ||
| | `/refined-actions` | Turn a PRD or API docs into a list of actions | | ||
| | `/endpoint-mapping` | Map those actions to API endpoints and fields | | ||
| | `/spec-generator` | Produce a full destination spec document | | ||
| | `/generate-destination` | Generate the destination code, types, and tests | |
Comment on lines
+21
to
+29
| | Step | Skill | Output | | ||
| | ----------------- | ----------------------- | --------------------------------------------------------------- | | ||
| | 1. Refine | `/refined-actions` | `refined-actions.md` / `.json` | | ||
| | 2. Map | `/endpoint-mapping` | `endpoint-mapping.md` / `.json` | | ||
| | 3. Spec | `/spec-generator` | `final-spec.md` | | ||
| | 4. Generate | `/generate-destination` | code in `packages/destination-actions/src/destinations/<slug>/` | | ||
| | 5. Test (local) | `/test-destination-e2e` | local e2e results | | ||
| | 6. Deploy | `/deploy-staging` | staging deploy | | ||
| | 7. Test (staging) | `/test-destination-e2e` | staging e2e results | |
Comment on lines
+27
to
+29
| | 5. Test (local) | `/test-destination-e2e` | local e2e results | | ||
| | 6. Deploy | `/deploy-staging` | staging deploy | | ||
| | 7. Test (staging) | `/test-destination-e2e` | staging e2e results | |
Comment on lines
+126
to
+130
| | Spec Auth Type | Code Pattern | | ||
| | -------------- | -------------------------------------------- | | ||
| | OAuth 2.0 | `scheme: 'oauth2'` with `refreshAccessToken` | | ||
| | API Key | `scheme: 'custom'` with key in `fields` | | ||
| | Basic Auth | `scheme: 'basic'` with username/password | |
|
|
||
| Run tests: `yarn cloud jest --testPathPattern="<destination-slug>"` | ||
| Run tests. Note the repo has a Jest version quirk: the `yarn cloud jest` wrapper may resolve to an incompatible root Jest. If you hit a `Cannot read properties of undefined (reading 'bind')` error, run the package-local binary directly instead: | ||
|
|
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
Updates the Claude Code destination-generator skill and its docs. No product/destination code changes — this is tooling + documentation only (
.claude/skills and READMEs).Two things:
/generate-destinationskill so future generated destinations follow repo conventions by default./orchestrateone-command pipeline for end users (root README + skills README/QUICK_START).All patterns were verified against existing destinations in the repo (
klaviyo,reddit-conversions-api,iterable,ms-bing-capi,s3,trackey) before being written into the skill.Feedback incorporated into
generate-destination.mdbatch_keys+ implementperformBatchenable_batching/batch_size/batch_keysfield defs +perform/performBatchdelegating to a sharedutils.tshelper. Added to constraints & checklist.destinations/index.tssprout).types.ts, annotated request bodies,request<ResponseType>(...).types.ts,constants.ts,utils.tsfor send logicconstants.ts, interfaces →types.ts, send logic →utils.ts; actions are thin wrappers).generateTestDataboilerplate;snapshot.test.tsadded to structure & checklist.Also fixed the documented test command to use the package-local Jest binary (avoids the root Jest 30
bindcrash)./orchestratedocumentationREADME.md— new concise, end-user-facing "Generate a Destination with Claude Code" section (+ TOC entry)..claude/skills/README.md— "🚀 Start here:/orchestrate" section with the 7-step pipeline and conventions callout..claude/skills/QUICK_START.md—/orchestratefastest-path at the top + pipeline commands in the file-locations table.Files changed
.claude/commands/generate-destination.md.claude/skills/README.md.claude/skills/QUICK_START.mdREADME.mdTesting
Docs/skill-definition changes only — no runtime code affected. All patterns cross-checked against existing destinations for accuracy.
🤖 Generated with Claude Code