Skip to content

chore: install onsager-ai/dev-skills on SessionStart in cloud#303

Merged
tikazyq merged 2 commits into
mainfrom
claude/setup-cloud-dev-skills-gC0jk
May 20, 2026
Merged

chore: install onsager-ai/dev-skills on SessionStart in cloud#303
tikazyq merged 2 commits into
mainfrom
claude/setup-cloud-dev-skills-gC0jk

Conversation

@tikazyq
Copy link
Copy Markdown
Contributor

@tikazyq tikazyq commented May 19, 2026

Summary

Adds a web-only SessionStart hook so Claude Code on the web sessions land with the cross-repo dev-skills bundle (onsager-ai/dev-skills) already installed under ~/.claude/skills/. Local terminal sessions are untouched.

  • .claude/hooks/session-start.sh — gates on $CLAUDE_CODE_REMOTE=true, then runs npx -y skills add -g onsager-ai/dev-skills --skill '*' -a claude-code -y. Idempotent.
  • .claude/settings.json — replaces the placeholder SessionStart echo with the install hook.

Why this is needed

Cloud containers start fresh on every session, so the dev-skills global install needs to happen automatically — otherwise the first user prompt in a fresh cloud session has none of issue-spec, plan-dag, ci-triage, web-testing, etc. available.

Test plan

  • bash .claude/hooks/session-start.sh with CLAUDE_CODE_REMOTE unset → exits 0 silently (no-op).
  • CLAUDE_CODE_REMOTE=true bash .claude/hooks/session-start.sh → installs all 12 skills from onsager-ai/dev-skills under ~/.claude/skills/.
  • Start a fresh Claude Code on the web session on this branch; confirm dev-skills load on first prompt.

Why no spec issue

Dev-tooling configuration for the cloud runtime — direct follow-on to #302 (consolidation into onsager-ai/dev-skills) and lands in lockstep across the four consumer repos (onsager-ai/onsager, onsager-ai/duhem, onsager-ai/onsager-skills, onsager-ai/telegramable). No product surface.

🤖 Generated with Claude Code


Generated by Claude Code

Adds a web-only SessionStart hook (.claude/hooks/session-start.sh)
that runs `npx skills add -g onsager-ai/dev-skills --skill '*' -a
claude-code` so Claude Code on the web sessions land with the cross-
repo dev-skills bundle already installed under ~/.claude/skills/.
Gated on $CLAUDE_CODE_REMOTE=true so local terminal sessions stay
untouched.
Copilot AI review requested due to automatic review settings May 19, 2026 12:38
Copy link
Copy Markdown

Copilot AI left a comment

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 Claude Code web-only SessionStart hook so fresh cloud containers automatically install the cross-repo onsager-ai/dev-skills bundle into the global ~/.claude/skills/ location, while local sessions no-op based on CLAUDE_CODE_REMOTE.

Changes:

  • Added .claude/hooks/session-start.sh to install onsager-ai/dev-skills when CLAUDE_CODE_REMOTE=true.
  • Updated .claude/settings.json to invoke the new SessionStart hook script.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.claude/settings.json Switches SessionStart to run the new hook script.
.claude/hooks/session-start.sh Implements the cloud-only dev-skills installation via npx skills add -g.

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

Comment thread .claude/hooks/session-start.sh Outdated
Comment on lines +12 to +13
echo "--- installing onsager-ai/dev-skills globally ---"
npx -y skills add -g onsager-ai/dev-skills --skill '*' -a claude-code -y
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same reasoning as the parallel threads on onsager-skills#20 and telegramable#65: intentionally unpinned to match onsager-ai/dev-skills' README and CLAUDE.md install one-liner. The bundle is a rolling "latest cross-repo dev-process" feed by design — pinning here would force a coordinated bump across all 5 consumer repos for every dev-skills fix. If we want supply-chain hardening via pinning later, the right scope is all 5 PRs + the dev-skills README + the CLAUDE.md text, not this bootstrap PR alone.

Separately — the failing rust check on this PR is a pre-existing main-red issue, unrelated to this change: PR #300 turned the Rust validate command into a stub (Err("validate is not yet migrated to the adapter API")), but the Validate specs CI step still calls node bin/leanspec.js validate --warnings-only against the freshly-built stub binary. main commit 2eca457's rust job is also failing for the same reason. Filing as a separate triage; not blocking this PR.


Generated by Claude Code

- Wrap `npx skills add` in `if !` so a transient npm/registry/GitHub
  failure logs a warning and lets the session continue without the
  bundle (was: hook would exit non-zero under `set -e`).
- Drop the trailing `-y` (now passed only to `npx`); the `skills`
  CLI's agent-detect already installs non-interactively under
  Claude Code.

Addresses Copilot review feedback on the parallel PRs in
onsager-ai/onsager#424, onsager-ai/duhem#57, #303,
onsager-ai/onsager-skills#20, and onsager-ai/telegramable#65.
tikazyq pushed a commit to onsager-ai/onsager that referenced this pull request May 19, 2026
- Wrap `npx skills add` in `if !` so a transient npm/registry/GitHub
  failure logs a warning and lets the session continue without the
  bundle (was: hook would exit non-zero under `set -e`).
- Drop the trailing `-y` (now passed only to `npx`); the `skills`
  CLI's agent-detect already installs non-interactively under
  Claude Code.

Addresses Copilot review feedback on the parallel PRs in
#424, onsager-ai/duhem#57, codervisor/leanspec#303,
onsager-ai/onsager-skills#20, and onsager-ai/telegramable#65.
tikazyq pushed a commit to onsager-ai/onsager-skills that referenced this pull request May 19, 2026
- Wrap `npx skills add` in `if !` so a transient npm/registry/GitHub
  failure logs a warning and lets the session continue without the
  bundle (was: hook would exit non-zero under `set -e`).
- Drop the trailing `-y` (now passed only to `npx`); the `skills`
  CLI's agent-detect already installs non-interactively under
  Claude Code.

Addresses Copilot review feedback on the parallel PRs in
onsager-ai/onsager#424, onsager-ai/duhem#57, codervisor/leanspec#303,
#20, and onsager-ai/telegramable#65.
tikazyq pushed a commit to onsager-ai/telegramable that referenced this pull request May 19, 2026
- Wrap `npx skills add` in `if !` so a transient npm/registry/GitHub
  failure logs a warning and lets the session continue without the
  bundle (was: hook would exit non-zero under `set -e`).
- Drop the trailing `-y` (now passed only to `npx`); the `skills`
  CLI's agent-detect already installs non-interactively under
  Claude Code.

Addresses Copilot review feedback on the parallel PRs in
onsager-ai/onsager#424, onsager-ai/duhem#57, codervisor/leanspec#303,
onsager-ai/onsager-skills#20, and #65.
@tikazyq tikazyq merged commit e5fa92d into main May 20, 2026
2 of 3 checks passed
@tikazyq tikazyq deleted the claude/setup-cloud-dev-skills-gC0jk branch May 20, 2026 02:07
tikazyq added a commit to onsager-ai/telegramable that referenced this pull request May 20, 2026
* chore: install onsager-ai/dev-skills on SessionStart in cloud

Adds a web-only SessionStart hook (.claude/hooks/session-start.sh)
that runs `npx skills add -g onsager-ai/dev-skills --skill '*' -a
claude-code` so Claude Code on the web sessions land with the cross-
repo dev-skills bundle already installed under ~/.claude/skills/.
Gated on $CLAUDE_CODE_REMOTE=true so local terminal sessions stay
untouched.

* chore: make dev-skills install best-effort and drop double -y

- Wrap `npx skills add` in `if !` so a transient npm/registry/GitHub
  failure logs a warning and lets the session continue without the
  bundle (was: hook would exit non-zero under `set -e`).
- Drop the trailing `-y` (now passed only to `npx`); the `skills`
  CLI's agent-detect already installs non-interactively under
  Claude Code.

Addresses Copilot review feedback on the parallel PRs in
onsager-ai/onsager#424, onsager-ai/duhem#57, codervisor/leanspec#303,
onsager-ai/onsager-skills#20, and #65.

---------

Co-authored-by: Claude <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.

3 participants