rajivmehtaflex/power-utility/github-codespace-ssh
Claude Code and agent skill by rajivmehtaflex/power-utility
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Manage and SSH into GitHub Codespaces via gh CLI.
Install
npx vskill@latest install rajivmehtaflex/power-utility/github-codespace-sshSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as rajivmehtaflex/power-utility/github-codespace-ssh.
GitHub Codespace SSH Connectivity
Manage GitHub Codespaces and generate OpenSSH configurations to enable remote development via VS Code or standard SSH clients. This workflow relies on the gh CLI to handle authentication and proxying.
When to Use
- "List my active codespaces"
- "Connect to a codespace via SSH"
- "Generate SSH config for a codespace"
- "Fix HTTP 403 error when listing codespaces"
Prerequisites
ghCLI installed and authenticated.- VS Code with the Remote - SSH extension (for GUI connection).
How to Run
Invoke GitHub CLI commands through the terminal tool.
Quick Reference
- List:
gh codespace list - Switch User:
gh auth switch --user <username> - Fix Scope:
gh auth refresh --hostname github.com --scopes codespace - Get Config:
gh codespace ssh --codespace <name> --config
Procedure
- Identify Active Account
Check which account is currently active: ``bash gh auth status ``
- Switch Account (If Necessary)
If the codespace belongs to a different authenticated account: ``bash gh auth switch --user <username> ``
- List Available Codespaces
Retrieve the list of codespaces for the active user: ``bash gh codespace list ``
- Handle Missing Scopes (HTTP 403)
If gh codespace list returns a 403 Forbidden error regarding the "codespace" scope:
- Run the refresh command:
``bash gh auth refresh --hostname github.com --scopes codespace ``
- Follow the prompt to visit
https://github.com/login/deviceand enter the provided one-time code.
- Generate SSH Configuration
Generate the OpenSSH config block for a specific codespace: ``bash gh codespace ssh --codespace <codespace-name> --config ``
- Configure Local SSH
Add the output from the previous step to your local SSH configuration file (~/.ssh/config).
- Connect via VS Code
- Press
Cmd + Shift + P$\rightarrow$ Remote-SSH: Connect to Host... - Select the hostname (e.g.,
cs.<name>.main) generated in the config.
Pitfalls
- Scope Mismatch: Running
gh auth refreshwhile the wrong account is active will grant the scope to that account, not the target one. Alwaysgh auth switchfirst. - Device Auth Timeouts:
gh auth refreshprompts can time out in non-interactive terminals. Use a generoustimeoutin theterminaltool. - SSH Server Missing: The codespace must have an SSH server installed. If it fails to connect, ensure the
devcontainer.jsonincludes thesshdfeature.
Verification
Run gh codespace list. If it returns a list of codespaces without a 403 error, the scope is correctly configured.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingprofile/github/github-codespace-ssh/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rajivmehtaflex/power-utility/github-codespace-ssh)