AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Git Pr Reader

skill-abhatt-rh-redhat-docs-agent-tools-git-pr-reader · by abhatt-rh

Unified interface for GitHub PRs and GitLab MRs: read PR/MR data with file filtering, list changed files, get review comments, post inline review comments, extract line numbers from diffs, validate comments, auto-detect PR/MR for current branch, and get unified diffs. Automatically detects GitHub vs GitLab from URL. Use this skill for analyzing code changes, posting review feedback, and documenta…

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-abhatt-rh-redhat-docs-agent-tools-git-pr-reader

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-abhatt-rh-redhat-docs-agent-tools-git-pr-reader)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Git Pr Reader? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Git PR Reader Skill

Unified interface for GitHub Pull Requests and GitLab Merge Requests — read, review, and post comments.

Capabilities

  • Auto-detect Git platform: Automatically identifies GitHub vs GitLab from URL
  • Read PR/MR data: Fetch title, description, and file-level diffs with smart filtering
  • List changed files: Get file paths, statuses, and line counts with optional glob filtering
  • Review comments: Fetch existing review comments/discussions, filter bots, include/exclude resolved
  • Post review comments: Post inline comments on specific diff lines with duplicate detection and fallback to PR-level comments
  • Extract line numbers: Parse diffs to get added/modified line numbers for accurate comment placement
  • Validate comments: Check comment line numbers against actual diff content
  • Auto-detect PR/MR: Find the open PR/MR for the current git branch (GitHub via gh CLI, GitLab via API)
  • Smart file filtering: Exclude irrelevant files using configurable YAML patterns:
  • Test files (test/, _test.go, .spec.ts, etc.)
  • Lock files (package-lock.json, *.lock, Pipfile.lock, etc.)
  • CI/CD configs (.gitlab-ci.yml, .github/workflows/, Dockerfile, etc.)
  • Build artifacts (dist/, build/, target/, *.class, etc.)
  • Generated code (.pb.go, .gen.go, etc.)
  • Vendor directories (node_modules/, vendor/, etc.)
  • Images and binaries (.png, .jpg, *.svg, etc.)

Usage

Subcommands

read — Read PR/MR data with diffs and file filtering
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py read --url "https://github.com/owner/repo/pull/123"
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py read --url "https://gitlab.com/group/project/-/merge_requests/456" --format markdown
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py read --url "https://github.com/owner/repo/pull/123" --no-filter
info — Get PR/MR information
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py info https://github.com/owner/repo/pull/123 --json
files — List changed files
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py files https://github.com/owner/repo/pull/123
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py files https://github.com/owner/repo/pull/123 --filter "*.adoc" --json
comments — List review comments
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py comments https://github.com/owner/repo/pull/123
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py comments https://github.com/owner/repo/pull/123 --include-resolved --json
diff — Get unified diff
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py diff https://github.com/owner/repo/pull/123
post — Post review comments
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py post https://github.com/owner/repo/pull/123 comments.json
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py post https://github.com/owner/repo/pull/123 comments.json --review-type technical
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py post https://github.com/owner/repo/pull/123 comments.json --review-type style --dry-run
extract — Extract line numbers from diff
# Find line number for a pattern
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py extract https://github.com/owner/repo/pull/123 path/to/file.adoc "pattern"

# Dump all added/modified lines
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py extract --dump https://github.com/owner/repo/pull/123 path/to/file.adoc

# Validate a comments JSON file against the diff
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py extract --validate https://github.com/owner/repo/pull/123 comments.json
detect — Auto-detect PR/MR for current branch
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py detect
python3 ${CLAUDE_SKILL_DIR}/scripts/git_pr_reader.py detect --json

Authentication

Set in ~/.env (global) or .env in the project root (local override). See docs-tools README for setup:

GITHUB_TOKEN=your-github-pat    # required scope: "repo" for private, "public_repo" for public
GITLAB_TOKEN=your-gitlab-pat    # required scope: "api"

The script loads .env files automatically — do not prepend source ~/.env to bash commands.

Python Library Usage

from git_pr_reader import GitReviewAPI

api = GitReviewAPI.from_url("https://github.com/owner/repo/pull/123")

# Read PR data with filtering
data = api.get_pr_data()

# Get PR info
info = api.get_pr_info()

# Get changed files
files = api.get_changed_files()

# Get review comments
comments = api.get_review_comments()

# Post comments
api.post_comments([
    {"file": "path/to/file.adoc", "line": 42, "message": "Issue description"}
])

# Extract line numbers from diff
lines = api.extract_line_numbers("path/to/file.adoc")

# Validate comments against diff
results = api.validate_comments(comments_list)

Comments JSON Format

[
  {"file": "path/to/file.adoc", "line": 42, "message": "Issue: missing title", "severity": "suggestion"},
  {"file": "path/to/other.adoc", "line": 10, "message": "Typo in description", "severity": "suggestion"}
]

Configuration

File filtering patterns are defined in config/git_filters.yaml. You can customize these patterns for your specific needs.

Dependencies

Install required Python packages:

python3 -m pip install PyGithub python-gitlab pyyaml pip-system-certs

Integration with Other Skills

This skill works well with:

  • jira-reader: Combine JIRA issue context with Git code changes
  • jira-writer: Generate release notes from JIRA + Git data, then push back to JIRA
  • docs-review-style: Post style review findings as inline PR/MR comments
  • docs-review-technical: Post technical review findings as inline PR/MR comments

Limitations

  • GitHub API rate limits: 60 requests/hour (unauthenticated), 5000/hour (authenticated)
  • GitLab API rate limits: 10 requests/second
  • Only fetches file-level diffs, not commit-level history
  • Requires public PRs/MRs unless authentication tokens are provided

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.