A scheduled Claude Code routine that scans recent unanswered GitHub Discussions on selected technical topics, drafts possible replies, and surfaces them as issues in this repo for me to review and post manually.
The routine never posts on other people's repos. Only drafts.
A daily scheduled routine runs /daily in this repository:
- Searches GitHub (via GraphQL) for recent unanswered discussions in repos
matching the target topics in
CLAUDE.md. - Drafts a short, practical answer for each one where confidence is high.
- Creates one issue per draft in this repo (title
Draft: <owner/repo> — <discussion title>), labelleddraft,github-discussion,needs-review. Discussions already reported in this repo's issues are skipped.
gh auth login # GitHub CLI must be authenticated
git remote add origin [email protected]:gistrec/community-assistant.git
git push -u origin main
# Optional: pre-create labels so the routine can attach them
# (otherwise issues are created without labels via fallback).
gh label create draft -R gistrec/community-assistant --color ededed
gh label create github-discussion -R gistrec/community-assistant --color 0e8a16
gh label create needs-review -R gistrec/community-assistant --color fbca04
# Outcome labels — applied manually after posting the reply.
gh label create answer-accepted -R gistrec/community-assistant --color 0e8a16
gh label create answer-rejected -R gistrec/community-assistant --color b60205Then schedule the routine. In Claude Code:
/schedule
Use 0 9 * * * (daily 09:00) and the prompt:
/daily
with this directory as the working directory.
From this directory in Claude Code:
/daily
| Path | Purpose |
|---|---|
CLAUDE.md |
Project rules, target topics, discussion-handling behavior, output format. Auto-loaded by Claude Code. |
.claude/commands/daily.md |
/daily slash command — the routine itself. |