image-generation-core
Skill2 starsChanged 47 days agoMITView on GitHub
Base rules for generating any channel image — thumbnails, banner, profile picture, graphics. Triggered by "generate an image", "make me a thumbnail", "create the banner", or before any other skill in the visual branch. In Spanish, "genera una imagen", "hazme una miniatura", "créame el banner", o antes de cualquier otra skill de la rama visual.
- Reads credentials
In this repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- analyse-channel-packagingSkill
- analyse-thumbnailsSkill
- channel-analyticsSkill
- channel-identitySkill
- channel-kickoffSkill
- competitor-boardSkill
- competitor-ideationSkill
- competitor-mappingSkill
- competitor-scanSkill
- image-refinementSkill
- keywords-seoSkill
- likeness-preservationSkill
- memory-reviewSkill
- monetisationSkill
- packagingSkill
- script-writingSkill
- thumbnail-best-practicesSkill
- thumbnail-inspirationSkill
- transparencySkill
- youtube-banner-specSkill
- youtube-profile-specSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 74
Fill the frame: No borders, no frames, no white margin.
- Very specific: line 84
No skill names one. It lives in config/image_providers.json:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Image generation: base rules
WHEN
Any generation. The other visual skills depend on this one: if
generate_image.py is going to be called, these rules apply.
To edit an image that already exists, this is not the skill: that is
image-refinement. To change only size or weight, neither of them:
export_image.py, which is local and free.
EXECUTION ORDER
Pick the format before the prompt
--typedecides which technical requirements get prepended to the prompt.--typeFor what Pixels thumbnailVideo thumbnail 1280x720 (16:9) profile_imageProfile picture 800x800 bannerChannel banner 2560x1440 generalA graphic, an illustration, anything else 1920x1080 There is no separate tool for video thumbnails here: it is
generate_image.py --type thumbnail. Do not go looking for agenerate_thumbnail.Thumbnails are always 16:9 and the tool validates the ratio before calling the provider. If your channel publishes vertical, restore the
vertical_thumbnailformat from_retired_formatsinconfig/image_providers.json, and checkmemory/rules.mdfirst in case a restriction forbids it.Label every reference with its role — mandatory
--ref SOURCE:ROLE, withROLEinlikeness,style,composition,packaging. The source can be a local path, a URL or avideo_id.The tool rejects a reference with no role on purpose: the role decides the order they are handed to the model and whether the facial identity clause applies. Guessing it ruins the face.
The tool imposes the order: people first, style next, composition last. Three references maximum; more dilute the result.
- If a person appears, load
likeness-preservationbefore generating. A badly resolved face is not fixed by iterating the prompt. - Dry run before spending
python3 tools/generate_image.py --prompt "..." --type banner --dry-run --mdReturns the composed final prompt without calling the provider. If the final prompt does not say what you meant, fix it here rather than after paying. - Generate
python3 tools/generate_image.py --prompt "..." --type thumbnail --ref photo.jpg:likeness - Look at the result. Open the returned file with the image reading tool. Delivering an image you have not seen is the easiest mistake to make in this branch.
- Adjust dimensions with
export_image.py, never by regenerating.python3 tools/export_image.py --image PATH --type thumbnailIt is deterministic, local and costs no credits. YouTube rejects thumbnails over 2 MB and this brings them under without repeating the generation.
PROMPT RULES
- No text that was not asked for. The tool already requests this; do not contradict it.
- Fill the frame. No borders, no frames, no white margin.
- Large subject: between 50% and 70% of the frame.
- Rule of thirds: the focal point on an intersection, not dead centre.
- Other people's watermarks and logos out. The tool asks for this in every prompt.
- When in doubt, no face. Objects, text, graphics or abstract before an invented generic person.
PROVIDER
No skill names one. It lives in config/image_providers.json:
provider: "fal"— calls fal.ai over REST. NeedsFAL_KEYin the environment (put it in.env).provider: "mcp"— the tool does not generate: it returns the exact MCP call for the agent to run, because a script cannot invoke an MCP tool from the session.
Model slots left at null in the config make the tool fail with instructions.
That is deliberate: an invented slug burns credits and returns 404, or
generates with a different model without saying so.
SOURCES
generate_image returns source: generated. It is neither data nor a
measurement: it says nothing about how it will perform. When delivering the
image, name the model that produced it. export_image is derived.
OUTPUT
- The file path, after opening it and checking it matches the request.
- The model that generated it, named explicitly (
source: generated). - The final prompt, when it matters for the next iteration.
- One concrete adjustment if something is off — not a numbered menu.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

