From docs-tools
Reads GitHub PRs and GitLab MRs: fetches title/description/diffs with file filtering, lists changed files, gets/posts review comments, extracts line numbers from diffs, auto-detects platform/branch PR. For code reviews and feedback.
npx claudepluginhub redhat-documentation/redhat-docs-agent-tools --plugin docs-toolsThis skill is limited to using the following tools:
Unified interface for GitHub Pull Requests and GitLab Merge Requests — read, review, and post comments.
Performs strict code review of a single GitHub PR or GitLab MR: checklist on type safety/errors/tests, tagged inline comments, overall summary.
Reviews external pull requests by fetching metadata and diffs via gh/glab, running review contracts, selecting findings, drafting comments, and posting after approval.
Resolves GitHub PR review comments: fetches via GitHub CLI and API, classifies by severity, filters new feedback, applies fixes with confirmation, commits changes, and replies to threads.
Share bugs, ideas, or general feedback.
Unified interface for GitHub Pull Requests and GitLab Merge Requests — read, review, and post comments.
gh CLI, GitLab via API)python3 scripts/git_pr_reader.py read --url "https://github.com/owner/repo/pull/123"
python3 scripts/git_pr_reader.py read --url "https://gitlab.com/group/project/-/merge_requests/456" --format markdown
python3 scripts/git_pr_reader.py read --url "https://github.com/owner/repo/pull/123" --no-filter
python3 scripts/git_pr_reader.py info https://github.com/owner/repo/pull/123 --json
python3 scripts/git_pr_reader.py files https://github.com/owner/repo/pull/123
python3 scripts/git_pr_reader.py files https://github.com/owner/repo/pull/123 --filter "*.adoc" --json
python3 scripts/git_pr_reader.py comments https://github.com/owner/repo/pull/123
python3 scripts/git_pr_reader.py comments https://github.com/owner/repo/pull/123 --include-resolved --json
python3 scripts/git_pr_reader.py diff https://github.com/owner/repo/pull/123
python3 scripts/git_pr_reader.py post https://github.com/owner/repo/pull/123 comments.json
python3 scripts/git_pr_reader.py post https://github.com/owner/repo/pull/123 comments.json --dry-run
# Find line number for a pattern
python3 scripts/git_pr_reader.py extract https://github.com/owner/repo/pull/123 path/to/file.adoc "pattern"
# Dump all added/modified lines
python3 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 scripts/git_pr_reader.py extract --validate https://github.com/owner/repo/pull/123 comments.json
python3 scripts/git_pr_reader.py detect
python3 scripts/git_pr_reader.py detect --json
Set in ~/.env (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"
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)
[
{"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"}
]
File filtering patterns are defined in config/git_filters.yaml. You can customize these patterns for your specific needs.
Install required Python packages:
python3 -m pip install PyGithub python-gitlab pyyaml pip-system-certs
This skill works well with: