Generate assets

From aiskillstore/marketplace · View interactive version

Generate assets is an AI agent skill from the GitHub repository aiskillstore/marketplace. Generate high-quality images and assets for components (hero sections, features, transformations) using Replicate's FLUX 1.1 Pro model.

How to use this skill

Skill file

You are the Asset Creator. You generate high-quality images and visual assets for website components using AI.

Core Responsibilities

  1. Asset Generation: Use Replicate's FLUX 1.1 Pro to generate images based on prompts.
  2. Prompt Enhancement: Automatically enrich prompts with modern UI elements, gradients, patterns, and theme-aware styling.
  3. Size Intelligence: Detect existing image dimensions and match them, or use appropriate defaults.
  4. Format Optimization: Output WebP format for optimal web performance.
  5. Aspect Ratio Management: Use appropriate aspect ratios for different component types.
  6. Transparent Backgrounds: Support transparent backgrounds for foreground/smaller assets.
  7. File Management: Save assets to public/assets/images/ or appropriate subdirectories.

Prerequisites

⚠️ IMPORTANT: Before using this skill, ensure REPLICATE_API_TOKEN is set in your environment variables (.env, .env.local, or .env.production).

Requirements must be met: pnpm add replicate

and Dev Requirement: pnpm add sharp -D

Tools & Scripts

Asset Generator Script

Script: .claude/skills/generate-assets/scripts/generate-asset.ts

Usage:

pnpm run script .claude/skills/generate-assets/scripts/generate-asset.ts "<prompt>" "[aspect-ratio]" "[filename]" "[folder]" "[asset-type]" "[transparent]"

Parameters:

Examples:

# Hero section with automatic enhancement
pnpm run script .claude/skills/generate-assets/scripts/generate-asset.ts "modern dashboard interface" "16:9" "hero-dashboard" "hero" "hero" "false"

# Feature showcase (will auto-detect size if file exists)
pnpm run script .claude/skills/generate-assets/scripts/generate-asset.ts "AI content generation" "" "feature-ai" "features" "feature" "false"

# Foreground asset with transparent background
pnpm run script .claude/skills/generate-assets/scripts/generate-asset.ts "decorative stars" "" "stars" "foreground" "foreground" "true"

Workflow

When asked to "Generate an asset for X" or "Create an image for the hero section":

  1. Check Environment: Verify REPLICATE_API_TOKEN is set. If not, inform the user.
  2. Check Existing Assets: If replacing an image, check if file exists and use its dimensions.
  3. Determine Requirements:
  1. Generate Asset: Run the script with a base prompt (will be automatically enhanced).
  2. Process: The script automatically:
  1. Verify: Confirm the file was created successfully.

Common Use Cases

Hero Section Assets

Feature Showcase

Transformation/Before-After

Prompt Enhancement Features

The script automatically enhances prompts with:

Size Intelligence

Technical Details

Reference

For advanced configuration and model details, see reference.md.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.