obsidian-cli-uri-fallback

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

obsidian-cli-uri-fallback

obsidian-cli-uri-fallback

Use this skill when Obsidian CLI calls are part of unattended runs and you need reliable note persistence even if URI execution fails silently.
当Obsidian CLI调用属于无人值守运行场景,且您需要在URI执行静默失败时仍能可靠保存笔记时,可使用本技能。

When to use this skill

适用场景

  • Cron jobs or CI-like runs that attempt
    obsidian-cli create/open/...
    .
  • Desktop app availability is uncertain (headless, remote, or locked session).
  • CLI output includes explicit failure signatures while exit code is still zero.
  • You need a deterministic fallback path to preserve audit notes.
  • 尝试执行
    obsidian-cli create/open/...
    的Cron任务或类CI运行环境。
  • 桌面应用可用性不确定(无头、远程或会话锁定状态)。
  • CLI输出包含明确的失败特征,但退出码仍为0。
  • 您需要确定性的回退路径来保留审计笔记。

Instructions

操作步骤

  1. Run the intended
    obsidian-cli
    command first.
  2. Treat either non-zero exit or known failure-signature text as failure.
    • Minimum signature list:
      • Failed to execute Obsidian URI
      • Cannot find note in vault
  3. On failure, write the note directly to markdown path (
    <vault>/.../*.md
    ) using deterministic naming.
  4. Record fallback status in run artifacts:
    • attempted command
    • observed signature
    • fallback file path
  5. Continue the workflow without retry loops unless user explicitly requested retries.
  1. 先运行目标
    obsidian-cli
    命令。
  2. 非零退出码已知失败特征文本任一情况判定为失败。
    • 最低特征列表:
      • Failed to execute Obsidian URI
      • Cannot find note in vault
  3. 失败时,使用确定性命名直接将笔记写入Markdown路径(
    <vault>/.../*.md
    )。
  4. 在运行产物中记录回退状态:
    • 尝试执行的命令
    • 检测到的特征
    • 回退文件路径
  5. 除非用户明确要求重试,否则无需重试循环,直接继续工作流。

Examples

示例

  • obsidian-cli create "queries/hourly-2026-04-27.md" -c "..."
    prints
    Failed to execute Obsidian URI
    with exit code 0.
    • classify as failure
    • fallback: write
      queries/hourly-2026-04-27.md
      directly
    • record fallback path in survey/PR artifacts
  • obsidian-cli create "queries/hourly-2026-04-27.md" -c "..."
    输出
    Failed to execute Obsidian URI
    但退出码为0。
    • 判定为失败
    • 回退操作:直接写入
      queries/hourly-2026-04-27.md
    • 在调研/PR产物中记录回退路径

Best practices

最佳实践

  1. Prefer ASCII-only automation payloads in unattended shells.
  2. Keep fallback filenames stable and timestamped.
  3. Never claim Obsidian CLI success when failure-signature text is present.
  4. Keep fallback evidence alongside run artifacts for reviewer traceability.
  1. 在无人值守Shell中优先使用仅ASCII字符的自动化负载。
  2. 保持回退文件名稳定并带有时间戳。
  3. 当存在失败特征文本时,绝不能声称Obsidian CLI执行成功。
  4. 将回退证据与运行产物放在一起,便于审核者追溯。

References

参考资料

  • .agent-skills/obsidian-cli/SKILL.md
  • .agent-skills/survey/references/keyword-sweep-and-relevance-rescue.md
  • .agent-skills/obsidian-cli/SKILL.md
  • .agent-skills/survey/references/keyword-sweep-and-relevance-rescue.md