OpenClaw + GitHub: AI-Powered Code and Issue Management
OpenClaw GitHub integration: manage issues, PRs, CI runs, and code reviews with an AI agent. Setup guide and real workflows for engineering teams.
OpenClaw's GitHub integration lets you manage issues, pull requests, CI runs, and code reviews through an AI agent — from your terminal, with your GitHub credentials, without leaving your local environment. Instead of context-switching between GitHub's UI, your IDE, and your terminal, you get a single interface that understands your codebase.
Here's how to set it up and what you can actually do with it.
What the GitHub Integration Does#
The GitHub Skill teaches OpenClaw's agent how to interact with the GitHub API. Once loaded, the agent can:
- List and filter issues by label, assignee, milestone, or status
- Create, comment on, and close issues
- Check PR status and review comments
- Monitor GitHub Actions CI runs and report failures
- Review code diffs and suggest improvements
- Assign issues, add labels, and manage project boards
All of this happens through natural language. You don't need to remember the GitHub CLI syntax for filtering issues by multiple labels — you just describe what you want.
Setup#
1. Install DenchClaw#
npx denchclaw2. Install the GitHub CLI#
The GitHub Skill uses gh — GitHub's official CLI. Install it:
# macOS
brew install gh
# Linux
sudo apt install gh # or equivalent for your distro
# Authenticate
gh auth loginFollow the prompts to authenticate with your GitHub account. gh auth status should show your account as active.
3. Load the GitHub Skill#
In your OpenClaw session, load the GitHub Skill:
Load the GitHub skill and help me manage issues in my-org/my-repo.
The agent reads the Skill definition and is now equipped to make GitHub API calls via the gh CLI.
For detailed workspace configuration, see the DenchClaw setup guide.
Issue Management#
Listing and Triaging Issues#
List all open bugs in my-org/payments-service that don't have an assignee.
Sort by creation date.
The agent runs:
gh issue list --repo my-org/payments-service \
--label bug \
--assignee "" \
--json number,title,createdAt,labels \
--jq 'sort_by(.createdAt)'And returns a formatted list. No manual filtering in GitHub's UI.
Creating Issues from Context#
I found a bug: when a user's payment fails, the error message shows the
raw Stripe error code instead of a user-friendly message. Create a bug
report in the payments-service repo with appropriate labels and assign it to me.
The agent creates the issue with a well-formatted description, assigns it, and adds the bug label. You get back the issue URL.
Bulk Operations#
Close all issues labeled "wontfix" that haven't been updated in
more than 90 days. Add a comment explaining they're being closed
due to inactivity.
The agent queries for matching issues, adds the comment, and closes them. A manual process that might take 30 minutes takes 30 seconds.
Pull Request Workflows#
Checking PR Status#
What PRs are waiting for my review in all repos I'm a member of?
The agent queries GitHub across your repos and returns a consolidated list of open PRs with pending reviews requested from you, sorted by staleness.
Reviewing Code#
Review PR #142 in my-org/payments-service. Focus on:
1. Security implications of the new payment flow
2. Any missing error handling
3. Test coverage for the changed code paths
The agent:
- Fetches the PR diff via
gh pr diff 142 --repo my-org/payments-service - Reads the changed files
- Analyzes the code for the requested criteria
- Returns structured review feedback
You can then post this feedback directly:
Post my review comments on PR #142.
Monitoring PR Merge Status#
Check if PR #89 has passed all required status checks and
is ready to merge. If not, what's blocking it?
The agent checks CI status, required reviews, and merge conflicts, then returns a clear summary.
CI/CD Monitoring#
GitHub Actions Status#
What GitHub Actions workflows failed on the main branch
in the last 24 hours? Show me the failing step for each.
The agent queries the Actions API, filters for failures, and returns the workflow name, run ID, and failing step name. You go straight to the failing step instead of hunting through the Actions UI.
Watching a Run#
Monitor the CI run for PR #156 and tell me when it completes.
If it fails, tell me which step failed and show me the relevant log output.
The agent polls the run status and reports back when complete. For long CI runs, it can run in the background.
Flaky Test Detection#
Look at the last 20 CI runs on main. Which tests failed more than twice?
List them as potential flaky tests.
The agent analyzes run history and produces a list of tests that failed non-deterministically — your starting point for fixing flaky CI.
Storing GitHub Context in DuckDB#
One powerful pattern: syncing GitHub metadata to your local DuckDB workspace for richer queries and historical analysis.
-- Track issues you care about
CREATE TABLE tracked_issues (
repo VARCHAR,
number INTEGER,
title VARCHAR,
labels VARCHAR[],
assignee VARCHAR,
state VARCHAR,
created_at TIMESTAMP,
updated_at TIMESTAMP,
notes VARCHAR -- your personal notes
);
-- Track PR review obligations
CREATE TABLE pr_reviews (
repo VARCHAR,
pr_number INTEGER,
title VARCHAR,
author VARCHAR,
requested_at TIMESTAMP,
reviewed BOOLEAN,
reviewed_at TIMESTAMP
);Now you can ask:
- "Which repos have I been most active in this quarter?"
- "How many issues have I closed this month vs. last month?"
- "Show me all PRs I've reviewed but haven't been merged yet"
This context lives locally, queryable by the AI, and persists across sessions. It's your personal engineering CRM. See what DenchClaw is for more on this pattern.
Daily Engineering Workflows#
Morning Standup Prep#
Give me a standup summary:
- What issues did I close or comment on yesterday?
- What PRs are awaiting my review?
- Any CI failures on branches I'm working on?
- What's the oldest open issue assigned to me?
The agent pulls GitHub data and formats it for standup. Under 30 seconds.
Sprint Planning Support#
We're starting a new sprint. List all open issues labeled
"sprint-candidate" in order of creation date. For each,
give me the title, any open questions in the comments,
and current assignee status.
Release Notes Generation#
Generate release notes for v2.4.0. The release includes
PRs merged between 2026-03-01 and 2026-03-26 on main.
Group by: new features, bug fixes, and maintenance.
Exclude any PRs labeled "internal".
The agent queries merged PRs in that date range, reads titles and labels, and generates formatted release notes.
Multi-Repo Workflows#
For engineers working across multiple repos (monorepo or not), the agent can coordinate across them:
I need to make a breaking API change in the auth-service.
Which other repos import from auth-service? Do any of them
have open issues related to the auth API?
The agent searches across repos, identifies dependencies, and surfaces related issues — context you'd normally have to gather manually.
Integration with Other Skills#
The GitHub integration works alongside other OpenClaw Skills:
- Jira/Linear integration: Create a Jira ticket from a GitHub issue, or sync Linear issue status back to GitHub
- Slack notifications: Post to Slack when PRs are merged or CI fails
- DuckDB storage: Sync issue and PR metadata to your local workspace for analytics
See the OpenClaw Linear integration and Jira integration for cross-tool workflows.
FAQ#
Does OpenClaw need write access to GitHub?
The gh CLI uses whatever permissions your GitHub token has. For read-only workflows (listing, reviewing), read access is sufficient. For creating issues, posting comments, or merging PRs, write access is required. Scope your token to match your intended use.
Can OpenClaw create commits or push code?
Not via the GitHub Skill directly. The agent can suggest code changes, write them to files locally, and run git commands via shell execution. Actually pushing requires your confirmation.
Does OpenClaw work with GitHub Enterprise?
Yes. Configure gh to point at your GitHub Enterprise instance: gh auth login --hostname your-enterprise.github.com. The GitHub Skill works with any gh-compatible GitHub instance.
Can I use OpenClaw to manage GitHub Projects (v2)? GitHub Projects v2 has a GraphQL API. The agent can call it, though there isn't a polished Skill for Projects specifically. For issue and PR management, the built-in GitHub Skill covers the common cases.
How does this compare to GitHub Copilot? Copilot is an in-editor coding assistant. OpenClaw's GitHub integration is about managing GitHub — issues, PRs, CI — rather than writing code in your editor. They're complementary.
Ready to try DenchClaw? Install in one command: npx denchclaw. Full setup guide →
