mirror of
https://github.com/JimLiu/baoyu-skills.git
synced 2026-08-02 15:19:48 +08:00
feat(baoyu-comic): add backup rules for source, character sheet, prompts, and page images
This commit is contained in:
@@ -194,6 +194,7 @@ Input → Preferences → Analyze → [Check Existing?] → [Confirm: Style + Re
|
|||||||
**Character reference is MANDATORY for visual consistency.**
|
**Character reference is MANDATORY for visual consistency.**
|
||||||
|
|
||||||
**7.1 Generate character sheet first**:
|
**7.1 Generate character sheet first**:
|
||||||
|
- **Backup rule**: If `characters/characters.png` exists, rename to `characters/characters-backup-YYYYMMDD-HHMMSS.png`
|
||||||
```bash
|
```bash
|
||||||
# Use Reference Sheet Prompt from characters/characters.md
|
# Use Reference Sheet Prompt from characters/characters.md
|
||||||
npx -y bun ${SKILL_DIR}/../baoyu-image-gen/scripts/main.ts \
|
npx -y bun ${SKILL_DIR}/../baoyu-image-gen/scripts/main.ts \
|
||||||
@@ -214,6 +215,10 @@ Compress to reduce token usage when used as reference image:
|
|||||||
| Supports `--ref` | Pass `characters/characters.png` with EVERY page |
|
| Supports `--ref` | Pass `characters/characters.png` with EVERY page |
|
||||||
| No `--ref` support | Prepend character descriptions to EVERY prompt file |
|
| No `--ref` support | Prepend character descriptions to EVERY prompt file |
|
||||||
|
|
||||||
|
**Backup rules for page generation**:
|
||||||
|
- If prompt file exists: rename to `prompts/NN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.md`
|
||||||
|
- If image file exists: rename to `NN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.png`
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Example: ALWAYS include --ref for consistency
|
# Example: ALWAYS include --ref for consistency
|
||||||
npx -y bun ${SKILL_DIR}/../baoyu-image-gen/scripts/main.ts \
|
npx -y bun ${SKILL_DIR}/../baoyu-image-gen/scripts/main.ts \
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ Read source content, save it if needed, and perform deep analysis.
|
|||||||
1. **Save source content** (if not already a file):
|
1. **Save source content** (if not already a file):
|
||||||
- If user provides a file path: use as-is
|
- If user provides a file path: use as-is
|
||||||
- If user pastes content: save to `source.md` in target directory
|
- If user pastes content: save to `source.md` in target directory
|
||||||
|
- **Backup rule**: If `source.md` exists, rename to `source-backup-YYYYMMDD-HHMMSS.md`
|
||||||
2. Read source content
|
2. Read source content
|
||||||
3. **Deep analysis** following `analysis-framework.md`:
|
3. **Deep analysis** following `analysis-framework.md`:
|
||||||
- Target audience identification
|
- Target audience identification
|
||||||
@@ -329,6 +330,7 @@ Create image generation prompts for all pages.
|
|||||||
1. Create prompt following art style + tone guidelines
|
1. Create prompt following art style + tone guidelines
|
||||||
2. Include character visual descriptions for consistency
|
2. Include character visual descriptions for consistency
|
||||||
3. Save to `prompts/NN-{cover|page}-[slug].md`
|
3. Save to `prompts/NN-{cover|page}-[slug].md`
|
||||||
|
- **Backup rule**: If prompt file exists, rename to `prompts/NN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.md`
|
||||||
|
|
||||||
**Prompt File Format**:
|
**Prompt File Format**:
|
||||||
```markdown
|
```markdown
|
||||||
@@ -405,8 +407,9 @@ With confirmed prompts from Step 5/6:
|
|||||||
### 7.1 Generate Character Reference Sheet (first)
|
### 7.1 Generate Character Reference Sheet (first)
|
||||||
|
|
||||||
1. Use Reference Sheet Prompt from `characters/characters.md`
|
1. Use Reference Sheet Prompt from `characters/characters.md`
|
||||||
2. Generate → `characters/characters.png`
|
2. **Backup rule**: If `characters/characters.png` exists, rename to `characters/characters-backup-YYYYMMDD-HHMMSS.png`
|
||||||
3. This ensures visual consistency for all subsequent pages
|
3. Generate → `characters/characters.png`
|
||||||
|
4. This ensures visual consistency for all subsequent pages
|
||||||
|
|
||||||
### 7.2 Generate Comic Pages
|
### 7.2 Generate Comic Pages
|
||||||
|
|
||||||
@@ -453,9 +456,10 @@ When skill does NOT support reference images, create combined prompt files:
|
|||||||
|
|
||||||
**For each page (cover + pages)**:
|
**For each page (cover + pages)**:
|
||||||
1. Read prompt from `prompts/NN-{cover|page}-[slug].md`
|
1. Read prompt from `prompts/NN-{cover|page}-[slug].md`
|
||||||
2. Generate image using Strategy A or B (based on skill capability)
|
2. **Backup rule**: If image file exists, rename to `NN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.png`
|
||||||
3. Save to `NN-{cover|page}-[slug].png`
|
3. Generate image using Strategy A or B (based on skill capability)
|
||||||
4. Report progress after each generation: "Generated X/N: [page title]"
|
4. Save to `NN-{cover|page}-[slug].png`
|
||||||
|
5. Report progress after each generation: "Generated X/N: [page title]"
|
||||||
|
|
||||||
**Session Management**:
|
**Session Management**:
|
||||||
If image generation skill supports `--sessionId`:
|
If image generation skill supports `--sessionId`:
|
||||||
|
|||||||
Reference in New Issue
Block a user