imagegen-smarto 0.1.4 → 0.2.0
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 +13 -9
- package/imagegen-smarto/SKILL.md +32 -17
- package/imagegen-smarto/references/prompting.md +99 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -85,13 +85,17 @@ After installation, use the profile that points requests to SmartO. The skill
|
|
|
85
85
|
is configured for implicit invocation, so an image request can be written in
|
|
86
86
|
natural language without first typing `$imagegen-smarto`.
|
|
87
87
|
|
|
88
|
-
##
|
|
88
|
+
## Image generation workflow
|
|
89
89
|
|
|
90
|
-
When the skill is triggered, Codex
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
When the skill is triggered, Codex first turns the request into the same kind
|
|
91
|
+
of structured, production-oriented prompt used by the official image skill.
|
|
92
|
+
Detailed prompts are preserved and normalized; generic prompts receive only
|
|
93
|
+
useful composition or presentation detail. Edits explicitly lock the parts
|
|
94
|
+
that must remain unchanged.
|
|
95
|
+
|
|
96
|
+
Codex then runs the installed `imagegen-smarto` command. The command uses the
|
|
97
|
+
active SmartO provider and credential, saves the returned PNG locally, and
|
|
98
|
+
prints an absolute `IMAGE_MARKDOWN=...` line so Codex can display it inline.
|
|
95
99
|
|
|
96
100
|
You can also test the execution path directly:
|
|
97
101
|
|
|
@@ -107,9 +111,9 @@ imagegen-smarto generate \
|
|
|
107
111
|
--image /absolute/path/to/source.png
|
|
108
112
|
```
|
|
109
113
|
|
|
110
|
-
The command
|
|
111
|
-
|
|
112
|
-
|
|
114
|
+
The command handles its relay protocol internally; the skill only prepares the
|
|
115
|
+
final image prompt, supplies reference-image paths, and consumes the returned
|
|
116
|
+
image result.
|
|
113
117
|
|
|
114
118
|
## Local profile switch
|
|
115
119
|
|
package/imagegen-smarto/SKILL.md
CHANGED
|
@@ -1,27 +1,42 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: imagegen-smarto
|
|
3
|
-
description: Use the active SmartO relay to
|
|
3
|
+
description: Use the active SmartO relay to create or edit raster images. Trigger immediately for requests to create, draw, generate, modify, transform, or redesign a picture, including text-to-image (文生图), image-to-image (图生图), and image generation inside another workflow. Do not trigger for viewing, analyzing, describing, or recognizing an existing image, ordinary non-image tasks, or output better produced as SVG or code-native graphics.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# SmartO image generation
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
saves the returned image locally. Do not stop after reading this file and do
|
|
12
|
-
not try to change the outer Codex request yourself.
|
|
8
|
+
Use `imagegen-smarto generate` to produce the requested image. The command is
|
|
9
|
+
the image-generation tool for this skill; execute it instead of stopping after
|
|
10
|
+
reading these instructions.
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
## Workflow
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
1. Decide whether this is generation or an edit. Treat supplied images as edit
|
|
15
|
+
inputs only when the user asks to change or combine them; otherwise label
|
|
16
|
+
their reference role in the prompt.
|
|
17
|
+
2. Rewrite the user's request into a strong image prompt using
|
|
18
|
+
[references/prompting.md](references/prompting.md). Preserve all explicit
|
|
19
|
+
requirements. Normalize detailed prompts; augment generic prompts only when
|
|
20
|
+
the addition materially improves the result.
|
|
21
|
+
3. Generate one requested asset or variant per command:
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
```sh
|
|
24
|
+
imagegen-smarto generate --prompt "<final structured prompt>"
|
|
25
|
+
```
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
4. For an edit, add each available source or reference image by absolute path.
|
|
28
|
+
Up to five images may be supplied:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
imagegen-smarto generate --prompt "<final structured edit prompt>" \
|
|
32
|
+
--image /absolute/path/to/input.png
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
5. If the user named an output location, pass `--output <path>`. Do not
|
|
36
|
+
overwrite an existing asset unless replacement was explicitly requested.
|
|
37
|
+
6. On success, include every printed `IMAGE_MARKDOWN=...` value in the answer
|
|
38
|
+
so Codex displays the generated file. Report the saved path. For a failed
|
|
39
|
+
command, report the actual error and do not claim that an image exists.
|
|
40
|
+
|
|
41
|
+
For edits, state invariants explicitly in the prompt: `change only X; keep Y
|
|
42
|
+
unchanged`. When iterating, make one targeted change and repeat the invariants.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Image prompting
|
|
2
|
+
|
|
3
|
+
Shape the user's request into a concise production-oriented specification.
|
|
4
|
+
Use only the lines that improve the request; the schema is scaffolding, not a
|
|
5
|
+
form that must always be filled.
|
|
6
|
+
|
|
7
|
+
## Specificity
|
|
8
|
+
|
|
9
|
+
- If the prompt is already detailed, preserve it and only normalize its order
|
|
10
|
+
and wording.
|
|
11
|
+
- If the prompt is generic, add tasteful composition, framing, intended-use,
|
|
12
|
+
polish, or scene detail when it materially improves the output.
|
|
13
|
+
- Do not invent extra characters, props, brands, slogans, palettes, or story
|
|
14
|
+
beats. Do not choose arbitrary left/right placement without layout context.
|
|
15
|
+
- Keep exact user constraints and requested text unchanged.
|
|
16
|
+
|
|
17
|
+
## Prompt structure
|
|
18
|
+
|
|
19
|
+
For complex requests, use short labeled lines in this order:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
Use case: <taxonomy slug>
|
|
23
|
+
Asset type: <where the image will be used> (optional)
|
|
24
|
+
Primary request: <the user's main request>
|
|
25
|
+
Input images: <Image 1: role; Image 2: role> (optional)
|
|
26
|
+
Scene/backdrop: <environment>
|
|
27
|
+
Subject: <main subject and important details>
|
|
28
|
+
Style/medium: <photo, illustration, 3D, etc.>
|
|
29
|
+
Composition/framing: <viewpoint, crop, placement, negative space>
|
|
30
|
+
Lighting/mood: <lighting and atmosphere>
|
|
31
|
+
Color palette: <requested or implied palette>
|
|
32
|
+
Materials/textures: <important surface detail>
|
|
33
|
+
Text (verbatim): "<exact text>"
|
|
34
|
+
Constraints: <must preserve and must include>
|
|
35
|
+
Avoid: <negative constraints>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Simple requests can remain short. Add only the fields needed to clarify the
|
|
39
|
+
result.
|
|
40
|
+
|
|
41
|
+
## Use-case taxonomy
|
|
42
|
+
|
|
43
|
+
Generation:
|
|
44
|
+
|
|
45
|
+
- `photorealistic-natural`: candid or editorial scenes with natural lighting
|
|
46
|
+
and real texture.
|
|
47
|
+
- `product-mockup`: product, packaging, catalog, or merchandise imagery.
|
|
48
|
+
- `ui-mockup`: practical app or web interface imagery at a stated fidelity.
|
|
49
|
+
- `infographic-diagram`: structured diagrams with explicit layout and labels.
|
|
50
|
+
- `scientific-educational`: accurate teaching visuals for a named audience.
|
|
51
|
+
- `ads-marketing`: campaign imagery with audience, positioning, and exact copy.
|
|
52
|
+
- `productivity-visual`: slides, charts, workflows, and business visuals.
|
|
53
|
+
- `logo-brand`: simple, scalable mark exploration with a strong silhouette.
|
|
54
|
+
- `illustration-story`: comics, children's art, and narrative scenes.
|
|
55
|
+
- `stylized-concept`: style-driven concept art or rendered scenes.
|
|
56
|
+
- `historical-scene`: period-specific scenes requiring factual accuracy.
|
|
57
|
+
|
|
58
|
+
Editing:
|
|
59
|
+
|
|
60
|
+
- `text-localization`: replace only in-image text and preserve layout.
|
|
61
|
+
- `identity-preserve`: preserve face, body, pose, hair, and expression.
|
|
62
|
+
- `precise-object-edit`: replace or remove a named element only.
|
|
63
|
+
- `lighting-weather`: change environmental conditions while preserving content.
|
|
64
|
+
- `background-extraction`: create a clean transparent-background cutout.
|
|
65
|
+
- `style-transfer`: apply reference style without introducing extra elements.
|
|
66
|
+
- `compositing`: combine indexed inputs with matched scale, light, perspective.
|
|
67
|
+
- `sketch-to-render`: preserve layout, proportions, and perspective.
|
|
68
|
+
|
|
69
|
+
## Composition and realism
|
|
70
|
+
|
|
71
|
+
- Specify framing and viewpoint only when useful: close-up, full body, wide,
|
|
72
|
+
eye-level, low-angle, top-down.
|
|
73
|
+
- Call out negative space when the image must leave room for UI or copy.
|
|
74
|
+
- For people, clarify body framing, gaze, pose, and object interactions when
|
|
75
|
+
they matter.
|
|
76
|
+
- For photorealism, explicitly request photorealism and concrete natural detail
|
|
77
|
+
such as skin texture, fabric wear, material grain, and imperfect surfaces.
|
|
78
|
+
|
|
79
|
+
## Edits and references
|
|
80
|
+
|
|
81
|
+
- Label every supplied image by index and role: edit target, style reference,
|
|
82
|
+
composition reference, or compositing input.
|
|
83
|
+
- For edits, use `change only X; keep Y unchanged` and list all invariants.
|
|
84
|
+
- For compositing, state what moves from each indexed image and require matched
|
|
85
|
+
lighting, perspective, and scale.
|
|
86
|
+
- Repeat invariants on every edit iteration to reduce drift.
|
|
87
|
+
|
|
88
|
+
## Text in images
|
|
89
|
+
|
|
90
|
+
- Quote exact text, require verbatim rendering, and specify typography and
|
|
91
|
+
placement when those details matter.
|
|
92
|
+
- Spell uncommon words letter by letter when accuracy is critical.
|
|
93
|
+
- Require no extra characters or text beyond the supplied copy.
|
|
94
|
+
|
|
95
|
+
## Iteration
|
|
96
|
+
|
|
97
|
+
Start with a clean base prompt. Inspect the result against subject, style,
|
|
98
|
+
composition, exact text, invariants, and avoid items. Refine with one targeted
|
|
99
|
+
change at a time instead of rewriting unrelated parts of the prompt.
|