@olegkoval/agent-skills 1.7.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +4 -2
- package/.cursor-plugin/index.json +10 -0
- package/.kiro/steering/obsidian-pr-sync.md +137 -0
- package/.kiro/steering/obsidian-task-rollover.md +180 -0
- package/.windsurf/rules/obsidian-pr-sync.md +136 -0
- package/.windsurf/rules/obsidian-task-rollover.md +179 -0
- package/README.md +4 -2
- package/catalog/skills.json +44 -0
- package/package.json +1 -1
- package/packages/software-development/obsidian-pr-sync/SKILL.md +152 -0
- package/packages/software-development/obsidian-pr-sync/adapters/claude/plugin.json +5 -0
- package/packages/software-development/obsidian-pr-sync/adapters/claude/skills/obsidian-pr-sync/SKILL.md +154 -0
- package/packages/software-development/obsidian-pr-sync/adapters/cursor/plugin.json +6 -0
- package/packages/software-development/obsidian-pr-sync/adapters/cursor/skills/obsidian-pr-sync/SKILL.md +154 -0
- package/packages/software-development/obsidian-pr-sync/adapters/kiro/steering/obsidian-pr-sync.md +137 -0
- package/packages/software-development/obsidian-pr-sync/adapters/windsurf/rules/obsidian-pr-sync.md +136 -0
- package/packages/software-development/obsidian-task-rollover/SKILL.md +196 -0
- package/packages/software-development/obsidian-task-rollover/adapters/claude/plugin.json +5 -0
- package/packages/software-development/obsidian-task-rollover/adapters/claude/skills/obsidian-task-rollover/SKILL.md +198 -0
- package/packages/software-development/obsidian-task-rollover/adapters/cursor/plugin.json +6 -0
- package/packages/software-development/obsidian-task-rollover/adapters/cursor/skills/obsidian-task-rollover/SKILL.md +198 -0
- package/packages/software-development/obsidian-task-rollover/adapters/kiro/steering/obsidian-task-rollover.md +180 -0
- package/packages/software-development/obsidian-task-rollover/adapters/windsurf/rules/obsidian-task-rollover.md +179 -0
package/catalog/skills.json
CHANGED
|
@@ -358,6 +358,50 @@
|
|
|
358
358
|
"windsurf",
|
|
359
359
|
"kiro"
|
|
360
360
|
]
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"name": "obsidian-pr-sync",
|
|
364
|
+
"lookupName": "olko:obsidian-pr-sync",
|
|
365
|
+
"category": "software-development",
|
|
366
|
+
"path": "packages/software-development/obsidian-pr-sync",
|
|
367
|
+
"description": "Fetch open GitHub PRs assigned to you or requesting your review, and write a grouped, age-sorted '## PRs to review' section into today's Obsidian daily note. Idempotent — re-running replaces the section.",
|
|
368
|
+
"tags": [
|
|
369
|
+
"github",
|
|
370
|
+
"obsidian",
|
|
371
|
+
"daily-note",
|
|
372
|
+
"pull-requests",
|
|
373
|
+
"productivity",
|
|
374
|
+
"morning-routine"
|
|
375
|
+
],
|
|
376
|
+
"adapters": [
|
|
377
|
+
"claude",
|
|
378
|
+
"cursor",
|
|
379
|
+
"copilot",
|
|
380
|
+
"windsurf",
|
|
381
|
+
"kiro"
|
|
382
|
+
]
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"name": "obsidian-task-rollover",
|
|
386
|
+
"lookupName": "olko:obsidian-task-rollover",
|
|
387
|
+
"category": "software-development",
|
|
388
|
+
"path": "packages/software-development/obsidian-task-rollover",
|
|
389
|
+
"description": "Bullet-journal end-of-day task migration: copy unchecked tasks from today's Obsidian daily note to the next workday's note under '## Carried over', and mark them [>] in the source. Skips weekends, idempotent.",
|
|
390
|
+
"tags": [
|
|
391
|
+
"obsidian",
|
|
392
|
+
"daily-note",
|
|
393
|
+
"bullet-journal",
|
|
394
|
+
"productivity",
|
|
395
|
+
"task-rollover",
|
|
396
|
+
"end-of-day"
|
|
397
|
+
],
|
|
398
|
+
"adapters": [
|
|
399
|
+
"claude",
|
|
400
|
+
"cursor",
|
|
401
|
+
"copilot",
|
|
402
|
+
"windsurf",
|
|
403
|
+
"kiro"
|
|
404
|
+
]
|
|
361
405
|
}
|
|
362
406
|
]
|
|
363
407
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: obsidian-pr-sync
|
|
3
|
+
description: >
|
|
4
|
+
Fetch open GitHub PRs where the user is an assignee or review-requested reviewer,
|
|
5
|
+
then write or refresh a "## PRs to review" section in today's Obsidian daily note.
|
|
6
|
+
Use this skill whenever the user asks to sync PRs to Obsidian, update their daily note
|
|
7
|
+
with GitHub reviews, check what PRs need attention, or run a morning PR sync routine.
|
|
8
|
+
Also suitable for scheduled/automated runs — fully idempotent (re-running replaces
|
|
9
|
+
the section, never appends).
|
|
10
|
+
license: MIT
|
|
11
|
+
allowed-tools: Bash, Read, Write, Edit
|
|
12
|
+
compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires the GitHub CLI (`gh`) authenticated and a daily note vault.
|
|
13
|
+
metadata:
|
|
14
|
+
author: Oleg Koval
|
|
15
|
+
tags:
|
|
16
|
+
- github
|
|
17
|
+
- obsidian
|
|
18
|
+
- daily-note
|
|
19
|
+
- pull-requests
|
|
20
|
+
- productivity
|
|
21
|
+
- morning-routine
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# Obsidian PR Sync
|
|
25
|
+
|
|
26
|
+
Fetch all open PRs where the user is assigned or requested as reviewer, filter out
|
|
27
|
+
noise (bots, drafts, self-authored), and write a clean grouped section into today's
|
|
28
|
+
daily note.
|
|
29
|
+
|
|
30
|
+
## Configuration
|
|
31
|
+
|
|
32
|
+
Before running, confirm:
|
|
33
|
+
- `VAULT_DAILY` — absolute path to the daily notes folder (e.g. `/Users/you/obsidian/vault/Lead/Daily`)
|
|
34
|
+
- `GH_USERNAME` — GitHub login to exclude self-authored PRs (e.g. `oleg-koval`)
|
|
35
|
+
- `ORG_PREFIX` — org name to group as "Work" (e.g. `Teifi-Digital`); everything else goes to "Personal"
|
|
36
|
+
|
|
37
|
+
If not specified by the user, infer from context (git config, existing vault files).
|
|
38
|
+
|
|
39
|
+
## Step 1 — Fetch PRs
|
|
40
|
+
|
|
41
|
+
Run two `gh` queries and merge results, deduplicating by URL:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Review-requested
|
|
45
|
+
gh search prs --review-requested=@me --state=open \
|
|
46
|
+
--json title,url,repository,author,createdAt,isDraft --limit 50
|
|
47
|
+
|
|
48
|
+
# Assigned
|
|
49
|
+
gh search prs --assignee=@me --state=open \
|
|
50
|
+
--json title,url,repository,author,createdAt,isDraft --limit 50
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Merge both lists, deduplicate by `url`. The union is what needs attention.
|
|
54
|
+
|
|
55
|
+
## Step 2 — Filter
|
|
56
|
+
|
|
57
|
+
Discard entries where:
|
|
58
|
+
- `isDraft` is `true`
|
|
59
|
+
- `author.login` matches any bot pattern: `dependabot`, `copilot`, `renovate`, `github-actions`, or `author.is_bot` is `true`
|
|
60
|
+
- `author.login` equals `GH_USERNAME` — self-authored PRs are not reviews; they're your own work
|
|
61
|
+
|
|
62
|
+
## Step 3 — Enrich authors
|
|
63
|
+
|
|
64
|
+
For each unique author login, resolve a display name for the Obsidian wiki-link:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
gh api /users/<login> --jq '.name // .login'
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If the API returns a name, use it (e.g. `Rutger Klaassen`). If it returns null, fall
|
|
71
|
+
back to the login with first letter uppercased. This gives `[[Rutger Klaassen]]` or
|
|
72
|
+
`[[Merlijnmacgillavry]]`.
|
|
73
|
+
|
|
74
|
+
Batch these lookups — run them in parallel if possible to keep the sync fast.
|
|
75
|
+
|
|
76
|
+
## Step 4 — Calculate age
|
|
77
|
+
|
|
78
|
+
For each PR: `days_old = (today - createdAt).days`. Use today's date in local time.
|
|
79
|
+
|
|
80
|
+
## Step 5 — Build the section
|
|
81
|
+
|
|
82
|
+
Format the section exactly as:
|
|
83
|
+
|
|
84
|
+
```markdown
|
|
85
|
+
## PRs to review
|
|
86
|
+
|
|
87
|
+
### Work (<ORG_PREFIX>)
|
|
88
|
+
- [ ] [TITLE](url) by [[Author Name]] (N days old)
|
|
89
|
+
|
|
90
|
+
### Personal
|
|
91
|
+
- [ ] [TITLE](url) by [[Author Name]] (N days old)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Rules:
|
|
95
|
+
- **Work**: `repository.nameWithOwner` starts with `<ORG_PREFIX>/`
|
|
96
|
+
- **Personal**: everything else
|
|
97
|
+
- Within each group, sort by `createdAt` ascending (oldest first — most overdue at top)
|
|
98
|
+
- If a group has no PRs, omit that subsection entirely (don't render an empty `### Work` header)
|
|
99
|
+
- If there are zero PRs total, write: `## PRs to review\n\n_No open PRs — clear queue! 🎉_`
|
|
100
|
+
- Add `⚠️` after the age if `days_old >= 7`
|
|
101
|
+
|
|
102
|
+
**Example line:**
|
|
103
|
+
```
|
|
104
|
+
- [ ] [RSL-108] Image sync from InRiver by [[Merlijn Mac Gillavry]] (12 days old ⚠️)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Step 6 — Write to today's daily note
|
|
108
|
+
|
|
109
|
+
**Find today's note:**
|
|
110
|
+
```bash
|
|
111
|
+
TODAY=$(date +%Y-%m-%d)
|
|
112
|
+
NOTE="${VAULT_DAILY}/${TODAY}.md"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
If the file doesn't exist, create it with standard daily template frontmatter first,
|
|
116
|
+
then append the section. If the file exists:
|
|
117
|
+
|
|
118
|
+
**Replacement logic (idempotent):**
|
|
119
|
+
- If `## PRs to review` already exists: replace everything from that line up to (but not
|
|
120
|
+
including) the next `## ` heading or end-of-file with the newly built section.
|
|
121
|
+
- If it doesn't exist: append the section at the end of the file (before the nav footer
|
|
122
|
+
line `*← [[...` if present, otherwise at the very end).
|
|
123
|
+
|
|
124
|
+
This ensures re-running the skill produces the same result, not a growing list.
|
|
125
|
+
|
|
126
|
+
## Invocation patterns
|
|
127
|
+
|
|
128
|
+
**Manual (user-triggered):**
|
|
129
|
+
The user says something like "sync my PRs to today's note" or "update obsidian with my reviews".
|
|
130
|
+
Run the full flow and confirm how many PRs were written.
|
|
131
|
+
|
|
132
|
+
**Scheduled morning routine:**
|
|
133
|
+
Same flow. No user prompt needed — just run, update the note, and report a one-line
|
|
134
|
+
summary: `"PR sync: 3 work PRs, 2 personal PRs written to 2026-05-11.md"`.
|
|
135
|
+
|
|
136
|
+
**In a remote CCR agent:**
|
|
137
|
+
Clone the vault repo, run the sync, commit and push. The local Obsidian Git plugin
|
|
138
|
+
pulls the changes automatically.
|
|
139
|
+
|
|
140
|
+
## Output to user
|
|
141
|
+
|
|
142
|
+
After writing the file, show a brief confirmation:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
Synced N PRs to Lead/Daily/YYYY-MM-DD.md
|
|
146
|
+
Work (<ORG_PREFIX>): X PRs
|
|
147
|
+
Personal: Y PRs
|
|
148
|
+
Skipped: Z bots/drafts
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
If any `gh` call fails (e.g. auth expired), surface the error clearly rather than
|
|
152
|
+
writing a partial/corrupt section.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "olko-obsidian-pr-sync",
|
|
3
|
+
"description": "Fetch open GitHub PRs assigned to you or requesting your review, and write a grouped, age-sorted '## PRs to review' section into today's Obsidian daily note. Idempotent — re-running replaces the section.",
|
|
4
|
+
"skills": "./skills"
|
|
5
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
name: obsidian-pr-sync
|
|
5
|
+
description: >
|
|
6
|
+
Fetch open GitHub PRs where the user is an assignee or review-requested reviewer,
|
|
7
|
+
then write or refresh a "## PRs to review" section in today's Obsidian daily note.
|
|
8
|
+
Use this skill whenever the user asks to sync PRs to Obsidian, update their daily note
|
|
9
|
+
with GitHub reviews, check what PRs need attention, or run a morning PR sync routine.
|
|
10
|
+
Also suitable for scheduled/automated runs — fully idempotent (re-running replaces
|
|
11
|
+
the section, never appends).
|
|
12
|
+
license: MIT
|
|
13
|
+
allowed-tools: Bash, Read, Write, Edit
|
|
14
|
+
compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires the GitHub CLI (`gh`) authenticated and a daily note vault.
|
|
15
|
+
metadata:
|
|
16
|
+
author: Oleg Koval
|
|
17
|
+
tags:
|
|
18
|
+
- github
|
|
19
|
+
- obsidian
|
|
20
|
+
- daily-note
|
|
21
|
+
- pull-requests
|
|
22
|
+
- productivity
|
|
23
|
+
- morning-routine
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# Obsidian PR Sync
|
|
27
|
+
|
|
28
|
+
Fetch all open PRs where the user is assigned or requested as reviewer, filter out
|
|
29
|
+
noise (bots, drafts, self-authored), and write a clean grouped section into today's
|
|
30
|
+
daily note.
|
|
31
|
+
|
|
32
|
+
## Configuration
|
|
33
|
+
|
|
34
|
+
Before running, confirm:
|
|
35
|
+
- `VAULT_DAILY` — absolute path to the daily notes folder (e.g. `/Users/you/obsidian/vault/Lead/Daily`)
|
|
36
|
+
- `GH_USERNAME` — GitHub login to exclude self-authored PRs (e.g. `oleg-koval`)
|
|
37
|
+
- `ORG_PREFIX` — org name to group as "Work" (e.g. `Teifi-Digital`); everything else goes to "Personal"
|
|
38
|
+
|
|
39
|
+
If not specified by the user, infer from context (git config, existing vault files).
|
|
40
|
+
|
|
41
|
+
## Step 1 — Fetch PRs
|
|
42
|
+
|
|
43
|
+
Run two `gh` queries and merge results, deduplicating by URL:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Review-requested
|
|
47
|
+
gh search prs --review-requested=@me --state=open \
|
|
48
|
+
--json title,url,repository,author,createdAt,isDraft --limit 50
|
|
49
|
+
|
|
50
|
+
# Assigned
|
|
51
|
+
gh search prs --assignee=@me --state=open \
|
|
52
|
+
--json title,url,repository,author,createdAt,isDraft --limit 50
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Merge both lists, deduplicate by `url`. The union is what needs attention.
|
|
56
|
+
|
|
57
|
+
## Step 2 — Filter
|
|
58
|
+
|
|
59
|
+
Discard entries where:
|
|
60
|
+
- `isDraft` is `true`
|
|
61
|
+
- `author.login` matches any bot pattern: `dependabot`, `copilot`, `renovate`, `github-actions`, or `author.is_bot` is `true`
|
|
62
|
+
- `author.login` equals `GH_USERNAME` — self-authored PRs are not reviews; they're your own work
|
|
63
|
+
|
|
64
|
+
## Step 3 — Enrich authors
|
|
65
|
+
|
|
66
|
+
For each unique author login, resolve a display name for the Obsidian wiki-link:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
gh api /users/<login> --jq '.name // .login'
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
If the API returns a name, use it (e.g. `Rutger Klaassen`). If it returns null, fall
|
|
73
|
+
back to the login with first letter uppercased. This gives `[[Rutger Klaassen]]` or
|
|
74
|
+
`[[Merlijnmacgillavry]]`.
|
|
75
|
+
|
|
76
|
+
Batch these lookups — run them in parallel if possible to keep the sync fast.
|
|
77
|
+
|
|
78
|
+
## Step 4 — Calculate age
|
|
79
|
+
|
|
80
|
+
For each PR: `days_old = (today - createdAt).days`. Use today's date in local time.
|
|
81
|
+
|
|
82
|
+
## Step 5 — Build the section
|
|
83
|
+
|
|
84
|
+
Format the section exactly as:
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
## PRs to review
|
|
88
|
+
|
|
89
|
+
### Work (<ORG_PREFIX>)
|
|
90
|
+
- [ ] [TITLE](url) by [[Author Name]] (N days old)
|
|
91
|
+
|
|
92
|
+
### Personal
|
|
93
|
+
- [ ] [TITLE](url) by [[Author Name]] (N days old)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Rules:
|
|
97
|
+
- **Work**: `repository.nameWithOwner` starts with `<ORG_PREFIX>/`
|
|
98
|
+
- **Personal**: everything else
|
|
99
|
+
- Within each group, sort by `createdAt` ascending (oldest first — most overdue at top)
|
|
100
|
+
- If a group has no PRs, omit that subsection entirely (don't render an empty `### Work` header)
|
|
101
|
+
- If there are zero PRs total, write: `## PRs to review\n\n_No open PRs — clear queue! 🎉_`
|
|
102
|
+
- Add `⚠️` after the age if `days_old >= 7`
|
|
103
|
+
|
|
104
|
+
**Example line:**
|
|
105
|
+
```
|
|
106
|
+
- [ ] [RSL-108] Image sync from InRiver by [[Merlijn Mac Gillavry]] (12 days old ⚠️)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Step 6 — Write to today's daily note
|
|
110
|
+
|
|
111
|
+
**Find today's note:**
|
|
112
|
+
```bash
|
|
113
|
+
TODAY=$(date +%Y-%m-%d)
|
|
114
|
+
NOTE="${VAULT_DAILY}/${TODAY}.md"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
If the file doesn't exist, create it with standard daily template frontmatter first,
|
|
118
|
+
then append the section. If the file exists:
|
|
119
|
+
|
|
120
|
+
**Replacement logic (idempotent):**
|
|
121
|
+
- If `## PRs to review` already exists: replace everything from that line up to (but not
|
|
122
|
+
including) the next `## ` heading or end-of-file with the newly built section.
|
|
123
|
+
- If it doesn't exist: append the section at the end of the file (before the nav footer
|
|
124
|
+
line `*← [[...` if present, otherwise at the very end).
|
|
125
|
+
|
|
126
|
+
This ensures re-running the skill produces the same result, not a growing list.
|
|
127
|
+
|
|
128
|
+
## Invocation patterns
|
|
129
|
+
|
|
130
|
+
**Manual (user-triggered):**
|
|
131
|
+
The user says something like "sync my PRs to today's note" or "update obsidian with my reviews".
|
|
132
|
+
Run the full flow and confirm how many PRs were written.
|
|
133
|
+
|
|
134
|
+
**Scheduled morning routine:**
|
|
135
|
+
Same flow. No user prompt needed — just run, update the note, and report a one-line
|
|
136
|
+
summary: `"PR sync: 3 work PRs, 2 personal PRs written to 2026-05-11.md"`.
|
|
137
|
+
|
|
138
|
+
**In a remote CCR agent:**
|
|
139
|
+
Clone the vault repo, run the sync, commit and push. The local Obsidian Git plugin
|
|
140
|
+
pulls the changes automatically.
|
|
141
|
+
|
|
142
|
+
## Output to user
|
|
143
|
+
|
|
144
|
+
After writing the file, show a brief confirmation:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
Synced N PRs to Lead/Daily/YYYY-MM-DD.md
|
|
148
|
+
Work (<ORG_PREFIX>): X PRs
|
|
149
|
+
Personal: Y PRs
|
|
150
|
+
Skipped: Z bots/drafts
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
If any `gh` call fails (e.g. auth expired), surface the error clearly rather than
|
|
154
|
+
writing a partial/corrupt section.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "olko:obsidian-pr-sync",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Fetch open GitHub PRs assigned to you or requesting your review, and write a grouped, age-sorted '## PRs to review' section into today's Obsidian daily note. Idempotent — re-running replaces the section.",
|
|
5
|
+
"skills": "skills/"
|
|
6
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
name: obsidian-pr-sync
|
|
5
|
+
description: >
|
|
6
|
+
Fetch open GitHub PRs where the user is an assignee or review-requested reviewer,
|
|
7
|
+
then write or refresh a "## PRs to review" section in today's Obsidian daily note.
|
|
8
|
+
Use this skill whenever the user asks to sync PRs to Obsidian, update their daily note
|
|
9
|
+
with GitHub reviews, check what PRs need attention, or run a morning PR sync routine.
|
|
10
|
+
Also suitable for scheduled/automated runs — fully idempotent (re-running replaces
|
|
11
|
+
the section, never appends).
|
|
12
|
+
license: MIT
|
|
13
|
+
allowed-tools: Bash, Read, Write, Edit
|
|
14
|
+
compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires the GitHub CLI (`gh`) authenticated and a daily note vault.
|
|
15
|
+
metadata:
|
|
16
|
+
author: Oleg Koval
|
|
17
|
+
tags:
|
|
18
|
+
- github
|
|
19
|
+
- obsidian
|
|
20
|
+
- daily-note
|
|
21
|
+
- pull-requests
|
|
22
|
+
- productivity
|
|
23
|
+
- morning-routine
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# Obsidian PR Sync
|
|
27
|
+
|
|
28
|
+
Fetch all open PRs where the user is assigned or requested as reviewer, filter out
|
|
29
|
+
noise (bots, drafts, self-authored), and write a clean grouped section into today's
|
|
30
|
+
daily note.
|
|
31
|
+
|
|
32
|
+
## Configuration
|
|
33
|
+
|
|
34
|
+
Before running, confirm:
|
|
35
|
+
- `VAULT_DAILY` — absolute path to the daily notes folder (e.g. `/Users/you/obsidian/vault/Lead/Daily`)
|
|
36
|
+
- `GH_USERNAME` — GitHub login to exclude self-authored PRs (e.g. `oleg-koval`)
|
|
37
|
+
- `ORG_PREFIX` — org name to group as "Work" (e.g. `Teifi-Digital`); everything else goes to "Personal"
|
|
38
|
+
|
|
39
|
+
If not specified by the user, infer from context (git config, existing vault files).
|
|
40
|
+
|
|
41
|
+
## Step 1 — Fetch PRs
|
|
42
|
+
|
|
43
|
+
Run two `gh` queries and merge results, deduplicating by URL:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Review-requested
|
|
47
|
+
gh search prs --review-requested=@me --state=open \
|
|
48
|
+
--json title,url,repository,author,createdAt,isDraft --limit 50
|
|
49
|
+
|
|
50
|
+
# Assigned
|
|
51
|
+
gh search prs --assignee=@me --state=open \
|
|
52
|
+
--json title,url,repository,author,createdAt,isDraft --limit 50
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Merge both lists, deduplicate by `url`. The union is what needs attention.
|
|
56
|
+
|
|
57
|
+
## Step 2 — Filter
|
|
58
|
+
|
|
59
|
+
Discard entries where:
|
|
60
|
+
- `isDraft` is `true`
|
|
61
|
+
- `author.login` matches any bot pattern: `dependabot`, `copilot`, `renovate`, `github-actions`, or `author.is_bot` is `true`
|
|
62
|
+
- `author.login` equals `GH_USERNAME` — self-authored PRs are not reviews; they're your own work
|
|
63
|
+
|
|
64
|
+
## Step 3 — Enrich authors
|
|
65
|
+
|
|
66
|
+
For each unique author login, resolve a display name for the Obsidian wiki-link:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
gh api /users/<login> --jq '.name // .login'
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
If the API returns a name, use it (e.g. `Rutger Klaassen`). If it returns null, fall
|
|
73
|
+
back to the login with first letter uppercased. This gives `[[Rutger Klaassen]]` or
|
|
74
|
+
`[[Merlijnmacgillavry]]`.
|
|
75
|
+
|
|
76
|
+
Batch these lookups — run them in parallel if possible to keep the sync fast.
|
|
77
|
+
|
|
78
|
+
## Step 4 — Calculate age
|
|
79
|
+
|
|
80
|
+
For each PR: `days_old = (today - createdAt).days`. Use today's date in local time.
|
|
81
|
+
|
|
82
|
+
## Step 5 — Build the section
|
|
83
|
+
|
|
84
|
+
Format the section exactly as:
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
## PRs to review
|
|
88
|
+
|
|
89
|
+
### Work (<ORG_PREFIX>)
|
|
90
|
+
- [ ] [TITLE](url) by [[Author Name]] (N days old)
|
|
91
|
+
|
|
92
|
+
### Personal
|
|
93
|
+
- [ ] [TITLE](url) by [[Author Name]] (N days old)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Rules:
|
|
97
|
+
- **Work**: `repository.nameWithOwner` starts with `<ORG_PREFIX>/`
|
|
98
|
+
- **Personal**: everything else
|
|
99
|
+
- Within each group, sort by `createdAt` ascending (oldest first — most overdue at top)
|
|
100
|
+
- If a group has no PRs, omit that subsection entirely (don't render an empty `### Work` header)
|
|
101
|
+
- If there are zero PRs total, write: `## PRs to review\n\n_No open PRs — clear queue! 🎉_`
|
|
102
|
+
- Add `⚠️` after the age if `days_old >= 7`
|
|
103
|
+
|
|
104
|
+
**Example line:**
|
|
105
|
+
```
|
|
106
|
+
- [ ] [RSL-108] Image sync from InRiver by [[Merlijn Mac Gillavry]] (12 days old ⚠️)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Step 6 — Write to today's daily note
|
|
110
|
+
|
|
111
|
+
**Find today's note:**
|
|
112
|
+
```bash
|
|
113
|
+
TODAY=$(date +%Y-%m-%d)
|
|
114
|
+
NOTE="${VAULT_DAILY}/${TODAY}.md"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
If the file doesn't exist, create it with standard daily template frontmatter first,
|
|
118
|
+
then append the section. If the file exists:
|
|
119
|
+
|
|
120
|
+
**Replacement logic (idempotent):**
|
|
121
|
+
- If `## PRs to review` already exists: replace everything from that line up to (but not
|
|
122
|
+
including) the next `## ` heading or end-of-file with the newly built section.
|
|
123
|
+
- If it doesn't exist: append the section at the end of the file (before the nav footer
|
|
124
|
+
line `*← [[...` if present, otherwise at the very end).
|
|
125
|
+
|
|
126
|
+
This ensures re-running the skill produces the same result, not a growing list.
|
|
127
|
+
|
|
128
|
+
## Invocation patterns
|
|
129
|
+
|
|
130
|
+
**Manual (user-triggered):**
|
|
131
|
+
The user says something like "sync my PRs to today's note" or "update obsidian with my reviews".
|
|
132
|
+
Run the full flow and confirm how many PRs were written.
|
|
133
|
+
|
|
134
|
+
**Scheduled morning routine:**
|
|
135
|
+
Same flow. No user prompt needed — just run, update the note, and report a one-line
|
|
136
|
+
summary: `"PR sync: 3 work PRs, 2 personal PRs written to 2026-05-11.md"`.
|
|
137
|
+
|
|
138
|
+
**In a remote CCR agent:**
|
|
139
|
+
Clone the vault repo, run the sync, commit and push. The local Obsidian Git plugin
|
|
140
|
+
pulls the changes automatically.
|
|
141
|
+
|
|
142
|
+
## Output to user
|
|
143
|
+
|
|
144
|
+
After writing the file, show a brief confirmation:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
Synced N PRs to Lead/Daily/YYYY-MM-DD.md
|
|
148
|
+
Work (<ORG_PREFIX>): X PRs
|
|
149
|
+
Personal: Y PRs
|
|
150
|
+
Skipped: Z bots/drafts
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
If any `gh` call fails (e.g. auth expired), surface the error clearly rather than
|
|
154
|
+
writing a partial/corrupt section.
|
package/packages/software-development/obsidian-pr-sync/adapters/kiro/steering/obsidian-pr-sync.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
inclusion: manual
|
|
5
|
+
description: "Fetch open GitHub PRs assigned to you or requesting your review, and write a grouped, age-sorted '## PRs to review' section into today's Obsidian daily note. Idempotent — re-running replaces the section."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# Obsidian PR Sync
|
|
10
|
+
|
|
11
|
+
Fetch all open PRs where the user is assigned or requested as reviewer, filter out
|
|
12
|
+
noise (bots, drafts, self-authored), and write a clean grouped section into today's
|
|
13
|
+
daily note.
|
|
14
|
+
|
|
15
|
+
## Configuration
|
|
16
|
+
|
|
17
|
+
Before running, confirm:
|
|
18
|
+
- `VAULT_DAILY` — absolute path to the daily notes folder (e.g. `/Users/you/obsidian/vault/Lead/Daily`)
|
|
19
|
+
- `GH_USERNAME` — GitHub login to exclude self-authored PRs (e.g. `oleg-koval`)
|
|
20
|
+
- `ORG_PREFIX` — org name to group as "Work" (e.g. `Teifi-Digital`); everything else goes to "Personal"
|
|
21
|
+
|
|
22
|
+
If not specified by the user, infer from context (git config, existing vault files).
|
|
23
|
+
|
|
24
|
+
## Step 1 — Fetch PRs
|
|
25
|
+
|
|
26
|
+
Run two `gh` queries and merge results, deduplicating by URL:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Review-requested
|
|
30
|
+
gh search prs --review-requested=@me --state=open \
|
|
31
|
+
--json title,url,repository,author,createdAt,isDraft --limit 50
|
|
32
|
+
|
|
33
|
+
# Assigned
|
|
34
|
+
gh search prs --assignee=@me --state=open \
|
|
35
|
+
--json title,url,repository,author,createdAt,isDraft --limit 50
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Merge both lists, deduplicate by `url`. The union is what needs attention.
|
|
39
|
+
|
|
40
|
+
## Step 2 — Filter
|
|
41
|
+
|
|
42
|
+
Discard entries where:
|
|
43
|
+
- `isDraft` is `true`
|
|
44
|
+
- `author.login` matches any bot pattern: `dependabot`, `copilot`, `renovate`, `github-actions`, or `author.is_bot` is `true`
|
|
45
|
+
- `author.login` equals `GH_USERNAME` — self-authored PRs are not reviews; they're your own work
|
|
46
|
+
|
|
47
|
+
## Step 3 — Enrich authors
|
|
48
|
+
|
|
49
|
+
For each unique author login, resolve a display name for the Obsidian wiki-link:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
gh api /users/<login> --jq '.name // .login'
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If the API returns a name, use it (e.g. `Rutger Klaassen`). If it returns null, fall
|
|
56
|
+
back to the login with first letter uppercased. This gives `[[Rutger Klaassen]]` or
|
|
57
|
+
`[[Merlijnmacgillavry]]`.
|
|
58
|
+
|
|
59
|
+
Batch these lookups — run them in parallel if possible to keep the sync fast.
|
|
60
|
+
|
|
61
|
+
## Step 4 — Calculate age
|
|
62
|
+
|
|
63
|
+
For each PR: `days_old = (today - createdAt).days`. Use today's date in local time.
|
|
64
|
+
|
|
65
|
+
## Step 5 — Build the section
|
|
66
|
+
|
|
67
|
+
Format the section exactly as:
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
## PRs to review
|
|
71
|
+
|
|
72
|
+
### Work (<ORG_PREFIX>)
|
|
73
|
+
- [ ] [TITLE](url) by [[Author Name]] (N days old)
|
|
74
|
+
|
|
75
|
+
### Personal
|
|
76
|
+
- [ ] [TITLE](url) by [[Author Name]] (N days old)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Rules:
|
|
80
|
+
- **Work**: `repository.nameWithOwner` starts with `<ORG_PREFIX>/`
|
|
81
|
+
- **Personal**: everything else
|
|
82
|
+
- Within each group, sort by `createdAt` ascending (oldest first — most overdue at top)
|
|
83
|
+
- If a group has no PRs, omit that subsection entirely (don't render an empty `### Work` header)
|
|
84
|
+
- If there are zero PRs total, write: `## PRs to review\n\n_No open PRs — clear queue! 🎉_`
|
|
85
|
+
- Add `⚠️` after the age if `days_old >= 7`
|
|
86
|
+
|
|
87
|
+
**Example line:**
|
|
88
|
+
```
|
|
89
|
+
- [ ] [RSL-108] Image sync from InRiver by [[Merlijn Mac Gillavry]] (12 days old ⚠️)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Step 6 — Write to today's daily note
|
|
93
|
+
|
|
94
|
+
**Find today's note:**
|
|
95
|
+
```bash
|
|
96
|
+
TODAY=$(date +%Y-%m-%d)
|
|
97
|
+
NOTE="${VAULT_DAILY}/${TODAY}.md"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
If the file doesn't exist, create it with standard daily template frontmatter first,
|
|
101
|
+
then append the section. If the file exists:
|
|
102
|
+
|
|
103
|
+
**Replacement logic (idempotent):**
|
|
104
|
+
- If `## PRs to review` already exists: replace everything from that line up to (but not
|
|
105
|
+
including) the next `## ` heading or end-of-file with the newly built section.
|
|
106
|
+
- If it doesn't exist: append the section at the end of the file (before the nav footer
|
|
107
|
+
line `*← [[...` if present, otherwise at the very end).
|
|
108
|
+
|
|
109
|
+
This ensures re-running the skill produces the same result, not a growing list.
|
|
110
|
+
|
|
111
|
+
## Invocation patterns
|
|
112
|
+
|
|
113
|
+
**Manual (user-triggered):**
|
|
114
|
+
The user says something like "sync my PRs to today's note" or "update obsidian with my reviews".
|
|
115
|
+
Run the full flow and confirm how many PRs were written.
|
|
116
|
+
|
|
117
|
+
**Scheduled morning routine:**
|
|
118
|
+
Same flow. No user prompt needed — just run, update the note, and report a one-line
|
|
119
|
+
summary: `"PR sync: 3 work PRs, 2 personal PRs written to 2026-05-11.md"`.
|
|
120
|
+
|
|
121
|
+
**In a remote CCR agent:**
|
|
122
|
+
Clone the vault repo, run the sync, commit and push. The local Obsidian Git plugin
|
|
123
|
+
pulls the changes automatically.
|
|
124
|
+
|
|
125
|
+
## Output to user
|
|
126
|
+
|
|
127
|
+
After writing the file, show a brief confirmation:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
Synced N PRs to Lead/Daily/YYYY-MM-DD.md
|
|
131
|
+
Work (<ORG_PREFIX>): X PRs
|
|
132
|
+
Personal: Y PRs
|
|
133
|
+
Skipped: Z bots/drafts
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
If any `gh` call fails (e.g. auth expired), surface the error clearly rather than
|
|
137
|
+
writing a partial/corrupt section.
|