generate-assets
Generate high-quality images and assets for components (hero sections, features, transformations) using Replicate's FLUX 1.1 Pro model.
Best use case
generate-assets is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Generate high-quality images and assets for components (hero sections, features, transformations) using Replicate's FLUX 1.1 Pro model.
Generate high-quality images and assets for components (hero sections, features, transformations) using Replicate's FLUX 1.1 Pro model.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "generate-assets" skill to help with this workflow task. Context: Generate high-quality images and assets for components (hero sections, features, transformations) using Replicate's FLUX 1.1 Pro model.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/generate-assets/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How generate-assets Compares
| Feature / Agent | generate-assets | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Generate high-quality images and assets for components (hero sections, features, transformations) using Replicate's FLUX 1.1 Pro model.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
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**: ```bash pnpm run script .claude/skills/generate-assets/scripts/generate-asset.ts "<prompt>" "[aspect-ratio]" "[filename]" "[folder]" "[asset-type]" "[transparent]" ``` **Parameters**: - `prompt`: Base description of the image to generate. Will be automatically enhanced with modern UI elements, gradients, patterns, and theme-aware styling. - `aspect-ratio`: Optional aspect ratio. If omitted and file exists, uses existing image dimensions. Otherwise defaults by asset type. - `filename`: Name of the file without extension (default: auto-generated from prompt). - `folder`: Subfolder in `public/assets/images/` (default: root of `public/assets/images/`). - `asset-type`: Optional type: "hero", "feature", "transformation", "foreground", "other" (default: "other"). Affects prompt enhancement and default aspect ratio. - `transparent`: Optional "true" or "false" (default: "false"). If true, removes background for transparent assets. **Examples**: ```bash # 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**: - Identify the component type (hero, feature, transformation, foreground, etc.) - Determine if transparent background is needed (for smaller/foreground assets) - Choose appropriate aspect ratio (or let script auto-detect from existing file) 4. **Generate Asset**: Run the script with a base prompt (will be automatically enhanced). 5. **Process**: The script automatically: - Enhances prompt with modern UI elements, gradients, patterns, and theme-aware styling - Generates the image using FLUX 1.1 Pro - Removes background if transparent is requested - Resizes to match existing image or appropriate default - Optimizes as WebP format - Saves to the appropriate location 6. **Verify**: Confirm the file was created successfully. # Common Use Cases ## Hero Section Assets - Show product interface, dashboard, or solution in action - Aspect ratio: `16:9` or `21:9` - Example: "modern SaaS dashboard with analytics charts and user interface" ## Feature Showcase - Demonstrate specific features or capabilities - Aspect ratio: `1:1` or `4:3` - Example: "AI-powered content generation interface with real-time preview" ## Transformation/Before-After - Show how the solution works or transforms something - Aspect ratio: `16:9` - Example: "before and after comparison of content optimization" # Prompt Enhancement Features The script automatically enhances prompts with: - **Modern UI Elements**: Playful interface components, glassmorphism, neomorphic design - **Background Patterns**: Subtle dots, geometric grids, triangles, stars, gradients - **Theme Awareness**: Inspired by project's theme colors and design system - **Decorative Elements**: Stars, dots, lines, floating shapes for larger images - **Style Modifiers**: Professional, high quality, subtle, elegant, contemporary # Size Intelligence - **Existing Images**: If replacing an image, automatically detects dimensions and matches them - **New Images**: Uses appropriate defaults based on asset type: - Hero: 1920x1080 (16:9) - Feature: 1024x1024 (1:1) - Transformation: 1920x1080 (16:9) - Foreground: 512x512 (1:1) # Technical Details - **Generation Model**: `black-forest-labs/flux-1.1-pro` - **Background Removal**: `bria/remove-background` (for transparent assets) - **Output Format**: WebP (optimized for web) - **Output Quality**: 80 (default) - **Safety Tolerance**: 2 (default) - **Prompt Upsampling**: true (default) - **Location**: `public/assets/images/[folder]/[filename].webp` # Reference For advanced configuration and model details, see [reference.md](reference.md).
Related Skills
unit-testing-test-generate
Generate comprehensive, maintainable unit tests across languages with strong coverage and edge case focus.
fal-generate
Generate images and videos using fal.ai AI models
documentation-generation-doc-generate
You are a documentation expert specializing in creating comprehensive, maintainable documentation from code. Generate API docs, architecture diagrams, user guides, and technical references using AI-powered analysis and industry best practices.
code-documentation-doc-generate
You are a documentation expert specializing in creating comprehensive, maintainable documentation from code. Generate API docs, architecture diagrams, user guides, and technical references using AI-powered analysis and industry best practices.
env-and-assets-bootstrap
Environment and assets sub-skill for README-first AI repo reproduction. Use when the task is specifically to prepare a conservative conda-first environment, checkpoint and dataset path assumptions, cache location hints, and setup notes before any run on a README-documented repository. Do not use for repo scanning, full orchestration, paper interpretation, final run reporting, or generic environment setup that is not tied to a specific reproduction target.
generate-image
Generate or edit images using AI models (FLUX, Gemini). Use for general-purpose image generation including photos, illustrations, artwork, visual assets, concept art, and any image that isn't a technical diagram or schematic. For flowcharts, circuits, pathways, and technical diagrams, use the scientific-schematics skill instead.
generate-sparkle-appcast
Generate Mos Sparkle appcast.xml from the latest build zip and recent git changes (since a given commit), then sync to docs/ for publishing.
quality-report-generate
Generate comprehensive quality report with metrics and verification. Produces final CHAPTER_XX_VERIFICATION.md and quality_metrics.json for deployment approval.
generate-output
Create the deliverable (code, documentation, tests, content) following the user's standards and best practices. Use after validation passes to actually build the work product.
ascii-preview-generate
Use AI to create ASCII text-based preview of PDF page layout. Transforms visual and extracted data into structured ASCII representation for HTML generation.
ai-html-generate
Use AI to recreate PDF page as semantic HTML. Consumes three inputs (PNG image, parsed text, ASCII preview) for complete contextual understanding and accurate generation.
generate-api-client
Orval APIクライアント生成スキル(OpenAPI仕様書から型安全なAPIクライアントを自動生成)