---
name: morning-routine
description: >
  Run 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.
license: MIT
allowed-tools: Bash, Read, Write, Edit
compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires git and gh (GitHub CLI) authenticated, plus a daily-note vault path configured.
metadata:
  targets: [_source-only]
  author: Oleg Koval
  tags:
    - morning
    - obsidian
    - daily-note
    - github
    - dependabot
    - productivity
    - routine
    - automation
source: weekly-pattern-learner
source_reason: "obsidian-task-rollover, obsidian-pr-sync, and dependabot-triage all describe themselves as morning-routine steps but no meta-skill chains them into a single first-thing-of-day pass"
source_date: "2026-08-10"
---

> 🤖 *Auto-generated by **weekly-pattern-learner** · obsidian-task-rollover, obsidian-pr-sync, and dependabot-triage all describe themselves as morning-routine steps but no meta-skill chains them into a single first-thing-of-day pass*

# Morning Routine

Run the three start-of-day workflows in sequence, then summarize what needs your
attention today. Each phase is idempotent: re-running is safe.

## Inputs

- **VAULT_DAILY** (required): absolute path to the Obsidian daily notes folder
- **GH_USERNAME** (required): GitHub login for PR filtering
- **ORG_PREFIX** (optional): org name to group as "Work" in the PR section
- **--skip-rollover** (optional): skip task rollover (e.g. Monday after a break)
- **--skip-pr-sync** (optional): skip GitHub PR sync
- **--skip-dependabot** (optional): skip Dependabot triage

If any required config is missing, ask once before starting. Don't abort midway.

## Phase 1: Task rollover

Initialize the daily note path once, before any optional phase:

```bash
NOTE="${VAULT_DAILY}/$(date +%Y-%m-%d).md"
```

Run `olko:obsidian-task-rollover` on the **previous workday's** note.

`obsidian-task-rollover` is an end-of-day migration skill: it copies unchecked tasks
from a given day's note into the next workday's note with a `[>]` marker. When invoked
here in the morning, it should operate on **yesterday's** (or the last workday's) note
so those unchecked tasks are pulled forward into today's note. If yesterday's note does
not exist, skip this step and note it in the report.

**Skip if** `--skip-rollover` is set, or if it's Monday and the user has explicitly
said they clear the board on Fridays.

After this phase, confirm:
```bash
grep -c "^\- \[ \]" "$NOTE" 2>/dev/null || echo "0"  # open tasks today
grep -c "^\- \[>\]" "$NOTE" 2>/dev/null || echo "0"  # migrated tasks
```

Record counts for the final report.

## Phase 2: PR sync

Run `olko:obsidian-pr-sync`.

This fetches all open GitHub PRs where the user is assignee or review-requested,
filters out bots and drafts, and writes or replaces the `## PRs to review` section
in today's daily note. PRs are grouped into Work (ORG_PREFIX org) and Personal.

**Skip if** `--skip-pr-sync` is set.

After this phase, count PRs written:
```bash
grep -c "^\- \[ \] \[" "$NOTE" 2>/dev/null || echo "0"
```

## Phase 3: Dependabot triage (quick sweep)

Run `olko:dependabot-triage` with `patch-only` auto-merge policy.

This auto-approves and merges safe patch bumps whose CI is green, flags major
upgrades for human review, and posts a digest. The `patch-only` policy means no
minor or major bumps are merged automatically, just the safest dependency noise.

**Skip if** `--skip-dependabot` is set, or if there are no open dependency PRs:

```bash
gh pr list --state open \
  --json author --jq '
    [.[] | select(.author.login | test("dependabot|renovate"; "i"))]
    | length
  ' 2>/dev/null
```

If the count is 0, skip phase 3 and note it in the report.

## Final report

Print a compact brief suitable for the start of the day:

```
Morning routine complete: YYYY-MM-DD

  Tasks:        N open today (M carried over from yesterday)
  PRs:          X work PRs, Y personal PRs → see ## PRs to review in today's note
  Dependabot:   Z merged (patch, CI green), W flagged for review

  Today's top 3:
    [read from ## Top 3 for today section if populated, else print "(not filled in yet)"]

  Flagged for you:
    - [PRs older than 7 days ⚠️ from the PR sync, if any]
    - [Major Dependabot bumps flagged for human decision, if any]
```

If a phase failed (auth expired, vault not found, network error), surface the error
clearly rather than silently skipping that phase.

## Invocation patterns

**Manual (user-triggered):**
User says "start my day", "run morning routine", or "set up today's note".
Run the full flow and show the final report.

**Scheduled (cron / CCR):**
No user prompt needed. Run all three phases silently and emit the report as the
run's output. Useful as a pre-meeting brief or as a first message in a new session.

**Partial run:**
If the user wants to re-sync only PRs mid-day: `--skip-rollover --skip-dependabot`.

## Chaining

| Before this skill | After this skill |
|---|---|
| (none, start of session) | Work the PR queue (`olko:pr-to-green` on flagged items) |
| (none) | `olko:dependabot-triage` with `patch-and-minor` if the quick sweep flagged many |
| `olko:obsidian-task-rollover` alone | nothing: this skill already calls it |
