references/config/first-time-setup.md
3.5 KB查看排版效果| 1 | --- |
| 2 | name: first-time-setup |
| 3 | description: First-time setup flow for baoyu-xhs-images preferences |
| 4 | --- |
| 5 | |
| 6 | # First-Time Setup |
| 7 | |
| 8 | ## Overview |
| 9 | |
| 10 | When no EXTEND.md is found, guide user through preference setup. |
| 11 | |
| 12 | **⛔ BLOCKING OPERATION**: This setup MUST complete before ANY other workflow steps. Do NOT: |
| 13 | - Ask about content/article |
| 14 | - Ask about style or layout |
| 15 | - Ask about target audience |
| 16 | - Proceed to content analysis |
| 17 | |
| 18 | ONLY ask the questions in this setup flow, save EXTEND.md, then continue. |
| 19 | |
| 20 | ## Setup Flow |
| 21 | |
| 22 | ``` |
| 23 | No EXTEND.md found |
| 24 | │ |
| 25 | ▼ |
| 26 | ┌─────────────────────┐ |
| 27 | │ AskUserQuestion │ |
| 28 | │ (all questions) │ |
| 29 | └─────────────────────┘ |
| 30 | │ |
| 31 | ▼ |
| 32 | ┌─────────────────────┐ |
| 33 | │ Create EXTEND.md │ |
| 34 | └─────────────────────┘ |
| 35 | │ |
| 36 | ▼ |
| 37 | Continue to Step 1 |
| 38 | ``` |
| 39 | |
| 40 | ## Questions |
| 41 | |
| 42 | **Language**: Use user's input language or saved language preference. |
| 43 | |
| 44 | Use single AskUserQuestion with multiple questions (AskUserQuestion auto-adds "Other" option): |
| 45 | |
| 46 | ### Question 1: Watermark |
| 47 | |
| 48 | ``` |
| 49 | header: "Watermark" |
| 50 | question: "Watermark text for generated images? Type your watermark content (e.g., name, @handle)" |
| 51 | options: |
| 52 | - label: "No watermark (Recommended)" |
| 53 | description: "No watermark, can enable later in EXTEND.md" |
| 54 | ``` |
| 55 | |
| 56 | Position defaults to bottom-right. |
| 57 | |
| 58 | ### Question 2: Preferred Style |
| 59 | |
| 60 | ``` |
| 61 | header: "Style" |
| 62 | question: "Default visual style preference? Or type another style name or your custom style" |
| 63 | options: |
| 64 | - label: "None (Recommended)" |
| 65 | description: "Auto-select based on content analysis" |
| 66 | - label: "cute" |
| 67 | description: "Sweet, adorable - classic XHS aesthetic" |
| 68 | - label: "notion" |
| 69 | description: "Minimalist hand-drawn, intellectual" |
| 70 | ``` |
| 71 | |
| 72 | ### Question 3: Save Location |
| 73 | |
| 74 | ``` |
| 75 | header: "Save" |
| 76 | question: "Where to save preferences?" |
| 77 | options: |
| 78 | - label: "Project" |
| 79 | description: ".baoyu-skills/ (this project only)" |
| 80 | - label: "User" |
| 81 | description: "~/.baoyu-skills/ (all projects)" |
| 82 | ``` |
| 83 | |
| 84 | ## Save Locations |
| 85 | |
| 86 | | Choice | Path | Scope | |
| 87 | |--------|------|-------| |
| 88 | | Project | `.baoyu-skills/baoyu-xhs-images/EXTEND.md` | Current project | |
| 89 | | User | `~/.baoyu-skills/baoyu-xhs-images/EXTEND.md` | All projects | |
| 90 | |
| 91 | ## After Setup |
| 92 | |
| 93 | 1. Create directory if needed |
| 94 | 2. Write EXTEND.md with frontmatter |
| 95 | 3. Confirm: "Preferences saved to [path]" |
| 96 | 4. Continue to Step 1 |
| 97 | |
| 98 | ## EXTEND.md Template |
| 99 | |
| 100 | ```yaml |
| 101 | --- |
| 102 | version: 1 |
| 103 | watermark: |
| 104 | enabled: [true/false] |
| 105 | content: "[user input or empty]" |
| 106 | position: bottom-right |
| 107 | opacity: 0.7 |
| 108 | preferred_style: |
| 109 | name: [selected style or null] |
| 110 | description: "" |
| 111 | preferred_layout: null |
| 112 | language: null |
| 113 | preferred_image_backend: auto |
| 114 | generation_batch_size: 4 |
| 115 | custom_styles: [] |
| 116 | --- |
| 117 | ``` |
| 118 | |
| 119 | `preferred_image_backend: auto` is the baked-in default — first-time setup does not ask about it. The `## Image Generation Tools` rule in SKILL.md then picks the runtime-native tool (Codex `imagegen`, Hermes `image_generate`, etc.) when available, and falls back to installed backends. |
| 120 | |
| 121 | `generation_batch_size: 4` is the baked-in default for batch rendering. The current user request may override it for one run. |
| 122 | |
| 123 | ## Modifying Preferences Later |
| 124 | |
| 125 | See the `## Changing Preferences` section in `SKILL.md` for the canonical list of common edits (pin backend, change defaults, retrigger setup). Full schema: `preferences-schema.md`. |
文件内容是平台检查时读出的文本,只供查看。平台不会运行包里的任何脚本或程序。

