A bash script that clones GitHub repositories (with local caching) and launches Claude Code inside the cloned directory.
Ask Claude questions about any public GitHub repo without manually cloning it first.
curl -fsSL https://gist.githubusercontent.com/maleta/16e7072bf469b95df73aa64d7471f6f6/raw/gitask -o /usr/local/bin/gitask
chmod +x /usr/local/bin/gitaskRequires: git, claude (Claude Code CLI).
gitask <github-url> [claude args...]
# Open Claude Code in a repo
gitask https://github.com/anthropics/claude-code
# Target a specific branch and path
gitask https://github.com/anthropics/claude-code/tree/main/src
# Point to a specific file (blob URL)
gitask https://github.com/anthropics/claude-code/blob/main/src/index.ts
# Pass additional arguments to Claude
gitask https://github.com/user/repo -p "explain the architecture"- Parses the GitHub URL to extract owner, repo, branch, and file path.
- Clones the repo to
~/.gitask/<owner>/<repo>(reuses the cache on subsequent runs). - Checks out the specified branch if provided.
- Launches
claudein the repo directory, forwarding any extra arguments.