Skip to main content
This guide walks through building a PR review bot—an agent that reviews open pull requests and flags issues. You’ll see how Airstore simplifies giving Claude Code the context it needs.

The old way

Without Airstore, you’d write a script:
# Fetch PRs from GitHub API
prs = github.get_open_prs("acme/api")

# For each PR, fetch the diff
for pr in prs:
    diff = github.get_pr_diff(pr.number)
    
    # Build a prompt with the diff
    prompt = f"Review this PR:\n{diff}"
    
    # Call Claude API
    response = claude.complete(prompt)
    
    # Parse response, post comments...
You’re writing glue code: API calls, pagination, rate limiting, prompt construction.

The Airstore way

Connect GitHub. Create a smart folder. Point Claude Code at it.

Step 1: Connect GitHub

airstore connect github
OAuth in your browser. Your GitHub repos are now available as a source.

Step 2: Create a smart folder

airstore create sources/github/open-prs \
  --query "open PRs in acme/api with full diffs"
Airstore translates your query and materializes the results as files:
~/airstore/sources/github/open-prs/
├── 142-add-rate-limiting.diff
├── 143-fix-auth-bug.diff
└── 147-update-deps.diff

Step 3: Mount the filesystem

airstore mount ~/airstore

Step 4: Run Claude Code

cd ~/airstore/sources/github/open-prs
claude "Review these PRs. Flag any security issues, performance problems, or bugs."
Claude Code reads the diffs as files and provides a review.

What’s different

AspectScript approachAirstore approach
API callsYou handle themAirstore handles them
Rate limitingYou implement itAirstore handles it
CachingYou build itMaterialized views
Prompt constructionManualClaude reads files directly
ReusabilityOne-off scriptFolder works with any agent

Extend it

Add more sources to give Claude more context:
# Add Linear for related issues
airstore connect linear
airstore create sources/linear/related-issues \
  --query "issues mentioning the PRs in acme/api"

# Now Claude can cross-reference
cd ~/airstore
claude "Review the open PRs. Check if any related Linear issues provide context."

Next steps