Skip to content

add a claude skill to check and update SDK exmaple code#2496

Open
ElliotFriend wants to merge 4 commits into
mainfrom
feat/sdk-updates-skill
Open

add a claude skill to check and update SDK exmaple code#2496
ElliotFriend wants to merge 4 commits into
mainfrom
feat/sdk-updates-skill

Conversation

@ElliotFriend

@ElliotFriend ElliotFriend commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

I asked Claude to help me figure out the best way to approach this. The result was this skill, which was recommended to live inside this repo, and Claude somehow "wired it" into my local machine's scheduler (or something like that). in any case, the skill is also manually runnable, and i'll have some PRs from that push soon.

here are the PRs that this skill produced this morning:

@stellar-jenkins-ci

Copy link
Copy Markdown

Expand the update-sdk-examples skill based on lessons from its first real
run, where a clean release-diff check still left many pre-existing stale
examples untouched:

- Document two modes: the default per-release diff, and a full standing-
  correctness audit that ignores the state file (for first adoption and
  periodic runs).
- Treat repo/path/coordinate relocations as breaking changes, not just
  version bumps.
- Grep all of docs/ for the stale token directly rather than trusting a
  partial/agent-produced file list; ignore the i18n/ directory.
- Add a verify-against-current-source step before editing, and prefer
  aliasing to preserve code bodies on import-path changes.
- Refresh the stellar-rpc gotcha (Go RPC client moved into go-stellar-sdk)
  and add fork/upstream and shell-editing (perl/zsh/BSD sed) gotchas.
- Report the mode and the deliberately-not-edited candidates for review.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@stellar-jenkins-ci

Copy link
Copy Markdown

- Branch chore/ work off `upstream/main` (the canonical stellar/stellar-docs),
  not the local `main` branch — so the skill is safe in a detached worktree
  (no same-branch-in-two-worktrees collision) and never hijacks a human's
  current branch.
- Add a "Running unattended" section for scheduled runs: no human in the loop,
  so skip-and-report when uncertain rather than guess, commit but never push,
  expect a detached upstream/main worktree, use HTTPS/gh api (no SSH agent),
  and always produce the report.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@stellar-jenkins-ci

Copy link
Copy Markdown

@briwylde08 briwylde08 requested a review from kaankacar June 16, 2026 16:08
@ElliotFriend ElliotFriend marked this pull request as ready for review June 16, 2026 16:12
Copilot AI review requested due to automatic review settings June 16, 2026 16:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 repository-local Claude skill that documents a repeatable workflow for detecting Stellar SDK releases/relocations and updating corresponding code snippets across docs/, with guidance for both scheduled “release-diff” runs and periodic full audits.

Changes:

  • Introduces the update-sdk-examples skill with a two-mode audit process (release-diff vs full audit).
  • Documents release discovery, verification, scoped editing rules, and reporting expectations for SDK example updates.
  • Adds operational guidance for unattended/scheduled runs and known gotchas encountered in practice.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,161 @@
---
name: update-sdk-examples
description: Use when checking whether Stellar SDKs listed in the docs have new releases, or when code examples in docs/ may use outdated, renamed, or deprecated SDK syntax. Runs per-release on a schedule, or as a full standing-correctness audit on demand.
Comment on lines +46 to +50
2. **Check releases.** Confirm the working tree is clean and that you're working
from a current `upstream/main` — the canonical `stellar/stellar-docs` (if you
cloned the official repo directly rather than a fork, that's your
`origin/main`). For each SDK, fetch the latest release
tag (`gh api repos/<owner>/<repo>/releases/latest`, falling back to the
Comment on lines +15 to +16
- Release state file: `~/.claude/stellar-sdk-release-state.json`
(maps repo/package URL → last-seen release tag)
Comment on lines +73 to +75
translations mirror `docs/`, lag behind (they may still show APIs you've
already migrated), and are an unused holdover from previous translation
processes - ignore the `i18n/` directory altogether.
@stellar-jenkins-ci

Copy link
Copy Markdown

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