fal.ai Skills

repository·main·Indexed 42 days ago

https://github.com/fal-ai-community/skills

A collection of agent-centric knowledge layers and workflow patterns designed to help AI agents like Claude interact with the fal.ai ecosystem. It provides the context and prompting strategies needed to use generative media endpoints via the genmedia CLI, featuring specialized skills for character design, cinematography, marketing, and website redesign (fal-redesign) including the fal-site tool for generating single-file HTML site variations.

Tokens
95.5K
Snippets
250
Records
398
Agent score
54%

What's inside fal.ai Skills

  1. Overview of fal.ai Skills and the genmedia CLI

    main

    fal.ai Skills are agent-ready knowledge layers designed for platforms like Claude.ai Projects and Claude Code. They provide agents with the necessary information to discover endpoints, inspect schemas, run models, poll status, and download outputs.

    Most skills function as knowledge layers that instruct an agent on:

    • Which endpoint to use.
    • How to prompt the model.
    • How to chain multiple calls together.

    The primary execution path for these skills is the genmedia CLI, which provides the following core capabilities:

    • models: Discover available models.
    • schema: Inspect endpoint schemas.
    • run: Execute a model.
    • status: Poll for execution status.
    • upload: Upload assets.
    • pricing: Check costs.
    • docs: Access documentation.
  2. Produce UGC-style creator content with genmedia

    main

    Use the ugc skill to plan and run User Generated Content (UGC) style creator ads and social proof videos. This is intended for content that feels like a creator's authentic video (e.g., TikTok, Reels, Shorts) rather than polished studio advertising.

    Use cases include:

    • Direct-to-camera creator scripts and talking-head ads.
    • Product demos, unboxings, and testimonials.
    • Founder clips, reaction videos, and before-after comparisons.
    • Faceless voiceovers and short vertical social videos.

    Important Guardrails:

    • Claims: Do not write fake testimonials, invented reviews, medical claims, or financial claims. Use observable statements (e.g., "the texture looks lighter") instead of unsupported claims (e.g., "this cures acne").
    • Fidelity: Ensure product shape, packaging, and logos remain stable. Avoid hallucinating captions or text overlays inside the video.
  3. Common fal.ai workflow patterns

    main

    When designing workflows in fal.ai, you can utilize several structural patterns to manage data flow and dependencies:

    1. LLM Prompt → Image → Video

    Sequential generation where an LLM generates prompts for subsequent media generation steps. [Input] → [LLM: Image Prompt] → [Image Gen] → [LLM: Video Prompt] → [Video Gen] → [Output]

    2. Parallel Processing (Fan-Out)

    Executing multiple independent processes from a single hub node. All parallel nodes depend on the hub, but do not depend on each other. [Hub Node] → [Process A/B/C] → [Merge] → [Output]

    3. Multi-Destination Campaign

    A complex pattern for generating multiple variations (e.g., for different marketing destinations) and merging them into a single output. [Input 1..N] → [Vision LLM/Edit/Upscale/Video Gen] → [Merge Videos] → [Output]

  4. Select deliverables using the Channel Matrix

    main

    Use the Channel Matrix to determine the required aspect ratios and asset types for specific distribution channels:

    ChannelUseful deliverables
    TikTok/Reels/Shorts9:16 hook video, creator variant, product b-roll
    Meta paid social1:1 and 4:5 stills, 9:16 video, retargeting proof
    Landing pagehero image, product detail, comparison visual, feature cards
    Emailheader image, product still, feature/detail graphic
    Displaywide banner safe zones, simple product and benefit visual
    App store/Product pageclean screenshots, feature visualization, icon-safe crops
  5. Plan shot duration and multi-prompt beats for Kling v3

    main

    When planning the video sequence using multi_prompt, follow these constraints to ensure valid Kling execution:

    Hard Rules:

    • Beat Duration: Each multi prompt must be at least 3 seconds.
    • Total Duration: The total video duration must be 15 seconds or less.
    • Prompt Count: Use between 2 and 5 multi prompts.
    • Duration Sync: Set the top-level Kling duration equal to the sum of all beat durations.
    • Prompt Length: Keep Kling prompts concise (250-430 characters).

    Recommended Patterns:

    • Simple cutaway: 2 beats, 6 seconds total.
    • Standard reaction: 3 beats, 9 seconds total.
    • Rich fan-cam moment: 4 beats, 12 seconds total.
    • Full story beat: 5 beats, 15 seconds total.
  6. Implement Contact sheet then slice pattern

    main

    Use this pattern for generating character poses, product angles, style variants, or dataset panels. Instead of generating multiple separate images, you generate a single grid (contact sheet) and then process the individual panels.

    Rules:

    • Generate all panels in a single image to ensure visual consistency.
    • Prompt for an exact grid layout and specify no visible borders or gaps.
    • If the crop utility requires percentage coordinates, crop by percentage.
    • Perform upscaling after the cropping step to ensure final quality.
    generate grid -> crop panel 1..N -> upscale panel 1..N -> optional video
  7. Using Kling Video-to-Video Edit and Reference modes

    main

    Kling provides two distinct modes for video-to-video tasks:

    Edit Mode (/edit)

    Changes specific content while preserving the original motion. Best Practice: Explicitly state what to change and what to preserve. Example: Change: the sky becomes a starry night with a visible moon. Preserve: the subject, all motion, the foreground composition, the camera move.

    Reference Mode (/reference)

    Restyles the entire video to match a specific style cue (e.g., "transform into watercolor").

  8. Quality Gate and Output Requirements for Fan Cam

    main

    The Fan Cam skill follows a strict quality gate process to ensure high-fidelity video production. When using this skill, the following constraints and behaviors are applied to the generation pipeline:

    Image Generation (GPT Image 2)

    • High Quality Default: Uses quality=high and image_size={"width":3840,"height":2160} unless an economy or preview run is explicitly requested.
    • Person Photo Handling: If a person's photo is provided, a GPT Image 2 edit frame is generated and approved before being passed to Kling. Raw photos are not sent directly to Kling as the start frame to ensure consistency.

    Video Generation (Kling v3)

    • Endpoint Selection: Uses fal-ai/kling-video/v3/pro/image-to-video by default. Use economy/preview or native 4K requests to override this.
    • Audio: Kling requests always include generate_audio=true.
    • Prompting Constraints: multi_prompt cannot be combined with end_image_url.
    • Element Referencing: Every beat must reference @Element1 when using a real Kling elements entry.

    Timing and Duration

    • Beat Durations: Each multi-prompt duration must be at least 3 seconds.
    • Total Duration: The total video duration is capped at 15 seconds.
    • Consistency: The top-level Kling duration must equal the sum of all beat durations.

    Output Format

    The skill returns a compact manifest containing:

    • endpoint_ids
    • request_ids
    • model_settings
    • prompts used
    • output_urls
    • downloaded_files
    • Any visible defects detected during the quality gate.
  9. Smart dispatch for image restoration by defect type

    main

    The Image Restoration recipe acts as a smart dispatcher. To achieve the best results, identify the dominant defect in the source image and select the corresponding specialist endpoint:

    DefectEndpoint
    Motion blur, focus blurfal-ai/nafnet/deblur
    Sensor noise, ISO grainfal-ai/nafnet/denoise
    Atmospheric haze, fogfal-ai/mix-dehaze-net
    Distorted, low-res, or damaged facefal-ai/codeformer
    Scanned document (text legibility)fal-ai/docres

    If multiple defects are present, you should chain the processes (e.g., denoise $\rightarrow$ deblur $\rightarrow$ upscale).

  10. Understand the Genre and Era axes for realism

    main

    To avoid the 'AI-render' look, treat a realism prompt as a combination of two independent, orthogonal axes. You must pick exactly one from each axis and commit to them.

    Axis 1: Genre

    Defines the 'type' of photo. Examples include:

    • Candid Phone: Reads as a mobile shot (24-26mm, computational HDR, motion blur).
    • Editorial Portrait: Professional human shots (85-105mm, shallow depth, soft side-lighting).
    • Documentary/Photojournalism: Street or interior captures (28-35mm, deep focus, natural scene lighting).
    • Studio Commercial: Product or fashion shots (50-100mm, shaped directional lighting, controlled surfaces).
    • Food: Macro shots (50mm/100mm, downward angle, window light).
    • Nature/Landscape: Environmental shots (16-35mm or 70-200mm, specific time-of-day lighting).
    • Architectural/Interior: Room shots (24mm or 17mm tilt-shift, motivated lighting).

    Axis 2: Era and Stock

    Defines 'when' and 'on what' the image was captured. Examples include:

    • Modern Digital: Today on a smartphone.
    • Mid-2010s DSLR: Mirrorless/DSLR look.
    • Film Eras: 35mm film 1990s (Portra 400), color-negative 1970s (Kodachrome), black-and-white 1960s (Tri-X).
    • Historical: 1880s tintype, daguerreotype-style.

    Rule: Do not mix multiple genres or multiple eras in a single prompt, as this often triggers the characteristic AI-generated aesthetic.

  11. How fal-site works

    main

    The generation process follows three main steps:

    1. Brief extraction: Uses openrouter/router to transform your input context into a structured JSON brief containing brand details, taglines, sections, tone, palette hints, and hero image prompts.
    2. Variant generation: For each design direction, an LLM generates a complete, single-file index.html using Tailwind via CDN.
    3. Hero image: fal-ai/gpt-image-2 renders a cinematic hero image for each variant. The image is downloaded and inlined as a data: URI to ensure the HTML file is standalone.
  12. Configure Planner nodes for workflow generation

    main

    A Planner node is responsible for producing the workflow graph, shot table, or variant matrix. To prevent interpretation drift during execution, the output must be highly structured.

    Ensure the Planner node includes:

    • node_ids
    • Dependencies
    • Intended endpoint role
    • Inputs
    • Expected outputs

    Keep creative planning logic separate from the executable parameters.