Skip to content
Open
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
23 changes: 23 additions & 0 deletions .claude/hooks/session-start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# SessionStart hook: install dependencies so tests and linters work in
# Claude Code on the web sessions. Idempotent and non-interactive.
set -euo pipefail

# Only run in the remote (Claude Code on the web) environment; local sessions
# manage their own virtualenv.
if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then
exit 0
fi

cd "$CLAUDE_PROJECT_DIR"

# Install uv if it isn't already on PATH (the remote image may not ship it).
if ! command -v uv >/dev/null 2>&1; then
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$CLAUDE_ENV_FILE"
fi

# --frozen installs straight from the committed uv.lock without re-resolving or
# rewriting it (mirrors CI). --all-extras pulls in the dev tools (pytest, ruff).
uv sync --all-extras --frozen
14 changes: 14 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/session-start.sh"
}
]
}
]
}
}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ graphify-out/
.graphify_*.json
.graphify_python
.claude/
# Track the shared SessionStart hook and its settings (activates the repo for
# Claude Code on the web); keep all other local .claude/ state ignored.
!.claude/
.claude/*
!.claude/hooks/
!.claude/hooks/session-start.sh
!.claude/settings.json
skills/
# The packaged skill bundles under graphify/skills/ are generated, committed
# artifacts (rendered by tools/skillgen). Keep them tracked even though the
Expand Down