Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .claude/hooks/session-start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
set -euo pipefail

# Cloud-only: in Claude Code on the web, every container starts fresh, so we
# install the onsager-ai/dev-skills bundle into ~/.claude/skills/ on each
# session start. Local terminal sessions are skipped so a developer's
# hand-installed skills are left alone.
if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then
exit 0
fi

# Best-effort: a transient npm/registry/GitHub blip shouldn't fail the whole
# session start. On failure we log a warning and let the session continue
# without the bundle.
echo "--- installing onsager-ai/dev-skills globally ---"
if ! npx -y skills add -g onsager-ai/dev-skills --skill '*' -a claude-code; then
echo "warning: onsager-ai/dev-skills install failed; session will start without the bundle." >&2
fi
2 changes: 1 addition & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"hooks": [
{
"type": "command",
"command": "echo '--- codervisor hooks: no setup needed ---'"
"command": "bash .claude/hooks/session-start.sh"
}
]
}
Expand Down
Loading