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.
Install
/plugin marketplace add robbyt/claude-skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add robbyt/claude-skills --skill view-filegit clone --depth 1 https://github.com/robbyt/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/plugins/gh-cli/skills/view-file ~/.claude/skills/view-filePersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# View GitHub Files
Fetch raw file content from GitHub URLs without HTML/JS clutter.
## Prerequisites
GitHub CLI must be installed and authenticated:
```bash
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
```bash
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`:
```bash
# 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:
```bash
curl https://raw.githubusercontent.com/golang/go/master/README.md
```Details
- Skill name
view-file- Repository
- robbyt/claude-skills
- Path
plugins/gh-cli/skills/view-file/SKILL.md- Repo updated
- 18 November 2026
FAQ
What does the View File skill do?
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.
How do I install the View File skill?
Claude Code plugin: /plugin marketplace add robbyt/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is View File popular?
It lives in robbyt/claude-skills, which has 42 GitHub stars and 2 forks.
Related skills
Actions
42robbyt/claude-skills
GitHub Actions workflow management using GitHub CLI. Trigger when user wants to check CI status ("check CI", "is the build passing"), view workflow runs ("show recent runs", "view action logs"), watch running workflows ("watch CI"), or rerun failed workflows ("rerun the build").
Adversarial Review
42robbyt/claude-skills
Have Codex try to break a change before it ships — a skeptical review that challenges the design, assumptions, and failure modes of a diff or branch and returns structured findings (verdict, severity, file:line, confidence). Trigger on "adversarial review", "challenge this change/design with Codex", "pressure-test this before I ship", "have Codex try to break this", "is this safe to merge", or a review focused on a risk area (auth, data loss, rollback, race conditions, retries). Do NOT use for a routine bug/style pass over a diff (that's diff-review), for critiquing a plan before code exists (
API Review
42robbyt/claude-skills
This skill should be used when reviewing API designs, auditing REST or gRPC endpoints, designing backend APIs, evaluating BFF architecture, or discussing API best practices. Also triggers on: "review this API", "API design review", "is this API correct", "REST API audit", "gRPC API review", "PATCH vs PUT", "etag", "idempotency", "pagination design", "API error handling", "backward compatibility", "BFF architecture", "resource-oriented design", "TOCTOU", "race condition", "optimistic concurrency", "field mask", "long-running operation", "custom method", "soft delete", "API naming conventions",
Git Remote Publishing
44SamueleBassoli/hermes-fleet-apps
Use when preparing a repo's first public push or release.
Stacks
42robbyt/claude-skills
Stacked pull requests with the GitHub CLI `gh stack` extension. Trigger whenever the user wants to split a large branch or change into a chain of dependent PRs ("stack this into smaller PRs", "split this into a stack", "create a stacked PR", "break this feature into reviewable layers"), or manage an existing stack ("add a layer on top", "rebase my stack", "sync the stack after the bottom PR merged", "merge the stack"). Use this instead of the `pr` skill whenever the work involves more than one dependent PR or any `gh stack` command; use `pr` for single, standalone pull requests.
Contribute Catalog
48frankxai/claude-skills-library
Author a new HyperFrames registry block (caption style, VFX block, transition, lower third) or component (text effect, overlay, snippet) and ship it as an upstream PR to the hyperframes repo. Use ONLY when the user wants to CONTRIBUTE to the public catalog — for in-project caption/transition authoring use the `hyperframes` skill, for installing existing registry items use the `hyperframes-registry` skill.
Browse the most popular Claude skills, all git & code review skills, or write your own with the skills generator.