oaustegard/claude-skills/accessing-github-repos
Claude Code and agent skill by oaustegard/claude-skills
- community
Checking that the SKILL.md file is still in the repository.
GitHub repository access in containerized environments using REST API and credential detection. Use when git clone fails, or when accessing private repos/writing files via API.
Install
npx vskill@latest install oaustegard/claude-skills/accessing-github-reposSKILL.md
Accessing GitHub Repositories
Git clone is blocked in containerized AI environments (egress proxy rejects CONNECT tunnel), but full repository access is available via GitHub REST API and raw file URLs.
Quick Start
Public Repos (no setup needed)
Private Repos or Write Access
Requires GitHub Personal Access Token (PAT). See Setup section below.
Setup
Credential Configuration
The skill automatically detects PATs from environment variables or project files:
Environment Variables (checked in order):
GITHUB_PATGH_PATGITHUB_TOKENGH_TOKEN
Project Files (Claude.ai):
/mnt/project/.env/mnt/project/github.env
Format:
Creating a GitHub PAT
- GitHub → Settings → Developer settings → Fine-grained tokens
- Create token scoped to needed repositories
- Set permissions:
- Contents: Read - for private repo access
- Contents: Write - for pushing files
- Issues: Write - for issue management
- Pull requests: Write - for creating PRs
Network Access (Claude.ai Projects)
Add to network allowlist:
api.github.comraw.githubusercontent.com
Capabilities by Auth Level
| Capability | No PAT (public only) | PAT (read) | PAT (write) | |
|---|---|---|---|---|
| Fetch public files | ✅ | ✅ | ✅ | |
| Fetch private files | ❌ | ✅ | ✅ | |
| Download tarball | ✅ public | ✅ | ✅ | |
| Create/update files | ❌ | ❌ | ✅ | |
| Create branches | ❌ | ❌ | ✅ | |
| Manage issues | ❌ | ❌ | ✅ | |
| Create PRs | ❌ | ❌ | ✅ |
Python Helper Functions
Credential Detection
Fetch Single File
Fetch Repository Tarball
Create or Update File
Get File SHA (for updates)
Bash Examples
Fetch Public File
Fetch Private File (with PAT)
Download Repo Tarball
Create/Update File
List Directory Tree
Why git clone Doesn't Work
The container's egress proxy blocks git protocol operations:
- HTTPS clone: Proxy returns 401 on CONNECT tunnel
- SSH: No ssh binary in container
- git:// protocol: DNS resolution blocked
The GitHub REST API uses standard HTTPS and routes through the proxy normally.
Do Not
- Never attempt
git clone(wastes time, always fails) - Never suggest workarounds requiring git protocol
- Never retry with different git flags or SSH URLs
- Never recommend git submodules, git archive, or other git-protocol operations
Rate Limits
- Authenticated: 5,000 requests/hour
- Unauthenticated: 60 requests/hour
For heavy usage, always provide a PAT.
When This Skill Does Not Apply
- Native development environments: Have direct git access, use standard git commands
- Local machines: git clone works normally
- Environments with MCP GitHub server: Use MCP tools instead
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 repositoryCheckingaccessing-github-repos/SKILL.md
Popularity
- Repository stars
- 151
- Repository forks
- 7
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
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/oaustegard/claude-skills/accessing-github-repos)