github-url-interceptlisted
Install: claude install-skill rjmurillo/ai-agents
# GitHub URL Intercept
> **CRITICAL**: This skill activates AUTOMATICALLY when you see ANY `github.com` URL.
> Do NOT use `web_fetch`, `curl`, or any browser-based fetch on GitHub URLs.
> Doing so wastes 1-2.5 MILLION tokens on HTML that provides no useful data.
**MANDATORY BEHAVIOR**: Parse the URL → Route to API → Return structured JSON.
---
## Quick Reference (Copy-Paste Commands)
**When you see a GitHub URL, use these commands immediately:**
```bash
SCRIPTS_DIR="${CLAUDE_PLUGIN_ROOT:-.claude}/skills/github/scripts"
# PR URL → Use this
python3 "$SCRIPTS_DIR/pr/get_pr_context.py" --pull-request {n} --owner {owner} --repo {repo}
# Issue URL → Use this
python3 "$SCRIPTS_DIR/issue/get_issue_context.py" --issue {n} --owner {owner} --repo {repo}
# File/blob URL → Use this
gh api repos/{owner}/{repo}/contents/{path}?ref={ref}
# Commit URL → Use this
gh api repos/{owner}/{repo}/commits/{sha}
# Comment fragment (#discussion_r{id}) → Use this
gh api repos/{owner}/{repo}/pulls/comments/{id}
```
---
## Triggers
| Phrase | Action |
|--------|--------|
| Any `github.com` URL in user input (even bare URL pasted alone) | Parse URL type and route to API |
| `analyze` / `research` / `scan` + GitHub URL | Route based on URL type |
| URL + question (e.g., "...#r123 what's the tracking issue?") | Extract fragment, call specific API |
| Multiple GitHub URLs in one prompt | Process each URL, batch API calls |
---
## When to Use
Use this skill when:
- Any `github.com` URL appear