obsidian-prompt-batch-optimizer

Batch-optimizes Obsidian vault prompt files via DeepSeek API while preserving YAML frontmatter.

Updated Jul 6, 2026
One-click install
npx skills add https://github.com/Lucien-1127/strata-skill --skill obsidian-prompt-batch-optimizer-lucien-1127
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: obsidian-prompt-batch-optimizer
Source: https://github.com/Lucien-1127/strata-skill/tree/main/obsidian-prompt-batch-optimizer
Command: npx skills add https://github.com/Lucien-1127/strata-skill --skill obsidian-prompt-batch-optimizer-lucien-1127

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openai, pyyaml.

What problem does it solve? Manually rewriting dozens of prompt files scattered across an Obsidian vault is slow and inconsistent. This Skill automates batch optimization of every prompt file using the DeepSeek API, keeping YAML frontmatter intact and backing up originals before overwriting. ## Core Features & Use Cases - Batch Prompt Optimization: Scans Copilot system prompts, custom slash commands, templates, and curated prompt libraries, then rewrites each with DeepSeek for stronger structure and constraints. - Frontmatter Preservation & Backup: Leaves YAML frontmatter untouched and stores original files plus an optimization report in _optimized_backup/ for easy rollback. - Use Case: You maintain 50+ prompts across Obsidian Copilot folders. Run the script once to upgrade all of them to a structured format (role, goal, constraints, output format) in Traditional Chinese, then restore any file from the .bak backups if needed. ## Quick Start Run the batch prompt optimizer script in my Obsidian vault to optimize all Copilot prompts with DeepSeek and back up the originals.

Frequently Asked Questions about obsidian-prompt-batch-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I batch optimize prompts in an Obsidian vault?▼

Run the batch_prompt_optimizer.py script from your vault root after installing openai and pyyaml. It collects Markdown and text files from Copilot prompt directories, rewrites each via the DeepSeek API, and saves results back in place.

Does batch prompt rewriting preserve YAML frontmatter?▼

Yes, the optimizer parses each file and leaves the YAML frontmatter block completely unmodified. Only the prompt body is rewritten with improved structure, constraints, and output formatting.

What API and model does the prompt optimizer use?▼

It uses the DeepSeek provider configured in the Hermes config file at ~/.hermes/config.yaml, calling the deepseek-v4-flash model with temperature 0.3 and a maximum of 8000 tokens per optimization.

Can I restore original prompts after batch optimization?▼

Yes, every original file is backed up as a .bak file in the _optimized_backup directory before overwriting. Copy the .bak files back to their original paths to fully restore the previous versions.

Which Obsidian folders are processed by the optimizer?▼

It processes copilot/system-prompts, copilot/copilot-custom-prompts, copilot/copilot-模板, and the curated prompt library under 知識庫/🔧提示詞庫, skipping pure knowledge documents that are not runnable prompts.