smithery/robbyt

view-file

Fetch raw file content from GitHub URLs. Trigger when user shares a GitHub file link (https://github.com/user/repo/blob/main/file.go) and wants to view the source code. Avoids HTML/JS clutter from WebFetch.

Installation

$ npx skills add smithery/robbyt --skill view-file

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/robbyt · top by installs.

npx skills add smithery/robbyt

Browse all from smithery/robbyt

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,564 B
  • docs SUMMARY.md 223 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

View GitHub Files

Fetch raw file content from GitHub URLs without HTML/JS clutter.

Prerequisites

GitHub CLI must be installed and authenticated:

gh auth status

When to Use

When a user shares a GitHub file URL like:

  • https://github.com/user/repo/blob/main/src/file.go
  • https://github.com/user/repo/tree/v1.0/docs/README.md

Use this skill instead of WebFetch to get clean source code.

Helper Script

python3 scripts/view_github_file.py https://github.com/user/repo/blob/main/path/to/file.go

The script:

  • Parses the GitHub URL to extract owner, repo, ref, and path
  • Uses gh api to fetch file content
  • Decodes base64-encoded response
  • Returns clean source code

Supported URL Formats

https://github.com/{owner}/{repo}/blob/{ref}/{path}
https://github.com/{owner}/{repo}/tree/{ref}/{path}

Where {ref} can be a branch name, tag, or commit SHA.

Fallback (if script fails)

Parse the URL manually and use gh api:

# From URL: https://github.com/golang/go/blob/master/README.md
# Extract: owner=golang, repo=go, ref=master, path=README.md
gh api repos/golang/go/contents/README.md?ref=master --jq '.content' | base64 --decode

Or use raw.githubusercontent.com:

curl https://raw.githubusercontent.com/golang/go/master/README.md