5ba5cd1aa735d05a3380f9243f31f3fc3aebbc23
OpenClaw GitHub Skill
A skill that lets your AI assistant query and manage GitHub repositories.
Features
- 📋 List Repos — View your repositories with filters
- 📊 Get Repo Details — Stars, forks, language, last updated
- 🔄 Check CI Status — Monitor CI/CD pipelines
- 📝 Create Issues — Open issues from conversation
- 📁 Create Repos — Create new repositories
- 🔍 Search Repos — Find repos by name/query
- 📊 Recent Activity — View recent commits
Prerequisites
- OpenClaw gateway running
- Node.js 18+
- GitHub account with a Personal Access Token (PAT)
Setup
1. Generate a GitHub Personal Access Token
- Go to https://github.com/settings/tokens
- Click "Generate new token (classic)"
- Name:
openclaw-github-skill - Scopes (permissions):
repo— Full control of private repositoriespublic_repo— Limited access to public repositories onlyread:user— Read user profile data (optional)
- Copy the token
2. Configure Credentials
Option A: Environment Variables (Recommended for local use)
Set before starting OpenClaw:
export GITHUB_TOKEN="ghp_your_token_here"
export GITHUB_USERNAME="your_github_username"
Option B: OpenClaw Config
Add to ~/.openclaw/openclaw.json:
{
"github": {
"token": "ghp_your_token_here",
"username": "your_username"
}
}
3. Restart OpenClaw
openclaw gateway restart
Usage
You: List my Python repositories
Bot: [lists your Python repositories]
You: Check CI status on my-project
Bot: [shows CI/CD status]
You: Create an issue in my-project about the login bug
Bot: [creates the issue and returns the link]
You: What's the recent activity on my-project?
Bot: [shows recent commits]
You: Search my repos for "trading"
Bot: [shows matching repositories]
Directory Structure
openclaw-github-skill/
├── SKILL.md # Skill documentation for OpenClaw
├── README.md # This file
├── index.js # Skill implementation
└── package.json # NPM package metadata
Commands Reference
| Command | Description |
|---|---|
list_repos |
List repositories (filter by type, language, sort) |
get_repo |
Get detailed repo info (stars, forks, etc.) |
check_ci_status |
CI/CD status |
create_issue |
Create a new issue |
create_repo |
Create a new repository |
search_repos |
Search your repositories |
get_recent_activity |
View recent commits |
Security
⚠️ IMPORTANT: Protect Your GitHub Token!
Do:
- ✅ Use environment variables or OpenClaw config
- ✅ Use minimal required scopes (
repoorpublic_repo) - ✅ Rotate tokens if compromised
Don't:
- ❌ Commit tokens to git
- ❌ Share tokens in code or public repos
- ❌ Store tokens in unprotected files
Best Practices:
- For local development: Environment variables are acceptable
- For shared machines: Use OpenClaw config or a secrets manager
- For production: Use your platform's credential store
Rate Limits
- Unauthenticated requests: 60/hour
- Authenticated requests: 5,000/hour
The skill automatically uses your credentials for authentication.
Requirements
- OpenClaw 2024+
- Node.js 18+
- GitHub Personal Access Token with appropriate scopes
Contributing
Contributions welcome! To contribute:
- Fork this repository
- Create a feature branch
- Make your changes
- Submit a pull request
License
MIT License
Acknowledgments
Built for the OpenClaw ecosystem.
Description
Languages
JavaScript
100%