| name | hooks-session-start-hook |
| description | Create a SessionStart hook for Claude Code on the web. Use when setting up a repo so dependencies install and tests/linters run automatically on remote session start. |
| args | [--remote-only] [--no-verify] |
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash, TodoWrite |
| argument-hint | --remote-only to only run in web sessions, --no-verify to skip test verification |
| disable-model-invocation | true |
| created | "2026-02-07T00:00:00.000Z" |
| modified | "2026-06-18T00:00:00.000Z" |
| compatibility | claude-code |
| reviewed | "2026-03-30T00:00:00.000Z" |
/hooks:session-start-hook
Generate a SessionStart hook that prepares your repository for Claude Code on the web — installing dependencies, configuring environment variables, and verifying that tests and linters work.
When to Use This Skill
| Use this skill when... | Use /hooks:hooks-configuration instead when... |
|---|
| Setting up a repo for Claude Code on the web | Configuring other hook types (PreToolUse, Stop, etc.) |
| Need automatic dependency install in web sessions | Need general hooks knowledge or debugging |
| Want tests/linters verified on session start | Writing custom hook logic from scratch |
| Onboarding a project to remote Claude Code | Understanding hook lifecycle events |
Context
Detect project stack:
- Lockfiles: !
find . -maxdepth 1 \( -name 'package-lock.json' -o -name 'yarn.lock' -o -name 'pnpm-lock.yaml' -o -name 'bun.lockb' -o -name 'poetry.lock' -o -name 'uv.lock' -o -name 'Cargo.lock' -o -name 'go.sum' -o -name 'Gemfile.lock' \)
- Project files: !
find . -maxdepth 1 \( -name 'package.json' -o -name 'pyproject.toml' -o -name 'requirements.txt' -o -name 'Cargo.toml' -o -name 'go.mod' -o -name 'Gemfile' -o -name 'pom.xml' \) -o -maxdepth 1 -name 'build.gradle*'
- Linter configs: !
find . -maxdepth 1 \( -name 'biome.json' -o -name 'biome.jsonc' -o -name '.eslintrc*' -o -name 'eslint.config.*' \)
- Existing settings: !
find . -path '*/.claude/settings.json' -maxdepth 3 -type f
- Existing hooks dir: !
find . -maxdepth 2 -type d -name 'scripts'
Parameters
| Flag | Default | Description |
|---|
--remote-only | off | Wrap script in CLAUDE_CODE_REMOTE guard — hook exits immediately in local sessions |
--no-verify | off | Skip test/linter verification step in the generated script |
Execution
Step 1: Detect project stack
Identify all languages and tooling from the context above.
Language detection: