mirror of
https://github.com/JimLiu/baoyu-skills.git
synced 2026-07-27 12:19:47 +08:00
feat(skills): add cross-platform PowerShell support for EXTEND.md checks
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -399,16 +399,20 @@ For skills with workflows, add as Step 1.1. For utility skills, add as "Preferen
|
|||||||
```markdown
|
```markdown
|
||||||
**1.1 Load Preferences (EXTEND.md)**
|
**1.1 Load Preferences (EXTEND.md)**
|
||||||
|
|
||||||
Use Bash to check EXTEND.md existence (priority order):
|
Check EXTEND.md existence (priority order):
|
||||||
|
|
||||||
\`\`\`bash
|
\`\`\`bash
|
||||||
# Check project-level first
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/<skill-name>/EXTEND.md && echo "project"
|
test -f .baoyu-skills/<skill-name>/EXTEND.md && echo "project"
|
||||||
|
|
||||||
# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
|
|
||||||
test -f "$HOME/.baoyu-skills/<skill-name>/EXTEND.md" && echo "user"
|
test -f "$HOME/.baoyu-skills/<skill-name>/EXTEND.md" && echo "user"
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
||||||
|
\`\`\`powershell
|
||||||
|
# PowerShell (Windows)
|
||||||
|
if (Test-Path .baoyu-skills/<skill-name>/EXTEND.md) { "project" }
|
||||||
|
if (Test-Path "$HOME/.baoyu-skills/<skill-name>/EXTEND.md") { "user" }
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
┌────────────────────────────────────────────┬───────────────────┐
|
┌────────────────────────────────────────────┬───────────────────┐
|
||||||
│ Path │ Location │
|
│ Path │ Location │
|
||||||
├────────────────────────────────────────────┼───────────────────┤
|
├────────────────────────────────────────────┼───────────────────┤
|
||||||
@@ -450,6 +454,6 @@ Custom configurations via EXTEND.md. See **Preferences** section for paths and s
|
|||||||
|
|
||||||
**Notes**:
|
**Notes**:
|
||||||
- Replace `<skill-name>` with actual skill name (e.g., `baoyu-cover-image`)
|
- Replace `<skill-name>` with actual skill name (e.g., `baoyu-cover-image`)
|
||||||
- Use `$HOME` instead of `~` for cross-platform compatibility (macOS/Linux/WSL)
|
- Use `$HOME` instead of `~` for cross-platform compatibility (macOS/Linux/WSL/PowerShell)
|
||||||
- Use `test -f` Bash command for explicit file existence check
|
- Use `test -f` (Bash) or `Test-Path` (PowerShell) for explicit file existence check
|
||||||
- ASCII tables for clear visual formatting
|
- ASCII tables for clear visual formatting
|
||||||
|
|||||||
@@ -47,10 +47,17 @@ See [references/styles.md](references/styles.md) for Core Styles, full gallery,
|
|||||||
**1.5 Load Preferences (EXTEND.md) ⛔ BLOCKING**
|
**1.5 Load Preferences (EXTEND.md) ⛔ BLOCKING**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-article-illustrator/EXTEND.md && echo "project"
|
test -f .baoyu-skills/baoyu-article-illustrator/EXTEND.md && echo "project"
|
||||||
test -f "$HOME/.baoyu-skills/baoyu-article-illustrator/EXTEND.md" && echo "user"
|
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 |
|
| Result | Action |
|
||||||
|--------|--------|
|
|--------|--------|
|
||||||
| Found | Read, parse, display summary |
|
| Found | Read, parse, display summary |
|
||||||
|
|||||||
@@ -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.
|
**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
|
```bash
|
||||||
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-article-illustrator/EXTEND.md && echo "project"
|
test -f .baoyu-skills/baoyu-article-illustrator/EXTEND.md && echo "project"
|
||||||
test -f "$HOME/.baoyu-skills/baoyu-article-illustrator/EXTEND.md" && echo "user"
|
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 |
|
| Result | Action |
|
||||||
|--------|--------|
|
|--------|--------|
|
||||||
| Found | Read, parse, display summary → Continue |
|
| Found | Read, parse, display summary → Continue |
|
||||||
|
|||||||
@@ -34,16 +34,20 @@ Input → Preferences → Analyze → [Check Existing?] → [Confirm 1: Style +
|
|||||||
|
|
||||||
### 1.1 Load Preferences (EXTEND.md)
|
### 1.1 Load Preferences (EXTEND.md)
|
||||||
|
|
||||||
Use Bash to check EXTEND.md existence (priority order):
|
Check EXTEND.md existence (priority order):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check project-level first
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-comic/EXTEND.md && echo "project"
|
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"
|
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 |
|
| Path | Location |
|
||||||
|------|----------|
|
|------|----------|
|
||||||
| `.baoyu-skills/baoyu-comic/EXTEND.md` | Project directory |
|
| `.baoyu-skills/baoyu-comic/EXTEND.md` | Project directory |
|
||||||
|
|||||||
@@ -17,16 +17,20 @@ Scripts in `scripts/` subdirectory. `${SKILL_DIR}` = this SKILL.md's directory p
|
|||||||
|
|
||||||
## Preferences (EXTEND.md)
|
## Preferences (EXTEND.md)
|
||||||
|
|
||||||
Use Bash to check EXTEND.md existence (priority order):
|
Check EXTEND.md existence (priority order):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check project-level first
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-compress-image/EXTEND.md && echo "project"
|
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"
|
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 │
|
│ Path │ Location │
|
||||||
├────────────────────────────────────────────────────────┼───────────────────┤
|
├────────────────────────────────────────────────────────┼───────────────────┤
|
||||||
|
|||||||
@@ -128,10 +128,17 @@ Analyze + Save Refs → [Output Dir] → [Confirm: 6 Dimensions] → Prompt →
|
|||||||
|
|
||||||
Check EXTEND.md existence (priority: project → user):
|
Check EXTEND.md existence (priority: project → user):
|
||||||
```bash
|
```bash
|
||||||
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-cover-image/EXTEND.md && echo "project"
|
test -f .baoyu-skills/baoyu-cover-image/EXTEND.md && echo "project"
|
||||||
test -f "$HOME/.baoyu-skills/baoyu-cover-image/EXTEND.md" && echo "user"
|
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 |
|
| Result | Action |
|
||||||
|--------|--------|
|
|--------|--------|
|
||||||
| Found | Load, display summary → Continue |
|
| Found | Load, display summary → Continue |
|
||||||
|
|||||||
@@ -44,16 +44,20 @@ Before first use, verify user consent for reverse-engineered API usage.
|
|||||||
|
|
||||||
## Preferences (EXTEND.md)
|
## Preferences (EXTEND.md)
|
||||||
|
|
||||||
Use Bash to check EXTEND.md existence (priority order):
|
Check EXTEND.md existence (priority order):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check project-level first
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-danger-gemini-web/EXTEND.md && echo "project"
|
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"
|
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 │
|
│ Path │ Location │
|
||||||
├──────────────────────────────────────────────────────────┼───────────────────┤
|
├──────────────────────────────────────────────────────────┼───────────────────┤
|
||||||
|
|||||||
@@ -70,16 +70,20 @@ Use `AskUserQuestion` with options: "Yes, I accept" | "No, I decline"
|
|||||||
|
|
||||||
## Preferences (EXTEND.md)
|
## Preferences (EXTEND.md)
|
||||||
|
|
||||||
Use Bash to check EXTEND.md existence (priority order):
|
Check EXTEND.md existence (priority order):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check project-level first
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md && echo "project"
|
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"
|
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 │
|
│ Path │ Location │
|
||||||
├────────────────────────────────────────────────────────────┼───────────────────┤
|
├────────────────────────────────────────────────────────────┼───────────────────┤
|
||||||
|
|||||||
@@ -19,16 +19,20 @@ Scripts in `scripts/` subdirectory. `${SKILL_DIR}` = this SKILL.md's directory p
|
|||||||
|
|
||||||
## Preferences (EXTEND.md)
|
## Preferences (EXTEND.md)
|
||||||
|
|
||||||
Use Bash to check EXTEND.md existence (priority order):
|
Check EXTEND.md existence (priority order):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check project-level first
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-format-markdown/EXTEND.md && echo "project"
|
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"
|
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 │
|
│ Path │ Location │
|
||||||
├──────────────────────────────────────────────────────────┼───────────────────┤
|
├──────────────────────────────────────────────────────────┼───────────────────┤
|
||||||
|
|||||||
@@ -21,10 +21,17 @@ Official API-based image generation. Supports OpenAI, Google, DashScope (阿里
|
|||||||
Check EXTEND.md existence (priority: project → user):
|
Check EXTEND.md existence (priority: project → user):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-image-gen/EXTEND.md && echo "project"
|
test -f .baoyu-skills/baoyu-image-gen/EXTEND.md && echo "project"
|
||||||
test -f "$HOME/.baoyu-skills/baoyu-image-gen/EXTEND.md" && echo "user"
|
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 |
|
| Result | Action |
|
||||||
|--------|--------|
|
|--------|--------|
|
||||||
| Found | Load, parse, apply settings. If `default_model.[provider]` is null → ask model only (Flow 2) |
|
| Found | Load, parse, apply settings. If `default_model.[provider]` is null → ask model only (Flow 2) |
|
||||||
|
|||||||
@@ -138,16 +138,20 @@ Slug: 2-4 words kebab-case from topic. Conflict: append `-YYYYMMDD-HHMMSS`.
|
|||||||
|
|
||||||
**1.1 Load Preferences (EXTEND.md)**
|
**1.1 Load Preferences (EXTEND.md)**
|
||||||
|
|
||||||
Use Bash to check EXTEND.md existence (priority order):
|
Check EXTEND.md existence (priority order):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check project-level first
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-infographic/EXTEND.md && echo "project"
|
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"
|
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 │
|
│ Path │ Location │
|
||||||
├────────────────────────────────────────────────────┼───────────────────┤
|
├────────────────────────────────────────────────────┼───────────────────┤
|
||||||
|
|||||||
@@ -17,16 +17,20 @@ Converts Markdown files to beautifully styled HTML with inline CSS, optimized fo
|
|||||||
|
|
||||||
## Preferences (EXTEND.md)
|
## Preferences (EXTEND.md)
|
||||||
|
|
||||||
Use Bash to check EXTEND.md existence (priority order):
|
Check EXTEND.md existence (priority order):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check project-level first
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-markdown-to-html/EXTEND.md && echo "project"
|
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"
|
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 │
|
│ 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"
|
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 theme is resolved from EXTEND.md**: Use it directly, do NOT ask the user.
|
||||||
|
|
||||||
**If no default found**: Use AskUserQuestion to confirm:
|
**If no default found**: Use AskUserQuestion to confirm:
|
||||||
|
|||||||
@@ -23,16 +23,20 @@ description: Posts content to WeChat Official Account (微信公众号) via API
|
|||||||
|
|
||||||
## Preferences (EXTEND.md)
|
## Preferences (EXTEND.md)
|
||||||
|
|
||||||
Use Bash to check EXTEND.md existence (priority order):
|
Check EXTEND.md existence (priority order):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check project-level first
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-post-to-wechat/EXTEND.md && echo "project"
|
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"
|
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 │
|
│ Path │ Location │
|
||||||
├────────────────────────────────────────────────────────┼───────────────────┤
|
├────────────────────────────────────────────────────────┼───────────────────┤
|
||||||
@@ -180,13 +184,17 @@ mkdir -p "$(pwd)/post-to-wechat/$(date +%Y-%m-%d)"
|
|||||||
**If API Selected - Check Credentials**:
|
**If API Selected - Check Credentials**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check project-level
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/.env && grep -q "WECHAT_APP_ID" .baoyu-skills/.env && echo "project"
|
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"
|
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**:
|
**If Credentials Missing - Guide Setup**:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -31,16 +31,20 @@ Posts text, images, videos, and long-form articles to X via real Chrome browser
|
|||||||
|
|
||||||
## Preferences (EXTEND.md)
|
## Preferences (EXTEND.md)
|
||||||
|
|
||||||
Use Bash to check EXTEND.md existence (priority order):
|
Check EXTEND.md existence (priority order):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check project-level first
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-post-to-x/EXTEND.md && echo "project"
|
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"
|
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 │
|
│ Path │ Location │
|
||||||
├──────────────────────────────────────────────────┼───────────────────┤
|
├──────────────────────────────────────────────────┼───────────────────┤
|
||||||
|
|||||||
@@ -190,16 +190,20 @@ Input → Preferences → Analyze → [Check Existing?] → Confirm (1-2 rounds)
|
|||||||
|
|
||||||
**1.1 Load Preferences (EXTEND.md)**
|
**1.1 Load Preferences (EXTEND.md)**
|
||||||
|
|
||||||
Use Bash to check EXTEND.md existence (priority order):
|
Check EXTEND.md existence (priority order):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check project-level first
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-slide-deck/EXTEND.md && echo "project"
|
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"
|
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 │
|
│ Path │ Location │
|
||||||
├──────────────────────────────────────────────────┼───────────────────┤
|
├──────────────────────────────────────────────────┼───────────────────┤
|
||||||
|
|||||||
@@ -24,16 +24,20 @@ Fetches any URL via Chrome CDP and converts HTML to clean markdown.
|
|||||||
|
|
||||||
## Preferences (EXTEND.md)
|
## Preferences (EXTEND.md)
|
||||||
|
|
||||||
Use Bash to check EXTEND.md existence (priority order):
|
Check EXTEND.md existence (priority order):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check project-level first
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-url-to-markdown/EXTEND.md && echo "project"
|
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"
|
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 │
|
│ Path │ Location │
|
||||||
├────────────────────────────────────────────────────────┼───────────────────┤
|
├────────────────────────────────────────────────────────┼───────────────────┤
|
||||||
|
|||||||
@@ -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.
|
**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
|
```bash
|
||||||
# Check project-level first
|
# macOS, Linux, WSL, Git Bash
|
||||||
test -f .baoyu-skills/baoyu-xhs-images/EXTEND.md && echo "project"
|
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"
|
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 │
|
│ Path │ Location │
|
||||||
├────────────────────────────────────────────────────┼───────────────────┤
|
├────────────────────────────────────────────────────┼───────────────────┤
|
||||||
|
|||||||
Reference in New Issue
Block a user