diff --git a/CLAUDE.md b/CLAUDE.md index 64626fc..f8c5964 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -399,16 +399,20 @@ For skills with workflows, add as Step 1.1. For utility skills, add as "Preferen ```markdown **1.1 Load Preferences (EXTEND.md)** -Use Bash to check EXTEND.md existence (priority order): +Check EXTEND.md existence (priority order): \`\`\`bash -# Check project-level first +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills//EXTEND.md && echo "project" - -# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL) test -f "$HOME/.baoyu-skills//EXTEND.md" && echo "user" \`\`\` +\`\`\`powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills//EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills//EXTEND.md") { "user" } +\`\`\` + ┌────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├────────────────────────────────────────────┼───────────────────┤ @@ -450,6 +454,6 @@ Custom configurations via EXTEND.md. See **Preferences** section for paths and s **Notes**: - Replace `` with actual skill name (e.g., `baoyu-cover-image`) -- Use `$HOME` instead of `~` for cross-platform compatibility (macOS/Linux/WSL) -- Use `test -f` Bash command for explicit file existence check +- Use `$HOME` instead of `~` for cross-platform compatibility (macOS/Linux/WSL/PowerShell) +- Use `test -f` (Bash) or `Test-Path` (PowerShell) for explicit file existence check - ASCII tables for clear visual formatting diff --git a/skills/baoyu-article-illustrator/SKILL.md b/skills/baoyu-article-illustrator/SKILL.md index d981326..2101b18 100644 --- a/skills/baoyu-article-illustrator/SKILL.md +++ b/skills/baoyu-article-illustrator/SKILL.md @@ -47,10 +47,17 @@ See [references/styles.md](references/styles.md) for Core Styles, full gallery, **1.5 Load Preferences (EXTEND.md) ⛔ BLOCKING** ```bash +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-article-illustrator/EXTEND.md && echo "project" test -f "$HOME/.baoyu-skills/baoyu-article-illustrator/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-article-illustrator/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-article-illustrator/EXTEND.md") { "user" } +``` + | Result | Action | |--------|--------| | Found | Read, parse, display summary | diff --git a/skills/baoyu-article-illustrator/references/workflow.md b/skills/baoyu-article-illustrator/references/workflow.md index ae7b1d2..67f43f7 100644 --- a/skills/baoyu-article-illustrator/references/workflow.md +++ b/skills/baoyu-article-illustrator/references/workflow.md @@ -86,10 +86,17 @@ Check preferences and existing state, then ask ALL needed questions in ONE AskUs **CRITICAL**: If EXTEND.md not found, MUST complete first-time setup before ANY other questions or steps. Do NOT proceed to reference images, do NOT ask about content, do NOT ask about type/style — ONLY complete the preferences setup first. ```bash +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-article-illustrator/EXTEND.md && echo "project" test -f "$HOME/.baoyu-skills/baoyu-article-illustrator/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-article-illustrator/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-article-illustrator/EXTEND.md") { "user" } +``` + | Result | Action | |--------|--------| | Found | Read, parse, display summary → Continue | diff --git a/skills/baoyu-comic/references/workflow.md b/skills/baoyu-comic/references/workflow.md index 40889fc..b25714e 100644 --- a/skills/baoyu-comic/references/workflow.md +++ b/skills/baoyu-comic/references/workflow.md @@ -34,16 +34,20 @@ Input → Preferences → Analyze → [Check Existing?] → [Confirm 1: Style + ### 1.1 Load Preferences (EXTEND.md) -Use Bash to check EXTEND.md existence (priority order): +Check EXTEND.md existence (priority order): ```bash -# Check project-level first +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-comic/EXTEND.md && echo "project" - -# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL) test -f "$HOME/.baoyu-skills/baoyu-comic/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-comic/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-comic/EXTEND.md") { "user" } +``` + | Path | Location | |------|----------| | `.baoyu-skills/baoyu-comic/EXTEND.md` | Project directory | diff --git a/skills/baoyu-compress-image/SKILL.md b/skills/baoyu-compress-image/SKILL.md index 37234de..bdd664c 100644 --- a/skills/baoyu-compress-image/SKILL.md +++ b/skills/baoyu-compress-image/SKILL.md @@ -17,16 +17,20 @@ Scripts in `scripts/` subdirectory. `${SKILL_DIR}` = this SKILL.md's directory p ## Preferences (EXTEND.md) -Use Bash to check EXTEND.md existence (priority order): +Check EXTEND.md existence (priority order): ```bash -# Check project-level first +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-compress-image/EXTEND.md && echo "project" - -# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL) test -f "$HOME/.baoyu-skills/baoyu-compress-image/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-compress-image/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-compress-image/EXTEND.md") { "user" } +``` + ┌────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├────────────────────────────────────────────────────────┼───────────────────┤ diff --git a/skills/baoyu-cover-image/SKILL.md b/skills/baoyu-cover-image/SKILL.md index 0239d78..db2a42a 100644 --- a/skills/baoyu-cover-image/SKILL.md +++ b/skills/baoyu-cover-image/SKILL.md @@ -128,10 +128,17 @@ Analyze + Save Refs → [Output Dir] → [Confirm: 6 Dimensions] → Prompt → Check EXTEND.md existence (priority: project → user): ```bash +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-cover-image/EXTEND.md && echo "project" test -f "$HOME/.baoyu-skills/baoyu-cover-image/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-cover-image/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-cover-image/EXTEND.md") { "user" } +``` + | Result | Action | |--------|--------| | Found | Load, display summary → Continue | diff --git a/skills/baoyu-danger-gemini-web/SKILL.md b/skills/baoyu-danger-gemini-web/SKILL.md index d3106fc..2ac7bd6 100644 --- a/skills/baoyu-danger-gemini-web/SKILL.md +++ b/skills/baoyu-danger-gemini-web/SKILL.md @@ -44,16 +44,20 @@ Before first use, verify user consent for reverse-engineered API usage. ## Preferences (EXTEND.md) -Use Bash to check EXTEND.md existence (priority order): +Check EXTEND.md existence (priority order): ```bash -# Check project-level first +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-danger-gemini-web/EXTEND.md && echo "project" - -# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL) test -f "$HOME/.baoyu-skills/baoyu-danger-gemini-web/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-danger-gemini-web/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-danger-gemini-web/EXTEND.md") { "user" } +``` + ┌──────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├──────────────────────────────────────────────────────────┼───────────────────┤ diff --git a/skills/baoyu-danger-x-to-markdown/SKILL.md b/skills/baoyu-danger-x-to-markdown/SKILL.md index 06b1e04..d8c60eb 100644 --- a/skills/baoyu-danger-x-to-markdown/SKILL.md +++ b/skills/baoyu-danger-x-to-markdown/SKILL.md @@ -70,16 +70,20 @@ Use `AskUserQuestion` with options: "Yes, I accept" | "No, I decline" ## Preferences (EXTEND.md) -Use Bash to check EXTEND.md existence (priority order): +Check EXTEND.md existence (priority order): ```bash -# Check project-level first +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md && echo "project" - -# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL) test -f "$HOME/.baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md") { "user" } +``` + ┌────────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├────────────────────────────────────────────────────────────┼───────────────────┤ diff --git a/skills/baoyu-format-markdown/SKILL.md b/skills/baoyu-format-markdown/SKILL.md index f7dd61d..9d8f7db 100644 --- a/skills/baoyu-format-markdown/SKILL.md +++ b/skills/baoyu-format-markdown/SKILL.md @@ -19,16 +19,20 @@ Scripts in `scripts/` subdirectory. `${SKILL_DIR}` = this SKILL.md's directory p ## Preferences (EXTEND.md) -Use Bash to check EXTEND.md existence (priority order): +Check EXTEND.md existence (priority order): ```bash -# Check project-level first +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-format-markdown/EXTEND.md && echo "project" - -# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL) test -f "$HOME/.baoyu-skills/baoyu-format-markdown/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-format-markdown/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-format-markdown/EXTEND.md") { "user" } +``` + ┌──────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├──────────────────────────────────────────────────────────┼───────────────────┤ diff --git a/skills/baoyu-image-gen/SKILL.md b/skills/baoyu-image-gen/SKILL.md index 2c9ee6e..9e79bc8 100644 --- a/skills/baoyu-image-gen/SKILL.md +++ b/skills/baoyu-image-gen/SKILL.md @@ -21,10 +21,17 @@ Official API-based image generation. Supports OpenAI, Google, DashScope (阿里 Check EXTEND.md existence (priority: project → user): ```bash +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-image-gen/EXTEND.md && echo "project" test -f "$HOME/.baoyu-skills/baoyu-image-gen/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-image-gen/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-image-gen/EXTEND.md") { "user" } +``` + | Result | Action | |--------|--------| | Found | Load, parse, apply settings. If `default_model.[provider]` is null → ask model only (Flow 2) | diff --git a/skills/baoyu-infographic/SKILL.md b/skills/baoyu-infographic/SKILL.md index cc92359..2ba8d75 100644 --- a/skills/baoyu-infographic/SKILL.md +++ b/skills/baoyu-infographic/SKILL.md @@ -138,16 +138,20 @@ Slug: 2-4 words kebab-case from topic. Conflict: append `-YYYYMMDD-HHMMSS`. **1.1 Load Preferences (EXTEND.md)** -Use Bash to check EXTEND.md existence (priority order): +Check EXTEND.md existence (priority order): ```bash -# Check project-level first +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-infographic/EXTEND.md && echo "project" - -# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL) test -f "$HOME/.baoyu-skills/baoyu-infographic/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-infographic/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-infographic/EXTEND.md") { "user" } +``` + ┌────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├────────────────────────────────────────────────────┼───────────────────┤ diff --git a/skills/baoyu-markdown-to-html/SKILL.md b/skills/baoyu-markdown-to-html/SKILL.md index 954973d..df88495 100644 --- a/skills/baoyu-markdown-to-html/SKILL.md +++ b/skills/baoyu-markdown-to-html/SKILL.md @@ -17,16 +17,20 @@ Converts Markdown files to beautifully styled HTML with inline CSS, optimized fo ## Preferences (EXTEND.md) -Use Bash to check EXTEND.md existence (priority order): +Check EXTEND.md existence (priority order): ```bash -# Check project-level first +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-markdown-to-html/EXTEND.md && echo "project" - -# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL) test -f "$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-markdown-to-html/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md") { "user" } +``` + ┌──────────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├──────────────────────────────────────────────────────────────┼───────────────────┤ @@ -83,6 +87,11 @@ Use `AskUserQuestion` to ask whether to format first. Formatting can fix: test -f "$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md" && grep -o 'default_theme:.*' "$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md" ``` +```powershell +# PowerShell (Windows) +if (Test-Path "$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md") { Select-String -Pattern 'default_theme:.*' -Path "$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md" | ForEach-Object { $_.Matches.Value } } +``` + **If theme is resolved from EXTEND.md**: Use it directly, do NOT ask the user. **If no default found**: Use AskUserQuestion to confirm: diff --git a/skills/baoyu-post-to-wechat/SKILL.md b/skills/baoyu-post-to-wechat/SKILL.md index 791ac6a..8003add 100644 --- a/skills/baoyu-post-to-wechat/SKILL.md +++ b/skills/baoyu-post-to-wechat/SKILL.md @@ -23,16 +23,20 @@ description: Posts content to WeChat Official Account (微信公众号) via API ## Preferences (EXTEND.md) -Use Bash to check EXTEND.md existence (priority order): +Check EXTEND.md existence (priority order): ```bash -# Check project-level first +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-post-to-wechat/EXTEND.md && echo "project" - -# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL) test -f "$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-post-to-wechat/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md") { "user" } +``` + ┌────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├────────────────────────────────────────────────────────┼───────────────────┤ @@ -180,13 +184,17 @@ mkdir -p "$(pwd)/post-to-wechat/$(date +%Y-%m-%d)" **If API Selected - Check Credentials**: ```bash -# Check project-level +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/.env && grep -q "WECHAT_APP_ID" .baoyu-skills/.env && echo "project" - -# Check user-level test -f "$HOME/.baoyu-skills/.env" && grep -q "WECHAT_APP_ID" "$HOME/.baoyu-skills/.env" && echo "user" ``` +```powershell +# PowerShell (Windows) +if ((Test-Path .baoyu-skills/.env) -and (Select-String -Quiet -Pattern "WECHAT_APP_ID" .baoyu-skills/.env)) { "project" } +if ((Test-Path "$HOME/.baoyu-skills/.env") -and (Select-String -Quiet -Pattern "WECHAT_APP_ID" "$HOME/.baoyu-skills/.env")) { "user" } +``` + **If Credentials Missing - Guide Setup**: ``` diff --git a/skills/baoyu-post-to-x/SKILL.md b/skills/baoyu-post-to-x/SKILL.md index f4abf1f..46b7da3 100644 --- a/skills/baoyu-post-to-x/SKILL.md +++ b/skills/baoyu-post-to-x/SKILL.md @@ -31,16 +31,20 @@ Posts text, images, videos, and long-form articles to X via real Chrome browser ## Preferences (EXTEND.md) -Use Bash to check EXTEND.md existence (priority order): +Check EXTEND.md existence (priority order): ```bash -# Check project-level first +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-post-to-x/EXTEND.md && echo "project" - -# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL) test -f "$HOME/.baoyu-skills/baoyu-post-to-x/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-post-to-x/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-post-to-x/EXTEND.md") { "user" } +``` + ┌──────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├──────────────────────────────────────────────────┼───────────────────┤ diff --git a/skills/baoyu-slide-deck/SKILL.md b/skills/baoyu-slide-deck/SKILL.md index b58efa7..fc1f623 100644 --- a/skills/baoyu-slide-deck/SKILL.md +++ b/skills/baoyu-slide-deck/SKILL.md @@ -190,16 +190,20 @@ Input → Preferences → Analyze → [Check Existing?] → Confirm (1-2 rounds) **1.1 Load Preferences (EXTEND.md)** -Use Bash to check EXTEND.md existence (priority order): +Check EXTEND.md existence (priority order): ```bash -# Check project-level first +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-slide-deck/EXTEND.md && echo "project" - -# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL) test -f "$HOME/.baoyu-skills/baoyu-slide-deck/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-slide-deck/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-slide-deck/EXTEND.md") { "user" } +``` + ┌──────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├──────────────────────────────────────────────────┼───────────────────┤ diff --git a/skills/baoyu-url-to-markdown/SKILL.md b/skills/baoyu-url-to-markdown/SKILL.md index c8c929d..2f5bf05 100644 --- a/skills/baoyu-url-to-markdown/SKILL.md +++ b/skills/baoyu-url-to-markdown/SKILL.md @@ -24,16 +24,20 @@ Fetches any URL via Chrome CDP and converts HTML to clean markdown. ## Preferences (EXTEND.md) -Use Bash to check EXTEND.md existence (priority order): +Check EXTEND.md existence (priority order): ```bash -# Check project-level first +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-url-to-markdown/EXTEND.md && echo "project" - -# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL) test -f "$HOME/.baoyu-skills/baoyu-url-to-markdown/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-url-to-markdown/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-url-to-markdown/EXTEND.md") { "user" } +``` + ┌────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├────────────────────────────────────────────────────────┼───────────────────┤ diff --git a/skills/baoyu-xhs-images/SKILL.md b/skills/baoyu-xhs-images/SKILL.md index c0094af..24cb65d 100644 --- a/skills/baoyu-xhs-images/SKILL.md +++ b/skills/baoyu-xhs-images/SKILL.md @@ -199,16 +199,20 @@ Analyze → [Confirm 1] → 3 Outlines → [Confirm 2: Outline + Style + Element **CRITICAL**: If EXTEND.md not found, MUST complete first-time setup before ANY other questions or steps. Do NOT proceed to content analysis, do NOT ask about style, do NOT ask about layout — ONLY complete the preferences setup first. -Use Bash to check EXTEND.md existence (priority order): +Check EXTEND.md existence (priority order): ```bash -# Check project-level first +# macOS, Linux, WSL, Git Bash test -f .baoyu-skills/baoyu-xhs-images/EXTEND.md && echo "project" - -# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL) test -f "$HOME/.baoyu-skills/baoyu-xhs-images/EXTEND.md" && echo "user" ``` +```powershell +# PowerShell (Windows) +if (Test-Path .baoyu-skills/baoyu-xhs-images/EXTEND.md) { "project" } +if (Test-Path "$HOME/.baoyu-skills/baoyu-xhs-images/EXTEND.md") { "user" } +``` + ┌────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├────────────────────────────────────────────────────┼───────────────────┤