prompt-enhancer

prompt-enhancer is a cursor rule for Cursor from MohamedAbdallah-14/prompt-to-asset. It costs 2,060 tokens per session, scanned A, original, MIT.

A set of rules for improving and routing prompts used to create software visuals. It covers assets such as logos, icons, illustrations, hero images, and UI mockups, including special handling for transparency and text.

In plain words
What is it for?
Use it when preparing requests for generated product assets. It helps decide where to send the request, how to describe it, and when the result needs extra processing.
Why use it?
It reduces failures caused by using the wrong image tool or asking for effects that a model cannot produce directly. It also helps account for differences between image-generation models.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when preparing requests for generated product assets. It helps decide where to send the request, how to describe it, and when the result needs extra processing.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/mohamedabdallah-14/prompt-to-asset/prompt-enhancer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/MohamedAbdallah-14/prompt-to-asset

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for prompt-enhancer

README.md
[![agentmods](https://agentmods.dev/badge/rules/mohamedabdallah-14/prompt-to-asset/prompt-enhancer/github.svg)](https://agentmods.dev/rules/mohamedabdallah-14/prompt-to-asset/prompt-enhancer)
Your own site
<a href="https://agentmods.dev/rules/mohamedabdallah-14/prompt-to-asset/prompt-enhancer"><img src="https://agentmods.dev/badge/rules/mohamedabdallah-14/prompt-to-asset/prompt-enhancer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prompt-enhancer

Your own site · 80×15
<a href="https://agentmods.dev/rules/mohamedabdallah-14/prompt-to-asset/prompt-enhancer"><img src="https://agentmods.dev/badge/rules/mohamedabdallah-14/prompt-to-asset/prompt-enhancer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,060 This file is loaded in full into every session.
When invoked 2,060 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02060 $0.02060
Opus 5 $0.01030 $0.01030
Sonnet 5 $0.00412 $0.00412
Haiku 4.5 $0.00206 $0.00206

Measured 12d ago against content hash cdb8a32b994e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

prompt-enhancer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/prompt-enhancer.mdc · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Asset generation — always-on rule

When the user asks for a logo, app icon, favicon, OG image, illustration, splash screen, icon pack, transparent mark, hero image, sticker, or any other software-development asset, the single most important fact to apply is:

Producing production-grade software assets is a routing + post-processing problem, not a prompt-engineering problem.

And the second most important fact:

The user may not have an image-model API key. The plugin must work anyway.

This means:

  1. Do NOT just forward the user's brief to whichever image model is handy. No amount of prompt polish makes Imagen 3/4 or Gemini Flash Image produce a real transparent PNG — they render a grey-and-white checkerboard as RGB pixels because their VAE is RGB-only. Transparency is a capability routing decision. Route transparent requests to gpt-image-1 (with background: "transparent"), Ideogram 3 Turbo (style: "transparent"), Recraft V3, or LayerDiffuse-enabled Flux/SDXL. For every other model, matte with BiRefNet or BRIA RMBG-2.0 after generation.

  2. Brand text in diffusion — model-specific ceilings. For strong-text renderersgpt-image-1, gpt-image-1.5, ideogram-3 / ideogram-3-turbo, and gemini-3-pro-image-preview (Nano Banana Pro, released late 2025) — short wordmarks and taglines up to roughly 3 words / ~20 chars render reliably; include the wordmark in the prompt (in double quotes, with position and weight specified). For every other model — Imagen, Flux (any variant), Stable Diffusion, Nano Banana non-Pro (gemini-3-flash-image), Pollinations — diffusion still garbles past ~3 words (often past a single glyph on SD). Default to text-free generation + composite real SVG / Canvas / Skia typography in the application layer using the brand font. For anything over ~8 words (a paragraph, a list, real UI copy), composite always, even on the strong-text renderers.

  3. Do NOT expect a raster model to emit SVG. None do. The three real paths: (a) Recraft V3 native vector, (b) LLM-author SVG for simple geometry (fixed viewBox, no <image>, palette hex list, ≤40 paths) — this is what mode: "inline_svg" does, (c) raster → BiRefNet matte → K-means 6-color → vtracer/potrace → SVGO.

  4. Do NOT use negative_prompt on Flux — it errors. Imagen and gpt-image-1 silently ignore it. The universally-portable "negative" is a positive anchor: write "pure white background" not "no checkerboard".

  5. Do NOT ship a generated asset without validation. Every output runs through tier-0 deterministic checks: dimensions exact; alpha channel present when required; no checkerboard FFT signature; subject tight-bbox fits inside the platform safe zone (iOS 824px center of 1024; Android 72dp of 108dp; PWA 80% of maskable); OCR Levenshtein ≤1 against intended wordmark; palette ΔE2000 ≤10 vs brand palette.

Read the full file on GitHub · 76 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 76 lines · 2,060 tokens per session scan A cdb8a32b994e

Subscribe to this mod's changes

prompt-enhancer is a cursor rule published in the GitHub repository MohamedAbdallah-14/prompt-to-asset (19 stars, last pushed yesterday), licensed MIT. It adds 2,060 tokens to every session, about $0.0103 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.