From olko-agent-skills
Fetch open GitHub PRs where the user is an assignee or review-requested reviewer, then write or refresh a "## PRs to review" section in today's Obsidian daily note. Use this skill whenever the user asks to sync PRs to Obsidian, update their daily note with GitHub reviews, check what PRs need attention, or run a morning PR sync routine. Also suitable for scheduled/automated runs — fully idempotent (re-running replaces the section, never appends).
How this skill is triggered — by the user, by Claude, or both
Slash command
/olko-agent-skills:obsidian-pr-syncThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Fetch all open PRs where the user is assigned or requested as reviewer, filter out
Fetch all open PRs where the user is assigned or requested as reviewer, filter out noise (bots, drafts, self-authored), and write a clean grouped section into today's daily note.
Before running, confirm:
VAULT_DAILY — absolute path to the daily notes folder (e.g. /Users/you/obsidian/vault/Lead/Daily)GH_USERNAME — GitHub login to exclude self-authored PRs (e.g. oleg-koval)ORG_PREFIX — org name to group as "Work" (e.g. Teifi-Digital); everything else goes to "Personal"If not specified by the user, infer from context (git config, existing vault files).
Run two gh queries and merge results, deduplicating by URL:
# Review-requested
gh search prs --review-requested=@me --state=open \
--json title,url,repository,author,createdAt,isDraft --limit 50
# Assigned
gh search prs --assignee=@me --state=open \
--json title,url,repository,author,createdAt,isDraft --limit 50
Merge both lists, deduplicate by url. The union is what needs attention.
Discard entries where:
isDraft is trueauthor.login matches any bot pattern: dependabot, copilot, renovate, github-actions, or author.is_bot is trueauthor.login equals GH_USERNAME — self-authored PRs are not reviews; they're your own workFor each unique author login, resolve a display name for the Obsidian wiki-link:
gh api /users/<login> --jq '.name // .login'
If the API returns a name, use it (e.g. Rutger Klaassen). If it returns null, fall
back to the login with first letter uppercased. This gives [[Rutger Klaassen]] or
[[Merlijnmacgillavry]].
Batch these lookups — run them in parallel if possible to keep the sync fast.
For each PR: days_old = (today - createdAt).days. Use today's date in local time.
Format the section exactly as:
## PRs to review
### Work (<ORG_PREFIX>)
- [ ] [TITLE](url) by [[Author Name]] (N days old)
### Personal
- [ ] [TITLE](url) by [[Author Name]] (N days old)
Rules:
repository.nameWithOwner starts with <ORG_PREFIX>/createdAt ascending (oldest first — most overdue at top)### Work header)## PRs to review\n\n_No open PRs — clear queue! 🎉_⚠️ after the age if days_old >= 7Example line:
- [ ] [RSL-108] Image sync from InRiver by [[Merlijn Mac Gillavry]] (12 days old ⚠️)
Find today's note:
TODAY=$(date +%Y-%m-%d)
NOTE="${VAULT_DAILY}/${TODAY}.md"
If the file doesn't exist, create it with standard daily template frontmatter first, then append the section. If the file exists:
Replacement logic (idempotent):
## PRs to review already exists: replace everything from that line up to (but not
including) the next ## heading or end-of-file with the newly built section.*← [[... if present, otherwise at the very end).This ensures re-running the skill produces the same result, not a growing list.
Manual (user-triggered): The user says something like "sync my PRs to today's note" or "update obsidian with my reviews". Run the full flow and confirm how many PRs were written.
Scheduled morning routine:
Same flow. No user prompt needed — just run, update the note, and report a one-line
summary: "PR sync: 3 work PRs, 2 personal PRs written to 2026-05-11.md".
In a remote CCR agent: Clone the vault repo, run the sync, commit and push. The local Obsidian Git plugin pulls the changes automatically.
After writing the file, show a brief confirmation:
Synced N PRs to Lead/Daily/YYYY-MM-DD.md
Work (<ORG_PREFIX>): X PRs
Personal: Y PRs
Skipped: Z bots/drafts
If any gh call fails (e.g. auth expired), surface the error clearly rather than
writing a partial/corrupt section.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub oleg-koval/agent-skills --plugin olko-agent-skills