mirror of
https://github.com/JimLiu/baoyu-skills.git
synced 2026-07-21 01:39:48 +08:00
docs(baoyu-image-gen): surface build-batch.ts in Usage and clarify {baseDir} script paths
Add the outline.md + prompts/ → batch.json one-liner to SKILL.md's Usage section so the
build-batch helper is discoverable next to --batchfile, and update build-batch.ts --help
to print the bun / npx-y bun invocations with the {baseDir}/scripts/... layout used by
the rest of the skill.
This commit is contained in:
@@ -27,7 +27,7 @@ Concrete `AskUserQuestion` references below are examples — substitute the loca
|
|||||||
|
|
||||||
## Script Directory
|
## Script Directory
|
||||||
|
|
||||||
`{baseDir}` = this SKILL.md's directory. Main script: `{baseDir}/scripts/main.ts`. Resolve `${BUN_X}`: prefer `bun`; else `npx -y bun`; else suggest `brew install oven-sh/bun/bun`.
|
`{baseDir}` = this SKILL.md's directory. All `scripts/...` paths below are relative to `{baseDir}`. Main script: `{baseDir}/scripts/main.ts`. Batch payload helper: `{baseDir}/scripts/build-batch.ts`. Resolve `${BUN_X}`: prefer `bun`; else `npx -y bun`; else suggest `brew install oven-sh/bun/bun`.
|
||||||
|
|
||||||
## Step 0: Load Preferences ⛔ BLOCKING
|
## Step 0: Load Preferences ⛔ BLOCKING
|
||||||
|
|
||||||
@@ -86,6 +86,10 @@ ${BUN_X} {baseDir}/scripts/main.ts --prompt "A cat" --image out.png --provider c
|
|||||||
|
|
||||||
# Batch mode
|
# Batch mode
|
||||||
${BUN_X} {baseDir}/scripts/main.ts --batchfile batch.json --jobs 4
|
${BUN_X} {baseDir}/scripts/main.ts --batchfile batch.json --jobs 4
|
||||||
|
|
||||||
|
# Build a batch file from outline.md + prompts/ (e.g. baoyu-article-illustrator output)
|
||||||
|
${BUN_X} {baseDir}/scripts/build-batch.ts --outline outline.md --prompts prompts --output batch.json --images-dir attachments
|
||||||
|
${BUN_X} {baseDir}/scripts/main.ts --batchfile batch.json --jobs 4
|
||||||
```
|
```
|
||||||
|
|
||||||
## Reference-Image Identity Preservation
|
## Reference-Image Identity Preservation
|
||||||
@@ -242,7 +246,7 @@ Supported: `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `2.35:1`.
|
|||||||
| One image, or 1-2 simple images | Sequential | Lower coordination overhead, easier debugging |
|
| One image, or 1-2 simple images | Sequential | Lower coordination overhead, easier debugging |
|
||||||
| Multiple images with saved prompt files | Batch (`--batchfile`) | Reuses finalized prompts, applies shared throttling/retries, predictable throughput |
|
| Multiple images with saved prompt files | Batch (`--batchfile`) | Reuses finalized prompts, applies shared throttling/retries, predictable throughput |
|
||||||
| Each image still needs its own reasoning / prompt writing / style exploration | Subagents | Work is still exploratory, each needs independent analysis |
|
| Each image still needs its own reasoning / prompt writing / style exploration | Subagents | Work is still exploratory, each needs independent analysis |
|
||||||
| Input is `outline.md` + `prompts/` (e.g. from `baoyu-article-illustrator`) | Batch — use `scripts/build-batch.ts` to assemble the payload | The outline + prompt files already contain everything needed |
|
| Input is `outline.md` + `prompts/` (e.g. from `baoyu-article-illustrator`) | Batch — use `{baseDir}/scripts/build-batch.ts` to assemble the payload | The outline + prompt files already contain everything needed |
|
||||||
|
|
||||||
Rule of thumb: once prompt files are saved and the task is "generate all of these", prefer batch over subagents. Use subagents only when generation is coupled with per-image thinking or divergent creative exploration.
|
Rule of thumb: once prompt files are saved and the task is "generate all of these", prefer batch over subagents. Use subagents only when generation is coupled with per-image thinking or divergent creative exploration.
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ type PromptReference = {
|
|||||||
|
|
||||||
function printUsage(): void {
|
function printUsage(): void {
|
||||||
console.log(`Usage:
|
console.log(`Usage:
|
||||||
npx -y tsx scripts/build-batch.ts --outline outline.md --prompts prompts --output batch.json --images-dir attachments
|
bun <baseDir>/scripts/build-batch.ts --outline outline.md --prompts prompts --output batch.json --images-dir attachments
|
||||||
|
npx -y tsx <baseDir>/scripts/build-batch.ts --outline outline.md --prompts prompts --output batch.json --images-dir attachments
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--outline <path> Path to outline.md
|
--outline <path> Path to outline.md
|
||||||
|
|||||||
Reference in New Issue
Block a user