/olko-obsidian:obsidian-pr-syncfrom olko-obsidian
Fetch open GitHub PRs where the user is an assignee or review-requested reviewer, today's Google Calendar events, and auto-create People stubs for new meeting attendees. 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 or calendar, check what needs attention, run a morning sync routine, or create people notes from calendar meetings. Also suitable for scheduled/automated runs: fully idempotent (re-running replaces the section, never appends; people stubs are only created once).
Ships in olko-obsidian. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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. The calendar pass also creates idempotent People stubs for attendees who do not already have a matching note.
Before running, confirm:
vault_path: absolute path to the Obsidian vault, from the plugin configurationVAULT_DAILY: derive as ${vault_path}/Lead/DailyVAULT_PEOPLE: derive as ${vault_path}/Lead/PeopleSELF_EMAIL: the user's calendar email address, used to exclude the user from attendee processingGH_USERNAME: GitHub login to exclude self-authored PRs (e.g. oleg-koval)ORG_PREFIX: org name to group as "Work" (e.g. acme-org); 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.
Fetch today's calendar events once with the available calendar integration. Retain each
event's stable ID, title, and attendees (displayName, email, and responseStatus) as
CALENDAR_EVENTS, and pass that same collection to Part C. Do not fetch the events again.
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. Sam Roe). If it returns null, fall
back to the login with first letter uppercased. This gives [[Sam Roe]] or
[[Alexdoe]].
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:
- [ ] [PROJ-108] Image sync from the PIM by [[Alex Doe]] (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.
Run this with CALENDAR_EVENTS from Step 1. No additional calendar API calls are needed.
Collect attendees across all fetched events:
SELF_EMAIL by trimming whitespace and lowercasing it.email the same way. Use the normalized email as the
persistent attendee identity. If an attendee has no email, a collection layer may use
event:<event-id>:attendee:<index> as a transient collision-safe key, but skip that
attendee before deduplication, note lookup, or stub creation.SELF_EMAIL (self).responseStatus is declined.@ in the normalized email.Keep the events each attendee appears in so every meeting can be written to the stub.
People notes live under Lead/People/, including Peers/, Reports/, and
Stakeholders/. Discover existing Markdown notes from the configured directory:
find "$VAULT_PEOPLE" -type f -name "*.md"
Do not match by filename containment. Treat a note as existing only when its title (the first H1) exactly matches the attendee's normalized display name after case-folding and whitespace normalization, and its recorded email exactly matches the normalized attendee email. Create a stub when no note satisfies both checks.
Create each new attendee at:
${VAULT_PEOPLE}/<SafeDisplayName>--<IdentityHash>.md
Derive IdentityHash from the normalized email so attendees with the same display name
cannot collide. Before constructing the path, sanitize the display name to a filename-safe
basename: remove control characters, normalize whitespace, and replace reserved filename
characters with -. Reject the original display name if it contains /, \\, or ..,
and reject an empty or dot-only sanitized basename. Resolve VAULT_PEOPLE and the candidate
path, then create the file only if the candidate's resolved parent is exactly the resolved
VAULT_PEOPLE directory. Never overwrite an existing path.
Use this template, replacing the placeholders and adding one meeting line per event:
---
type: person
role: ""
team: ""
last-1-1:
next-1-1:
---
# <DisplayName>
## Context
- Email: <email>
## Strengths
## Growth areas
## Recent 1:1s
## Running notes
## Meetings
- [[Lead/Daily/<TODAY>]] - <Event title>
<!-- Classify: example.com email → Peers or Reports · external email → Stakeholders -->
Do not add ## Code Review Signals; that section is for direct reports only.
Stubs are idempotent: existing matching notes are skipped and never overwritten.
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
People: N new stubs created (or "all known")
If any gh call fails (e.g. auth expired), surface the error clearly rather than
writing a partial/corrupt section.
What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/morning-routineRun the complete start-of-day setup in one pass: roll over unfinished Obsidian tasks to today's daily note, sync open GitHub PRs that need your attention, and sweep Dependabot/Renovate PRs to clear safe patch bumps. Use when the user says "start my day", "morning routine", "set up my day", or when a scheduled morning job fires.
/obsidian-task-rolloverMigrate unfinished tasks from a daily Obsidian note to the next workday's note, bullet-journal style. Marks migrated tasks in the source note with [>] (the BJ migration symbol) and copies them to the target note under "## Carried over". Use this skill whenever the user says "roll over today's tasks", "migrate unfinished tasks to tomorrow", "end of day task sync", "move open tasks to next workday", or when a scheduled end-of-day / start-of-day routine fires. Fully idempotent: safe to re-run; already-migrated tasks ([>]) are not touched again.
Other plugins' skills for the same job
npx claudepluginhub oleg-koval/agent-skills --plugin olko-obsidian