スキル一覧に戻る
robbyt

view-file

by robbyt

Skills and Plugins for Claude Code

37🍴 2📅 2026年1月24日
GitHubで見るManusで実行

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

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です