Gitcrawl —— 本地GitHub归档搜索与PR状态同步技能

381980 80119 Updated: 2026-07-12 18:08:10

Gitcrawl is a tool designed for searching and interacting with GitHub issues and pull requests, prioritizing local archives. Its core philosophy is to utilize locally cached archive data before calling the live GitHub API, thereby improving search efficiency and reducing real-time dependency on the API. Built as a Go module, it can be installed using the command: `go install github.com/openclaw/gitcrawl/cmd/gitcrawl@latest`.

Install
npx skills add https://github.com/openclaw/openclaw --skill gitcrawl
Skill Details readonly

1. Archive Freshness Check

Prior to running any retrieval operations, execute gitcrawl doctor --json to verify the freshness of local archived data, guaranteeing subsequent queries rely on sufficiently up-to-date records.

2. Archive Retrieval (Local-First)

Gitcrawl provides multiple local retrieval commands with no real-time GitHub API invocations required:
Command Function
gitcrawl threads Bulk fetch Issue/PR threads by numerical IDs
gitcrawl neighbors Retrieve adjacent threads associated with a specified Issue/PR
gitcrawl search Search Issues by keywords, with filtering for open/closed status
gitcrawl clusters Identify clusters of semantically similar Issues; supports sorting by cluster size and minimum size threshold filtering
gitcrawl cluster-detail Inspect full detailed data of a single target cluster
All retrieval commands support --json formatted output for automated programmatic processing.

3. PR Status Synchronization (gh-shim)

Before finalizing merge or modification decisions, Gitcrawl exposes the gitcrawl gh subcommand to pull the latest PR runtime status:
bash
gitcrawl gh pr status --compact
gitcrawl gh pr view --json
The latter outputs complete PR JSON metadata including ID, title, state, URL, draft flag, head branch and commit SHA.
 
Append the --live flag to force fetching real-time live data.

4. Live Validation (Native gh CLI)

Before performing any write modification operations (commenting, labeling, closing, reopening, merging, submitting PR reviews), mandatory live validation must be completed via the official native gh command-line utility:
bash
gh pr view <number> --json number,title,state,mergedAt,body,files,comments,reviews,statusCheckRollup
gh issue view <number> --json number,title,state,body,comments,closedAt

III. Core Use Cases

  1. Issue/PR Triage & Filtering
     
    Quickly locate target candidates from massive batches of Issues and PRs: pull contextual data from local archives first, and invoke real-time APIs only when modification decisions need to be made.
  2. Duplicate Issue Detection & Management
     
    Locate semantically matching Issue groups via clusters and cluster-detail commands to facilitate consolidation and categorized processing.
  3. Pre-Merge PR Status Verification
     
    Run gitcrawl gh to instantly check up-to-date PR attributes (merge eligibility, draft status, head branch info, etc.) before merging, preventing wrong judgements based on stale cached data.
  4. GitHub API Request Reduction
     
    The local-archive-first architecture drastically cuts real-time GitHub API call volume and accelerates query speed, which delivers prominent advantages for batch processing high volumes of Issues and PRs.

IV. Standard Execution Workflow

plaintext
1. gitcrawl doctor --json          → Check archive data freshness
2. gitcrawl search / threads / clusters → Retrieve candidate records from local archives
3. gitcrawl gh pr view             → Fetch latest PR status (cache prioritized)
4. gitcrawl gh --live pr view      → Append --live flag only when live real-time data is necessary
5. gh pr view / gh issue view      → Run final live validation via native gh CLI before any write operations
6. Execute target modification actions (merge, close, label, etc.)
 

V. Critical Rules & Restrictions

Complete Reporting Mandate: All output results must include absolute timestamps, repository names, Issue/PR numeric IDs, cluster identifiers, and gaps in available archived data sources.
Similarity Does Not Equal Execution Basis: Cluster semantic similarity alone cannot trigger automated closing or labeling actions. Exact intent matching and live runtime validation are mandatory prerequisites.
Mandatory Live Validation Prior To Modifications: The native gh CLI must be used to cross-check live data before commenting, labeling, closing, reopening, merging, or submitting formal PR reviews.

VI. Summary

Gitcrawl is a local-first GitHub archive query and PR status synchronization utility. Its "archive-first, live-fallback" workflow maintains data accuracy while drastically boosting retrieval efficiency for Issues and PRs. It is purpose-built for developers, open-source maintainers, and automated triage pipelines that require efficient bulk processing of GitHub Issue and PR datasets.