chore: install onsager-ai/dev-skills on SessionStart in cloud#303
Conversation
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.
There was a problem hiding this comment.
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.shto installonsager-ai/dev-skillswhenCLAUDE_CODE_REMOTE=true. - Updated
.claude/settings.jsonto 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.
| echo "--- installing onsager-ai/dev-skills globally ---" | ||
| npx -y skills add -g onsager-ai/dev-skills --skill '*' -a claude-code -y |
There was a problem hiding this comment.
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.
- 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.
- 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.
- 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.
* 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>
Summary
Adds a web-only
SessionStarthook 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 runsnpx -y skills add -g onsager-ai/dev-skills --skill '*' -a claude-code -y. Idempotent..claude/settings.json— replaces the placeholderSessionStartecho 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.shwithCLAUDE_CODE_REMOTEunset → exits 0 silently (no-op).CLAUDE_CODE_REMOTE=true bash .claude/hooks/session-start.sh→ installs all 12 skills fromonsager-ai/dev-skillsunder~/.claude/skills/.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