@diegopetrucci/pi-illustrations-to-explain-things 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ The skill helps the agent turn one key judgment, process, structure, state, or m
|
|
|
10
10
|
- Shot lists for longer essays or Notion pages
|
|
11
11
|
- Visual metaphors for workflows, methods, structures, and states
|
|
12
12
|
- Focused image-generation prompts with style and QA constraints
|
|
13
|
+
- Image generation via `image_gen` (Codex) or, in Pi, the `codemode` tool with an image model (OpenRouter or Radius); otherwise prompts only
|
|
13
14
|
|
|
14
15
|
## Install
|
|
15
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diegopetrucci/pi-illustrations-to-explain-things",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "A pi skill for generating clean, absurd Xiaohei-style article illustrations, shot lists, and visual metaphors.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -59,6 +59,8 @@ Default to 4-8 images. For very short pieces, 1-3 may be enough. Even for long p
|
|
|
59
59
|
|
|
60
60
|
If the user clearly asks you to generate, output, or make images, do not pause for confirmation. Use the built-in `image_gen` tool and generate each image separately. Do not combine multiple concepts into one image.
|
|
61
61
|
|
|
62
|
+
If no `image_gen` tool is available (for example in Pi), use the `codemode` tool instead: pick a model from `models.getAvailableOfType("image")`, call `models.generateImages(model, { input: [{ type: "text", text: prompt }] }, { aspectRatio: "16:9" })`, require `result.stopReason === "stop"` and at least one `image` block in `result.output` (otherwise report the failure and output the prompt instead of claiming success), and attach each `image` block with `image(block)`. Pi saves attached images to temp files named in the result; copy them as described in step 5, keeping the extension that matches the image's `mimeType` (PNG, JPEG, or WebP). This requires codemode to be enabled (for example `defaultTools` with `+codemode`) and an available image model (OpenRouter or Radius in Pi 1.7.0). If neither `image_gen` nor a usable codemode image model is available, say so and output the prompts instead.
|
|
63
|
+
|
|
62
64
|
Each image should express only one core structure. The prompt must include:
|
|
63
65
|
|
|
64
66
|
- 16:9 landscape article illustration
|
|
@@ -98,6 +100,8 @@ Name them in order:
|
|
|
98
100
|
02-topic-name.png
|
|
99
101
|
```
|
|
100
102
|
|
|
103
|
+
Use the extension matching the actual image format (e.g. `.jpg`, `.webp`), or convert to PNG before using a `.png` name.
|
|
104
|
+
|
|
101
105
|
Keep original generated files rather than overwriting existing assets, unless the user explicitly asks to replace them.
|
|
102
106
|
|
|
103
107
|
## Delivery style
|
|
@@ -76,16 +76,6 @@ Reinvent the metaphor from the current article every time. Do not reuse old imag
|
|
|
76
76
|
|
|
77
77
|
Do not automatically open or imitate `assets/examples/`. Those images are only for style calibration such as line density, whitespace, color restraint, and Xiaohei attitude.
|
|
78
78
|
|
|
79
|
-
Unless the user explicitly says "copy this one," "recreate this composition," or "edit this example," do not
|
|
80
|
-
|
|
81
|
-
- a conveyor belt with two breakpoints
|
|
82
|
-
- Xiaohei pulling a judgment lever inside a content machine
|
|
83
|
-
- Xiaohei as a funnel sorting reach / trust / conversion
|
|
84
|
-
- Xiaohei cutting up a source-material fish
|
|
85
|
-
- Xiaohei pulling a handoff route
|
|
86
|
-
- Xiaohei tugging three layers of information sources
|
|
87
|
-
- three Xiaohei figures holding a megaphone, building a bridge, and opening a door
|
|
88
|
-
- Xiaohei stamping a messaging toolbox
|
|
89
|
-
- Xiaohei holding a warning sign over a trap path
|
|
79
|
+
Unless the user explicitly says "copy this one," "recreate this composition," or "edit this example," do not reuse the compositions or metaphors of any image in `assets/examples/`.
|
|
90
80
|
|
|
91
81
|
Even when the theme is similar, invent a new metaphor. For example, a handoff path does not have to be a route; it could be Xiaohei connecting the tail of a piece of content to a doorknob. One-input-many-outputs does not have to be a fish; it could be Xiaohei pressing one paper lump into several different shapes.
|