Skip to content

feat(skill): bundle OAuth scripts into nasde-benchmark-runner#45

Merged
szjanikowski merged 1 commit into
mainfrom
feat/bundle-skill-scripts
May 9, 2026
Merged

feat(skill): bundle OAuth scripts into nasde-benchmark-runner#45
szjanikowski merged 1 commit into
mainfrom
feat/bundle-skill-scripts

Conversation

@szjanikowski
Copy link
Copy Markdown
Contributor

@szjanikowski szjanikowski commented May 9, 2026

Summary

After pip install nasde-toolkit && nasde install-skills, the runner skill referenced auth scripts at repo-relative paths (e.g. scripts/export_oauth_token.sh) — but end users have no repo checkout, so the skill broke for anyone who didn't git clone first.

This PR ships those scripts inside the skill bundle so they're resolvable by absolute path after install.

  • Six OAuth scripts (Claude/Codex/Gemini × .sh+.ps1) copied into .claude/skills/nasde-benchmark-runner/scripts/. pyproject.toml already force-includes the skill directory, so no build config changes needed — they get bundled to nasde_toolkit/_bundled_skills/... automatically.
  • After nasde install-skills they land at ~/.claude/skills/nasde-benchmark-runner/scripts/ (user scope) or <project>/.claude/skills/... (project scope).
  • Repo scripts/ stays as the public-facing copy so existing external links continue to resolve.
  • Drift guard: tests/test_skills_installer.py now asserts the two copies stay byte-identical, with an actionable error message pointing at the fix command.
  • SKILL.md "Authentication setup" updated with a <SKILL_SCRIPTS> placeholder and explicit absolute-path resolution per OS scope.

Test plan

  • uv run pytest — 159/159 green (12 new tests in test_skills_installer.py)
  • E2E manually on macOS: full 7-step flow (fresh uv tool install --python 3.13 --reinstall, nasde install-skills --force, verify 6 bundled scripts, source export_oauth_token.sh from bundled location → token exported correctly)
  • Drift guard verified: artificial drift fails the test with the actionable message; revert → green
  • Manual install + auth E2E on Ubuntu — fresh install via uv tool install --python 3.13, nasde install-skills --force, all 6 scripts present in bundled location, source of export_oauth_token.sh exports CLAUDE_CODE_OAUTH_TOKEN (Linux fallback path: reads ~/.claude/.credentials.json)
  • Manual install + auth E2E on Windows 11 (PowerShell) — same flow, . $Scripts\export_oauth_token.ps1 exports $env:CLAUDE_CODE_OAUTH_TOKEN from %USERPROFILE%\.claude\.credentials.json
  • Pending: TestPyPI dry-run from main after merge — gh workflow run publish.yml --ref main will smoke-test the actual wheel install on ubuntu-latest + windows-latest × py 3.12/3.13 before any v0.3.3 tag

Other unrelated bugs surfaced during manual testing on Linux/Windows but are tracked separately — auth + install path proven on all three OSes for this PR.

🤖 Generated with Claude Code

Users who installed nasde via `pip install nasde-toolkit` previously hit
broken paths: the skill referenced `scripts/export_oauth_token.sh` but
end users have no repo checkout. After `nasde install-skills` the scripts
now ship at `~/.claude/skills/nasde-benchmark-runner/scripts/`.

- Copy six OAuth scripts (3 agents x .sh+.ps1) into the skill dir.
  hatch force-include picks them up automatically because the entire
  skill dir is bundled to nasde_toolkit/_bundled_skills/...
- Repo `scripts/` stays as the public-facing copy — existing external
  links continue to resolve.
- Drift guard: tests/test_skills_installer.py asserts byte-identical
  copies between scripts/ and the skill bundle, with an actionable
  error message pointing at the fix.
- SKILL.md auth tables: paths now reference <SKILL_SCRIPTS> placeholder
  with explicit absolute-path resolution per OS scope.

E2E verified locally on macOS: fresh wheel build + uv tool install +
nasde install-skills + source from bundled location = working
CLAUDE_CODE_OAUTH_TOKEN. 159/159 tests green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@szjanikowski szjanikowski merged commit 1e1cece into main May 9, 2026
9 checks passed
@szjanikowski szjanikowski deleted the feat/bundle-skill-scripts branch May 9, 2026 10:55
szjanikowski added a commit that referenced this pull request May 9, 2026
* docs(changelog): record Windows compat + skill bundling under [Unreleased]

Captures everything that landed since v0.3.2 (PRs #42, #43, #44, #45) so
the release notes are queued up. Keeps the section under [Unreleased]
deliberately — more fixes are still expected before cutting v0.3.3, and
release docs say the version header should be added at release-cut time.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(changelog): record .gitattributes LF enforcement (#47)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(changelog): record harbor[cloud] dependency switch (#48)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: release v0.3.3

Cuts v0.3.3 from the accumulated [Unreleased] section. Patch bump
(pre-1.0 policy): no breaking changes to user-facing CLI, nasde.toml
schema, or benchmark project layout — Windows compat, OAuth-script
bundling, harbor[cloud] dep switch are all transparent to users.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Szymon Janikowski <szymon.janikowski@itlibrium.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant