agentleFS
qyndexqyndex/claude-init/.claude/skills/image-generation/SKILL.md

image-generation

Skill2 starsChanged 5 months agoMITView on GitHub

Use when a user-facing visual asset is needed (hero, illustration, icon, OG card, badge, mock). Orchestrates reuse-first → programmatic → icon → photo → AI illustration → vector → text-in-image. Round 9 C+D.

63 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use gift-evaluator, Podcast Generate and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • dav-niu474Skill

    gift-evaluator

    The PRIMARY tool for Spring Festival gift analysis and social interaction generation. Use this skill when users upload photos of gifts (alcohol, tea, supplements, etc.) to inquire about their value, authenticity, or how to respond socially. Integrates visual perception, market valuation, and HTML card generation.

    Also in 5 projects that use this

  • dav-niu474Skill

    Podcast Generate

    Generate podcast episodes from user-provided content or by searching the web for specified topics. If user uploads a text file/article, creates a dual-host dialogue podcast (or single-host upon request). If no content is provided, searches the web for information about the user-specified topic and generates a podcast. Duration scales with content size (3-20 minutes, ~240 chars/min). Uses z-ai-web-dev-sdk for LLM script generation and TTS audio synthesis. Outputs both a podcast script (Markdown) and a complete audio file (WAV).

    Also in 5 projects that use this

  • huang-x-hSkill

    Video Generation

    Implement AI-powered video generation capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to generate videos from text prompts or images, create video content programmatically, or build applications that produce video outputs. Supports asynchronous task management with status polling and result retrieval.

    Also in 6 projects that use this

  • huang-x-hSkill

    VLM

    Implement vision-based AI chat capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to analyze images, describe visual content, or create applications that combine image understanding with conversational AI. Supports image URLs and base64 encoded images for multimodal interactions.

    Also in 6 projects that use this

  • +1 more from huang-x-h
  • +7 more from dav-niu474

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 54 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If AI: write prompt; run license-policy check.

    line 59
  2. Very specific:

    Use <Image> (Next) or <img loading="lazy"> (other) with alt text

    line 63
  3. Very specific:

    Commit with chore(assets): add <slug> via <provider> + Conventional trailer

    line 64
  4. Distinctive:

    No copyrighted styles, no real people

    line 70

“Common” is measured: kept by at least 6 in 10 of the 54 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Image Generation

Mandate

Generate or source the right visual asset with reuse-first discipline, license safety, and cost gate.

Orchestration (top-down decision tree)

  1. REUSE CHECK — grep public/images/, public/illustrations/, assets/ for existing match by filename + alt-text. ALWAYS first.
  2. PROGRAMMATIC? — OG / social / certificate / dashboard chart? → @vercel/og (free, sub-200ms, HTML → PNG). Save to public/og/.
  3. ICON? — lucide-react / @tabler/icons-react / @heroicons/react — import directly, never AI-generate raster icons.
  4. PHOTO? — Pexels MCP search first (CC0). AI photo only if no stock match.
  5. ILLUSTRATION? — Replicate FLUX Schnell ($0.003/image, Apache-2.0). Upgrade to FLUX Pro ($0.04) only if quality fails.
  6. VECTOR / BRAND? — Recraft V3 MCP ($0.04 raster / $0.08 SVG). Best for brand icons, scalable assets.
  7. TEXT-IN-IMAGE? — Ideogram via Replicate route (opt-in, ~$0.04-0.11).

Output

Save to public/images/<slug>-<hash8>.{png,svg,webp} and emit:

  • assets-manifest.json entry: {slug, source, license, alt_text, prompt, cost_cents, created_at}
  • Inline <Image> usage in the component with alt text in same PR
  • WebP preferred at <100KB; SVG when vector available

License + safety policy

Hard-block (via pre-bash-guard.sh extension):

  • "in the style of <living artist>" / "<Studio Ghibli|Pixar|Disney|Marvel>"
  • "photo of <real person name>"
  • Non-commercial models (FLUX-dev, Stable Diffusion 2.1 non-commercial)

Allow:

  • FLUX Schnell (Apache-2.0)
  • FLUX Pro (commercial)
  • Recraft V3 (commercial)
  • Pexels (CC0)
  • @vercel/og (your HTML, no third-party model)

Cost gate

.claude/scripts/image-budget.sh:

  • Per-image hard cap: $0.10
  • Daily budget: $5 default
  • Log every call to .claude/state/image-spend.jsonl
  • Alert at 80% daily, hard-stop at 100%

Procedure (new image)

  1. Reuse check (grep)
  2. Pick tier (see decision tree)
  3. If AI: write prompt; run license-policy check; submit to MCP
  4. Cost-budget check
  5. Save to public/images/<slug>-<hash>.<ext>
  6. Update assets-manifest.json
  7. Use <Image> (Next) or <img loading="lazy"> (other) with alt text
  8. Commit with chore(assets): add <slug> via <provider> + Conventional trailer

Hard rules

  • Reuse > generate
  • Commercial-OK outputs only
  • No copyrighted styles, no real people
  • Alt text required (a11y)
  • Cost-gated (see image-budget.sh)
  • Provenance recorded in assets-manifest.json

References

Done means

  • Asset saved with documented source + license
  • <Image> used with alt text
  • assets-manifest.json updated
  • Cost within daily budget

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.