accessing-github-repos

Solid

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.

Code & Development 134 stars 7 forks Updated today MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
71
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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) ```bash # Individual file via raw URL curl -sL "https://raw.githubusercontent.com/OWNER/REPO/BRANCH/path/file" # Directory tree via API curl -sL "https://api.github.com/repos/OWNER/REPO/git/trees/BRANCH?recursive=1" ``` ### 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_PAT` - `GH_PAT` - `GITHUB_TOKEN` - `GH_TOKEN` **Project Files** (Claude.ai): - `/mnt/project/.env` - `/mnt/project/github.env` Format: ```bash GITHUB_PAT=github_pat_11AAAAAA... ``` ### Creating a GitHub PAT 1. GitHub → Settings → Developer settings → Fine-grained tokens 2. Create token scoped to needed repositories 3. 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.com` - `raw.githubusercontent.com` ## Capabilities by Auth Level | Capability | No PAT (public only) | PAT (read) | PAT (w...

Details

Author
oaustegard
Repository
oaustegard/claude-skills
Created
9 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category