Gh Setup Hooks — Development skill for Claude Code
Enable gh command in Claude Code on the Web environment, just adding SessionStartHooks.
How to install Gh Setup Hooks
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open oikon48/gh-setup-hooks and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Gh Setup Hooks does
Enable gh command in Claude Code on the Web environment, just adding SessionStartHooks.
Alternatives in Development
- On — PUA 开启默认模式 — 每次新会话自动加载 PUA 核心 skill 19.5k ★
- Notebooklm Skill — Use this skill to enable Claude Code to communicate directly with your Google NotebookLM notebooks 5.9k ★
- Doctor — Environment diagnostics with interactive fixes — providers, auth, RTK, hooks, token optimization 2.8k ★
README
gh-setup-hooks
[](https://www.npmjs.com/package/gh-setup-hooks) [](LICENSE)
Auto-install GitHub CLI on Claude Code on the Web. **Just add one line to settings.json.**
Setup
1. Add hook to settings.json
Add to `.claude/settings.json`:
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "bun x gh-setup-hooks",
"timeout": 120
}
]
}
]
}
}
`npx -y gh-setup-hooks` is also ok.
2. Set up Claude Code on the Web
To use `gh` commands (e.g., `gh pr create`), you need to set `GH_TOKEN` or `GITHUB_TOKEN`:
- Go to Claude Code on the Web
- Open Settings → Custom Environment
- Add environment variable:
- Name:
GH_TOKENorGITHUB_TOKEN - Value: Your GitHub Personal Access Token
- Name:
**Note**: The token needs `repo` scope for most operations.
Claude Code on the Web network should be **Full** or **Custom**. If using **Custom**, you need to allow `release-assets.githubusercontent.com`.
How It Works
- Start a session on Claude Code on the Web
- SessionStart hook runs
npx gh-setup-hooks - Installs gh only in remote environment (
CLAUDE_CODE_REMOTE=true) - Installs to
~/.local/binand persists PATH - Auto-detects
GH_REPOfrom git remote forghCLI compatibility - Does nothing in local environment
Configuration
| Environment Variable | Description | Default |
|---|---|---|
GH_SETUP_VERSION |
gh version to install | 2.88.1 |
License
MIT
References
- npm package
- GitHub CLI
- [Claude Code Ho
Related Skills
@greyhaven/claude-code-config V2.0.0
Hooks and configuration setup for Grey Haven's Claude Code environment npm version
Sub Agents
A simple Manager for adding Claude Code Sub Agents with hooks and custom slash commands.
Distribb Setup
Set up Distribb - check API key, confirm website + GSC are connected, enable the slash commands
Wheel To Talk Setup
Enable voice dictation and start the Wheel to Talk backend
Docs Setup
Enable the Anthropic document skills (Word, PDF, PowerPoint, Excel) for reports & deliverables
Screen Record
Record an MP4 screen video of a web flow end to end — intake (environment, URL, account, source) → confirm → p
Related Agents
Devex
Developer experience specialist. Invoke for CI/CD pipeline design or optimisation, build time reduction, local
Component Reviewer
Expert component reviewer for Claude Code Templates. Use PROACTIVELY when adding or modifying components in cl
Claude Architect
Orchestrates the process of adding new capabilities to a Claude Code setup. Interviews the user to understand