arbourd/dotfiles/git-open
Claude Code and agent skill by arbourd/dotfiles
- community
Checking that the SKILL.md file is still in the repository.
Get the web URL for, or open in the browser, the current Git repo, a file, folder, commit, or line with `git open`. Use when the user asks for a link to code or to open, view, or share the repo, a file, a line, or a commit, e.g. "link me to line 42 of main.go" or "give me a permalink". Not for PRs, issues, CI, blame, or reading local files.
Install
npx vskill@latest install arbourd/dotfiles/git-openSKILL.md
The same SKILL.md was published earlier as arbourd/dotfiles/git-open.
git-open
git open [options] [path|commit] prints or opens the web page for the current repo, built from the remote URL (the default remote, or -R <name>).
Rules
- Match the flag to the request. If the user asks to open something in their browser ("open main.go in the browser"), run it without
-n: that is what launches the browser, and it printsOpening <url> in your browser.For anything else, such as a link, a URL, or sharing, pass-n(--no-browser, before or after the path) and give them the printed URL. When it's unclear which they want, print with-nand offer to open it. - Give the user the printed URL as is. Path prefixes and line anchors differ by provider (GitLab
/-/tree/main/a.go#L3-5, Bitbucket/src/main/a.go#lines-3:5), so a hand-built or edited URL is likely wrong. - Run it inside the repo, or run
git -C <dir> openwith the same arguments.
Recipes
The flag follows the request:
With no argument it targets the repo root, and a path may be a file or a folder. Other forms, shown without a flag (add -n to print the URL instead of opening the browser):
Stable link (permalink): a plain path uses the current branch, so the link changes as the branch moves. Pin it to a commit with -r:
Gotchas
- Ref: the current branch, or the full SHA when HEAD is detached.
-rreplaces it and is used literally, soorigin/main404s; usemain.-rcan't be combined with a commit argument. - Not validated: URLs are built from local state and nothing is checked against the remote. They 404 if the branch or commit isn't pushed, or the path doesn't exist at that ref, and line numbers refer to the pushed file, so uncommitted edits can shift them.
- Paths: relative to the current directory, or absolute. A path missing locally is kept, since it may exist at that ref. A path outside the repo, or
.at the repo root, gives the tree URL of the ref (on GitHub.../tree/<branch>), not the repo root URL. - `:line`: ignored for directories, and ignored when a file literally named
main.go:42exists. - Commits: only a lowercase hex SHA is a commit (it opens the commit page, not the file at that commit), unless a file with that name exists.
HEAD, branch names, tags, and uppercase SHAs are treated as paths and give a URL that 404s (for example.../tree/<branch>/HEAD). Use-r <ref>for a branch or tag, andgit rev-parseto turnHEADinto a SHA. - Errors: they print
error: <message>and exit 1.exit status 128usually means no remote or no commits.
Self-hosted providers
An unknown host errors with unable to find provider. Add one with git config; commitprefix and pathprefix are required, lineformat is optional (%l is a line number). Suggest the commands to the user rather than changing their config:
More
git open -h prints usage; git open --help opens the man page.
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 repositoryCheckingagents/skills/git-open/SKILL.md
Popularity
- 7-day trend score
- 0
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/arbourd/dotfiles/git-open)