github-mentions
This skill monitors GitHub mentions and tracks state using github-mentions.sh, config.json, and the state file ~/.openclaw/workspace/memory/github-mentions-state.json. It executes shell commands (e.g., bash ~/.openclaw/workspace/skills/github-mentions/github-mentions.sh check) and makes network calls to GitHub APIs (api.github.com, orgs/<org>/members, notifications).
github-mentions
An OpenClaw skill for monitoring and tracking GitHub mentions across your organizations.
Features
- Uses GitHub Notifications API for reliable mention detection
- Tracks mention status:
pending→in_progress→completed - Configurable filtering (org-only, org-members-only)
- Org member caching with configurable refresh interval
- Prevents duplicate work by tracking what's already being addressed
Installation
clawdhub install github-mentions
Or manually clone to your skills directory:
git clone https://github.com/trifle-labs/github-mentions.git ~/.openclaw/workspace/skills/github-mentions
Prerequisites
ghCLI installed and authenticated (gh auth login)jqfor JSON processing
Usage
# Check for new mentions
github-mentions check
# List all tracked mentions
github-mentions list
# List only pending mentions
github-mentions list pending
# Start working on a mention
github-mentions start owner/repo#123
# Mark a mention as done
github-mentions done owner/repo#123
# View mention details
github-mentions view owner/repo#123
# Show/set configuration
github-mentions config
github-mentions config orgMembersOnly false
Configuration
Default configuration (config.json):
{
"orgOnly": true,
"orgMembersOnly": true,
"memberCacheHours": 1,
"checkIntervalMinutes": 5
}
| Option | Default | Description |
|---|---|---|
orgOnly | true | Only track mentions from repos within your orgs |
orgMembersOnly | true | Only track mentions from org members |
memberCacheHours | 1 | How often to refresh the org member list |
checkIntervalMinutes | 5 | Reference for intended polling frequency |
Automated Polling with Cron
Set up a cron job to check for mentions automatically every 5 minutes:
# Add to crontab (run: crontab -e)
*/5 * * * * /path/to/skills/github-mentions/github-mentions.sh check >> /path/to/logs/github-mentions.log 2>&1
Example for OpenClaw workspace:
*/5 * * * * ~/.openclaw/workspace/skills/github-mentions/github-mentions.sh check >> ~/.openclaw/workspace/memory/github-mentions.log 2>&1
Or use the one-liner to add it:
(crontab -l 2>/dev/null; echo "*/5 * * * * ~/.openclaw/workspace/skills/github-mentions/github-mentions.sh check >> ~/.openclaw/workspace/memory/github-mentions.log 2>&1") | crontab -
Alternative: Heartbeat Integration
If using OpenClaw's heartbeat system, add to HEARTBEAT.md:
- Check GitHub mentions: `github-mentions check`
Workflow
- Cron/heartbeat runs
github-mentions checkevery 5 minutes - New mentions appear as
pending - When you start addressing a mention:
github-mentions start owner/repo#123 - After responding/resolving:
github-mentions done owner/repo#123
This prevents the bot from trying to address the same mention multiple times while it's being worked on.
License
MIT