Skip to content

chore(skills): add sdk-sample-sync skill#133

Merged
jackchuka merged 1 commit into
mainfrom
chore/add-sdk-sample-sync-skill
Jun 9, 2026
Merged

chore(skills): add sdk-sample-sync skill#133
jackchuka merged 1 commit into
mainfrom
chore/add-sdk-sample-sync-skill

Conversation

@jackchuka

Copy link
Copy Markdown
Member

What

Adds a Claude Code skill — sdk-sample-sync — that verifies and updates the hand-written @tailor-platform/sdk code samples in this repo against the currently published SDK, and keeps the companion source in tailor-platform/templates in sync.

.claude/skills/sdk-sample-sync/
├── SKILL.md                       # the workflow
└── scripts/verify-sdk-project.sh  # install → tailor-sdk generate → tsc, with cleanup

Why

docs/sdk/ is auto-synced from the SDK package (scripts/docs-sync + sdk-docs-sync CI), but the tutorials/guides are hand-typed and nothing regenerates them — so they silently rot when the SDK API changes. That's exactly what happened to the develop-from-scratch tutorial.

The skill captures the workflow used to fix it:

  • Source of truth = the published package. npm pack @tailor-platform/sdk@latest, read its bundled docs/ + CHANGELOG.md. Don't trust memory.
  • Verify empirically. Prove fixes against the runnable templates project via verify-sdk-project.sh (install → generate → typecheck, cleaning up untracked generated artifacts).
  • Hunt silent failures. A snippet can compile and still be wrong — e.g. the webhook body: field type-checked but was silently dropped (requestBody: is the real field). The skill teaches the TS7031-probe to expose unrecognized field names.
  • Lockstep updates. Edit the templates source and the docs prose together; open cross-linked draft PRs.

Notes

Adds a Claude Code skill that verifies and updates the hand-written
@tailor-platform/sdk code samples in this repo (tutorials, guides,
getting-started) against the currently published SDK, and keeps the companion
source in tailor-platform/templates in sync.

The docs/sdk reference is auto-synced from the SDK package, but the
hand-written tutorials are not — so they silently rot when the SDK API
changes. This skill captures the verify-empirically workflow: npm pack the
published package as source of truth, prove fixes against the runnable
templates project (install -> tailor-sdk generate -> tsc), and probe for
silent failures (a snippet can compile yet be wrong, e.g. webhook body vs
requestBody).

- .claude/skills/sdk-sample-sync/SKILL.md
- .claude/skills/sdk-sample-sync/scripts/verify-sdk-project.sh
@jackchuka
jackchuka marked this pull request as ready for review June 9, 2026 01:25
@jackchuka
jackchuka requested a review from a team as a code owner June 9, 2026 01:25
@jackchuka
jackchuka merged commit 437fe2a into main Jun 9, 2026
3 checks passed
@jackchuka
jackchuka deleted the chore/add-sdk-sample-sync-skill branch June 9, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants