mirror of
https://github.com/JimLiu/baoyu-skills.git
synced 2026-07-21 09:49:48 +08:00
adb783ae6d
Replaces the stateless ask-once backend rule with a 4-step resolution (current-request override > saved preference > auto-select > ask) and adds a single `preferred_image_backend` field (auto | ask | <backend-id>) to every image-consuming skill's EXTEND.md schema. Runtime-native tools (Codex `imagegen`, Hermes `image_generate`, ...) win by default; absent field equals `auto` so existing user EXTEND.md files stay valid with no schema version bump. Each image-consuming skill also gains a top-level `## Changing Preferences` section as a first-class surface for pinning a backend and editing common one-line preferences. Applies across: - baoyu-infographic (reverts in-progress two-field image_backend_mode design) - baoyu-comic - baoyu-cover-image - baoyu-image-cards - baoyu-article-illustrator - baoyu-slide-deck - baoyu-xhs-images - docs/image-generation-tools.md (canonical author-side doc)
123 lines
3.2 KiB
Markdown
123 lines
3.2 KiB
Markdown
---
|
|
name: first-time-setup
|
|
description: First-time setup flow for baoyu-xhs-images preferences
|
|
---
|
|
|
|
# First-Time Setup
|
|
|
|
## Overview
|
|
|
|
When no EXTEND.md is found, guide user through preference setup.
|
|
|
|
**⛔ BLOCKING OPERATION**: This setup MUST complete before ANY other workflow steps. Do NOT:
|
|
- Ask about content/article
|
|
- Ask about style or layout
|
|
- Ask about target audience
|
|
- Proceed to content analysis
|
|
|
|
ONLY ask the questions in this setup flow, save EXTEND.md, then continue.
|
|
|
|
## Setup Flow
|
|
|
|
```
|
|
No EXTEND.md found
|
|
│
|
|
▼
|
|
┌─────────────────────┐
|
|
│ AskUserQuestion │
|
|
│ (all questions) │
|
|
└─────────────────────┘
|
|
│
|
|
▼
|
|
┌─────────────────────┐
|
|
│ Create EXTEND.md │
|
|
└─────────────────────┘
|
|
│
|
|
▼
|
|
Continue to Step 1
|
|
```
|
|
|
|
## Questions
|
|
|
|
**Language**: Use user's input language or saved language preference.
|
|
|
|
Use single AskUserQuestion with multiple questions (AskUserQuestion auto-adds "Other" option):
|
|
|
|
### Question 1: Watermark
|
|
|
|
```
|
|
header: "Watermark"
|
|
question: "Watermark text for generated images? Type your watermark content (e.g., name, @handle)"
|
|
options:
|
|
- label: "No watermark (Recommended)"
|
|
description: "No watermark, can enable later in EXTEND.md"
|
|
```
|
|
|
|
Position defaults to bottom-right.
|
|
|
|
### Question 2: Preferred Style
|
|
|
|
```
|
|
header: "Style"
|
|
question: "Default visual style preference? Or type another style name or your custom style"
|
|
options:
|
|
- label: "None (Recommended)"
|
|
description: "Auto-select based on content analysis"
|
|
- label: "cute"
|
|
description: "Sweet, adorable - classic XHS aesthetic"
|
|
- label: "notion"
|
|
description: "Minimalist hand-drawn, intellectual"
|
|
```
|
|
|
|
### Question 3: Save Location
|
|
|
|
```
|
|
header: "Save"
|
|
question: "Where to save preferences?"
|
|
options:
|
|
- label: "Project"
|
|
description: ".baoyu-skills/ (this project only)"
|
|
- label: "User"
|
|
description: "~/.baoyu-skills/ (all projects)"
|
|
```
|
|
|
|
## Save Locations
|
|
|
|
| Choice | Path | Scope |
|
|
|--------|------|-------|
|
|
| Project | `.baoyu-skills/baoyu-xhs-images/EXTEND.md` | Current project |
|
|
| User | `~/.baoyu-skills/baoyu-xhs-images/EXTEND.md` | All projects |
|
|
|
|
## After Setup
|
|
|
|
1. Create directory if needed
|
|
2. Write EXTEND.md with frontmatter
|
|
3. Confirm: "Preferences saved to [path]"
|
|
4. Continue to Step 1
|
|
|
|
## EXTEND.md Template
|
|
|
|
```yaml
|
|
---
|
|
version: 1
|
|
watermark:
|
|
enabled: [true/false]
|
|
content: "[user input or empty]"
|
|
position: bottom-right
|
|
opacity: 0.7
|
|
preferred_style:
|
|
name: [selected style or null]
|
|
description: ""
|
|
preferred_layout: null
|
|
language: null
|
|
preferred_image_backend: auto
|
|
custom_styles: []
|
|
---
|
|
```
|
|
|
|
`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.
|
|
|
|
## Modifying Preferences Later
|
|
|
|
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`.
|