Skip to content

docs: surface macOS Obsidian CLI flicker caveat; refresh defuddle skill#93

Merged
breferrari merged 1 commit into
mainfrom
fix/macos-flicker-slash-commands-89
May 18, 2026
Merged

docs: surface macOS Obsidian CLI flicker caveat; refresh defuddle skill#93
breferrari merged 1 commit into
mainfrom
fix/macos-flicker-slash-commands-89

Conversation

@breferrari

Copy link
Copy Markdown
Owner

Summary

  • Closes Slash commands /om-standup and /om-prep-1on1 still invoke obsidian CLI (macOS flicker on user-triggered runs) #89. PR fix: stop SessionStart from flashing Obsidian app on macOS, close ExperimentalWarning stderr leak (#83) #87 removed the macOS Electron-app flicker from the automatic SessionStart hook path, but user-triggered slash commands and the vault-librarian subagent still invoke the obsidian CLI. The original plan was to rewrite each invocation site to filesystem-first, but a key clarification from the original session-start hook launches Obsidian app twice, causing window flicker #83 fix changes the calculus: on macOS the obsidian command launches the app only on the first call when no instance is running — subsequent calls forward args silently to the running instance. So "open Obsidian once at session start" eliminates the flicker entirely while preserving the CLI's quality advantages (graph queries via obsidian orphans / obsidian backlinks, plugin-managed task aggregation, user-configured daily-notes layout, vault-aware search).
  • The doc-only approach: SKILL.md gets an [!IMPORTANT] callout explaining the open-once workflow; CLAUDE.md's two CLI-guidance lines carry the same caveat so the agent sees it during normal session context-loading.
  • Bonus: refresh the defuddle skill from upstream kepano/obsidian-skills. Two real changes: the description now excludes .md URLs (already markdown — agent should use WebFetch instead), and the install command moves from defuddle-cli (npm v0.7.0) to defuddle (npm v0.18.1, same binary). The other four Obsidian skills (obsidian-cli, obsidian-markdown, obsidian-bases, json-canvas) had no upstream changes since the initial scaffold and remain current.

Why doc-only instead of rewriting slash commands

Considered rewriting /om-standup, /om-prep-1on1, /om-weekly, vault-librarian, review-prep, om-dump, and om-vault-audit to use filesystem reads first. Rejected because:

  • The CLI provides graph-aware queries (orphans, backlinks, unresolved) that filesystem grep can only approximate.
  • Daily-notes path is user-configurable in Obsidian (could be daily/, journals/2026-W20/, custom date formats). Hardcoded filesystem paths get this wrong.
  • Tasks plugin scope and DataView queries respect plugin-managed state that filesystem reads can't see.
  • The flicker is a one-time event when Obsidian isn't running; the workaround (open it) is friction-free for users on macOS.

Files changed

File Change
.claude/skills/obsidian-cli/SKILL.md New [!IMPORTANT] callout after the intro explaining macOS launch + open-once + silent-forwarding.
CLAUDE.md Two guidance lines (section 77, rule 352) carry the macOS caveat.
.claude/skills/defuddle/SKILL.md Upstream sync: description excludes .md URLs; install command is defuddle not defuddle-cli.

Audit-incomplete findings (deferred deliberately)

The audit also found om-weekly.md:22, vault-librarian.md:17, 19, om-dump.md:8, om-vault-audit.md:96, review-prep.md:22 mention the CLI. They're intentionally not edited:

  • The user-workflow established by these docs is "open Obsidian once at session start." Once the user does that, every CLI invocation across all slash commands and subagents works flicker-free.
  • Subagent edge case: vault-librarian runs in an isolated context without CLAUDE.md auto-loaded, so a user who invokes /om-vault-audit before opening Obsidian would still hit the flicker. Acceptable: the user-facing docs (CLAUDE.md + SKILL.md) cover the workflow.

Test plan

  • npm test in .claude/scripts/: no change expected (markdown-only).
  • CI passes on ubuntu / macos / windows × Node 22 / 24.
  • Reviewer manual check on macOS: open Obsidian, run /om-standup, confirm no second flicker on the CLI calls within that session.
  • Reviewer reads the [!IMPORTANT] callout in obsidian-cli/SKILL.md and confirms the open-once workflow is unambiguous.

🤖 Generated with Claude Code

The macOS Electron-app flicker reported in #83 has a known mitigation:
once Obsidian is open, the `obsidian` command forwards args to the
running instance silently — subsequent calls don't flicker. Only the
first call launches the app when no instance is running. PR #87
removed this from the SessionStart hook path entirely, but
user-triggered slash commands (#89) still invoke the CLI.

Investigation pivoted from "rewrite every slash command to filesystem-
first" (which would have degraded CLI quality on the common
Obsidian-open path — losing graph queries, plugin-managed state, and
user-configured daily-notes layout) to a doc-only approach: explain
the open-once behaviour where it matters and trust the agent + user
to apply the context.

Changes:
- `.claude/skills/obsidian-cli/SKILL.md` — new `[!IMPORTANT]` callout
  explaining macOS flicker + "open Obsidian once" workflow and the
  silent-forwarding behaviour of subsequent calls.
- `CLAUDE.md` — the two CLI-guidance lines (the "## Obsidian CLI"
  section heading and the rules bullet at the bottom) carry the same
  caveat so the agent sees it during normal session context-loading.
- `.claude/skills/defuddle/SKILL.md` — refresh from upstream
  kepano/obsidian-skills (description now excludes `.md` URLs; install
  command changed from `defuddle-cli` to `defuddle` since the binary
  ships in the newer parent package).

Audit found wider potential surface (slash command files,
vault-librarian subagent) but those are intentionally not edited:
the user-workflow is "open Obsidian first" and the docs now make
that explicit at the call sites readers actually consult.

Closes #89

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates repository guidance to clarify a macOS-specific Obsidian CLI behavior (first invocation can launch/flicker the Electron app when no instance is running) and aligns the defuddle skill documentation with upstream changes.

Changes:

  • Document “open Obsidian once” workflow on macOS for obsidian CLI usage (in both global guidance and the Obsidian CLI skill).
  • Sync defuddle skill guidance: avoid using it for .md URLs and update the global install command to defuddle.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
CLAUDE.md Adds macOS caveat + “open once” workflow guidance for Obsidian CLI usage in both the Obsidian CLI section and rules.
.claude/skills/obsidian-cli/SKILL.md Adds an [!IMPORTANT] callout describing the macOS first-launch flicker and recommended workflow/fallbacks.
.claude/skills/defuddle/SKILL.md Updates description to exclude .md URLs and changes install command from defuddle-cli to defuddle.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@breferrari breferrari merged commit 2a1936f into main May 18, 2026
6 checks passed
@breferrari breferrari deleted the fix/macos-flicker-slash-commands-89 branch May 18, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slash commands /om-standup and /om-prep-1on1 still invoke obsidian CLI (macOS flicker on user-triggered runs)

2 participants