Agent skill

Fal

by ericrisco in ericrisco/rsc-harness

A skill your agent uses when calling a fal.ai endpoint by id to generate image, audio, or video from JS/Python/curl: subscribe vs submit, queue states, ED25519 webhook signature verification…

MITAuto-check passedBackend & APIs

Install Fal

skills CLI
$ npx skills add ericrisco/rsc-harness --skill fal -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ericrisco/rsc-harness fal --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/fal .claude/skills/fal && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fal
GitHub stars
174
Token cost
~2.2k tokens
SKILL.md length
764 words
Files
6 (incl. scripts, references)
Skills in repo
233
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when calling a fal.ai endpoint by id to generate image, audio, or video from JS/Python/curl: subscribe vs submit, queue states, ED25519 webhook signature verification…

  • Calling a fal.ai endpoint by id to generate image
  • SKILL.md covers When NOT to use, Setup & auth, Pick a call mode and subscribe — block and stream…, plus 5 more sections
  • Runs Shell scripts from its folder; calls npm and pip; reaches rest.fal.ai; needs FAL_KEY
  • Video from JS/Python/curl: subscribe vs submit

What it does

Fal is an agent skill from ericrisco/rsc-harness. Use when calling a fal.ai endpoint by id to generate image, audio, or video from JS/Python/curl: subscribe vs submit, queue states, ED25519 webhook signature verification, per-call cost, or migrating off @fal-ai/serverless-client. NOT which model or art direction (that is ai-media); NOT the same models on another platform (that is replicate).

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `evals/README.md`, `evals/cases.yaml` and `references/models-and-cost.md`).

It sits in Backend & APIs, covering Webhooks, Serverless and Image generation. It works with fal and Python. The repository describes itself as: Your agent invents things because it has no memory, and can't touch your database because it has no arms. rsc is the meta-harness that gives it both, plus the trade to know the… The licence is MIT.

When your agent uses it

  • Calling a fal.ai endpoint by id to generate image
  • Video from JS/Python/curl: subscribe vs submit
  • ED25519 webhook signature verification
  • Migrating off @fal-ai/serverless-client

Example prompts

  • “/fal”

Requirements

  • Python 3
  • Node.js
  • A Bash shell
  • A credential in FAL_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit e3d5b33. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • npm
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • rest.fal.ai

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • FAL_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fal loads about 2.2k tokens when it runs, and up to ~4.4k if it reads all its reference files. Until then it costs about 87 tokens; SKILL.md has 764 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ericrisco/rsc-harness at commit e3d5b33, republished under its MIT licence (© ericrisco). 764 words, ~2,173 tokens.

Download SKILL.mdSave it as .claude/skills/fal/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
fal
description
Use when calling a fal.ai endpoint by id to generate image, audio, or video from JS/Python/curl: subscribe vs submit, queue states, ED25519 webhook signature verification, per-call cost, or migrating off @fal-ai/serverless-client. NOT which model or art direction (that is ai-media); NOT the same models on another platform (that is replicate).
tags
fal, fal-ai, inference, image-generation, video-generation, queue, webhooks, serverless
recommends
ai-media, replicate, replicate-images, modal, webhooks
origin
risco

fal

The wire to fal.ai's fast, pre-warmed media endpoints: call a model by id, control the queue, get the file back. fal is the fast-media path — latency-optimized image (FLUX, Seedream, SD), audio (TTS, music), and video (Veo, Wan, Kling, Hailuo) endpoints you invoke by id with FAL_KEY.

You own the mechanics: auth, call mode, queue states, webhook signatures, file I/O, per-call cost.

When NOT to use

You want…Go to
Which model / what to generate / art direction / multi-provider media pipelineai-media
The same kind of models on Replicate (replicate.run / predictions)replicate — images-specifically replicate-images
Renting a raw GPU pod you SSH into to train or custom-serverunpod
Deploying your own Python function as an autoscaling endpointmodal
Cheap hosted LLM text/chat completionstogether-fireworks
The generic provider-agnostic webhook receiver/verifier patternwebhooks

Rule: if you are not invoking a fal endpoint id with FAL_KEY, you are in the wrong skill.

Setup & auth

bash
# JS — current client. NOT @fal-ai/serverless-client (deprecated, migrate).
npm i @fal-ai/client          # latest 1.10.1

# Python
pip install fal-client
bash
export FAL_KEY="key_id:key_secret"
ts
import { fal } from "@fal-ai/client";
// Reads FAL_KEY from env automatically; or set it explicitly:
fal.config({ credentials: process.env.FAL_KEY });

Rule: never ship FAL_KEY to a browser bundle. Proxy every call through your own server. Why: a key in client-side JS lets anyone drain your account — fal endpoints bill per call with no per-request cap.

Pick a call mode

All three modes hit the same queue. Choose by how long the job runs and where you call it from.

SituationModeWhy
Need the result now, can block, single short job (image, short TTS)subscribeSubmits + auto-polls until done; feels synchronous, no polling code
Long job (video), batch, or running in a serverless/edge handler that can't hold a connectionsubmit + webhook_url (or poll)Returns a request_id instantly; result arrives later, no held connection
Trivially short call, you accept no queue controlrunDirect synchronous call — no status, no logs; drops on long jobs
ts
// Bad: run() on a 60s video — connection can drop, no retry, no progress.
const res = await fal.run("fal-ai/veo3", { input });

// Good: submit + webhook for anything that takes more than a few seconds.
const { request_id } = await fal.queue.submit("fal-ai/veo3", {
  input,
  webhookUrl: "https://api.example.com/fal/webhook",
});

subscribe — block and stream progress

ts
const result = await fal.subscribe("fal-ai/flux/dev", {
  input: { prompt: "a red bicycle on a wet street, cinematic" },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs?.forEach((l) => console.log(l.message)); // stream to user
    }
  },
});
console.log(result.data.images[0].url); // hosted output URL
python
import fal_client

def on_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
            print(log["message"])

result = fal_client.subscribe(
    "fal-ai/flux/dev",
    arguments={"prompt": "a red bicycle on a wet street, cinematic"},
    with_logs=True,
    on_queue_update=on_update,
)
print(result["images"][0]["url"])

Python has an async twin for every method — subscribe_async, submit_async, run_async. Use them inside an event loop.

submit + queue polling

When you cannot or will not block, submit and poll the queue yourself.

ts
const { request_id } = await fal.queue.submit("fal-ai/flux/dev", { input });

// Poll. Status moves IN_QUEUE -> IN_PROGRESS -> COMPLETED.
const status = await fal.queue.status("fal-ai/flux/dev", {
  requestId: request_id,
  logs: true,
});

// Once COMPLETED, fetch the result.
const result = await fal.queue.result("fal-ai/flux/dev", { requestId: request_id });
console.log(result.data.images[0].url);

Rule: back off between polls — start at ~1s, grow to a few seconds. Why: a tight while loop polling queue.status hammers the API and gains nothing; the job finishes when it finishes. For anything long-running, prefer a webhook over any polling at all.

Webhooks

Pass webhook_url (camelCase webhookUrl in the JS client) on submit; fal POSTs the result when the job finishes.

jsonc
// Success
{ "request_id": "...", "gateway_request_id": "...", "status": "OK", "payload": { /* result */ } }
// Failure
{ "request_id": "...", "status": "ERROR", "error": "..." }
// Result couldn't be serialized
{ "request_id": "...", "status": "OK", "payload": null, "payload_error": "..." }

Delivery facts you must design for:

  • The initial POST has a 15-second timeout. On timeout or non-2xx, fal retries up to 10 times over ~2 hours.
  • Therefore your handler must be idempotent — the same request_id can arrive more than once. Dedupe on request_id (e.g. an upsert keyed on it) before acting.
  • Verify the ED25519 signature before trusting the body — four X-Fal-Webhook-* headers + a JWKS fetched from https://rest.fal.ai/.well-known/jwks.json. Why: an unverified webhook endpoint is a public write to your DB / spend trigger.

The full verification (header parsing, JWKS caching, ±5-minute timestamp check, message construction, per-key verify) and a complete idempotent handler in Node and Python live in references/queue-and-webhooks.md.

Show full SKILL.md (275 more words)Show less

File inputs and outputs

Upload a local file to get a URL, then pass that URL into input for image-to-X jobs. Outputs always come back as hosted URLs.

ts
const url = await fal.storage.upload(file); // File/Blob -> hosted URL
const out = await fal.subscribe("fal-ai/flux/dev/image-to-image", {
  input: { image_url: url, prompt: "make it snow" },
});
python
url = fal_client.upload_file("input.png")
out = fal_client.subscribe(
    "fal-ai/flux/dev/image-to-image",
    arguments={"image_url": url, "prompt": "make it snow"},
)

Cost control

Pricing is pay-per-use, per-model unit — never flat. The unit differs by model, so always read the model's pricing tab before you ship a loop.

UnitUsed by2026 example
Per imageimage diffusionSeedream V4 ~$0.03/image
Per second of outputvideoWan 2.5 ~$0.05/s; Veo 3 ~$0.4/s
Per megapixelsome image modelsvaries — read the tab
GPU-hourfal-served computeA100 40GB $0.99/h, H100 80GB $1.89/h (2026-05-13)

Spend knobs, by modality:

  • Image: lower num_inference_steps, drop resolution / megapixels, cut num_images.
  • Video: shorten duration, lower fps/resolution — per-second pricing scales linearly.
  • Batch: fal batch inference is 50% of serverless price — use it for offline bulk jobs where latency does not matter.

Worked estimate: 500 Seedream V4 images at ~$0.03 ≈ $15 serverless, ≈ $7.50 on the batch path.

The full model-family map and per-modality knob list live in references/models-and-cost.md.

Anti-patterns

Anti-patternWhy it bitesDo instead
FAL_KEY in a browser bundleAnyone reads it and bills your accountProxy through your server
run for a 30–60s videoConnection drops, no retry, no progresssubmit + webhook_url
Webhook handler with no signature checkPublic write / spend trigger anyone can forgeVerify ED25519 against the JWKS
Non-idempotent webhook handler10 retries over 2h create duplicate side effectsDedupe on request_id
Ignoring the model's pricing unit"$0.05" is per-second, not per-video — surprise billRead the pricing tab; pick the right knob
Tight while loop on queue.statusHammers the API, gains nothingBack off, or use a webhook
@fal-ai/serverless-clientDeprecated; missing fixes and APIs@fal-ai/client (v1.10.1)

© ericrisco, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in skills/fal of ericrisco/rsc-harness.

  • SKILL.md
  • evals/README.md
  • evals/cases.yaml
  • references/models-and-cost.md
  • references/queue-and-webhooks.md
  • scripts/verify.sh

Open the folder on GitHubat commit e3d5b33

Compare with similar skills

Fal next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Fal compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fal this skillericrisco/rsc-harness174—~2.2kAutomated safety check: PassMIT
Adobe App Builder Action Scaffolderadobe/skills197—~3.1kAutomated safety check: PassApache-2.0
2D Map and Scene Generator0x0funky/agent-sprite-forge4.4k—~2.9kAutomated safety check: PassMIT
2D Sprite Generator0x0funky/agent-sprite-forge4.4k—~3.6kAutomated safety check: PassMIT
Image Generation Gatewayscalesthio/generative-media-skills193—~20kAutomated safety check: PassMIT
Fal AIhoodini/ai-agents-skills282—~2.1kAutomated safety check: NotesNone

Similar skills

  • Scaffolds, implements, deploys and debugs Adobe Runtime actions in App Builder projects, with templates for webhooks, events, database CRUD, sequences and Asset Compute workers.

    197 GitHub stars~3.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • 2D Map and Scene Generator

    0x0funky/agent-sprite-forge

    Plans and builds 2D game maps and scenes, from tilemaps and parallax backgrounds to HD-2D plates, with collision checks, a playable HTML preview and Tiled, Godot or LDtk export.

    4.4k GitHub stars~2.9k tokensUpdated 2 days ago
    Game DevelopmentAuto-check passed
  • 2D Sprite Generator

    0x0funky/agent-sprite-forge

    Produces game-ready 2D characters, creatures, props, icons and effects as master stills, sheets or clips, and exports frames for common game engines.

    4.4k GitHub stars~3.6k tokensUpdated 2 days ago
    Game DevelopmentAuto-check passed
  • Image Generation Gateways

    calesthio/generative-media-skills

    Select, integrate, and operate multi-model image-generation gateways with model-specific schema discovery, version policy, asynchronous jobs, webhooks, spend approval, safe inputs and artifacts…

    193 GitHub stars~20k tokensUpdated 2 mo ago
    Media & CreativeAuto-check passed
  • Fal AI

    hoodini/ai-agents-skills

    Generate images, videos, and audio with fal.ai serverless AI.

    282 GitHub stars~2.1k tokensUpdated 2 mo ago
    Media & CreativeAuto-check: notes
  • AWS Serverless Eda

    zxkane/aws-skills

    AWS serverless and event-driven architecture expert based on Well-Architected Framework.

    367 GitHub starsUsed in 4 repos~3.2k tokens
    Backend & APIsAuto-check passed

More from ericrisco/rsc-harness

All 233 skills in this repo
  • Ab Testing

    ericrisco/rsc-harness

    A skill your agent uses when designing or analyzing a controlled experiment — falsifiable hypothesis, sample size from an MDE, reading significance/CI/power, CUPED, or rescuing tests that won't go…

    174 GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Accessibility

    ericrisco/rsc-harness

    A skill your agent uses when making a web UI conform to WCAG 2.2 Level AA — axe-core or Lighthouse a11y violations, keyboard operability, focus management, ARIA roles/names/live regions, contrast…

    174 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Ads

    ericrisco/rsc-harness

    A skill your agent uses when running or fixing paid acquisition on Google or Meta — campaign structure (Performance Max, Demand Gen, Search, Advantage+), platform-fit creative, budget/scaling rules…

    174 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Agent Eval

    ericrisco/rsc-harness

    A skill your agent uses when measuring whether an LLM or agent system actually got better and gating merges on it: golden sets, fixing an inflated LLM-as-judge, scoring RAG (faithfulness, contextual…

    174 GitHub stars~3.2k tokensUpdated yesterday
    Auto-check passed
  • AI Media

    ericrisco/rsc-harness

    A skill your agent uses when a creative goal must become a finished media file: pick and order generative-media models per modality — AI voiceover, image-to-video clips, score — then glue them with…

    174 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed
  • Analytics

    ericrisco/rsc-harness

    A skill your agent uses when instrumenting product or web analytics — GA4/PostHog SDK wiring, event taxonomy, funnels, double-counted events, consent gating, PII scrubbing.

    174 GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Fal

What does Fal do?

A skill your agent uses when calling a fal.ai endpoint by id to generate image, audio, or video from JS/Python/curl: subscribe vs submit, queue states, ED25519 webhook signature verification…. Fal is an agent skill from ericrisco/rsc-harness.ai endpoint by id to generate image, audio, or video from JS/Python/curl: subscribe vs submit, queue states, ED25519 webhook signature verification, per-call cost, or migrating off @fal-ai/serverless-client.

When should I use Fal?

Fal fits situations like: calling a fal.ai endpoint by id to generate image; video from JS/Python/curl: subscribe vs submit; ED25519 webhook signature verification; migrating off @fal-ai/serverless-client.

How do I install Fal in Claude Code?

Run `npx skills add ericrisco/rsc-harness --skill fal -a claude-code`. Or copy the skill folder (skills/fal in ericrisco/rsc-harness) into .claude/skills/fal in your project. Claude Code loads it when a task matches its description.

How do I install Fal in Codex?

Run `npx skills add ericrisco/rsc-harness --skill fal -a codex`. Or copy the skill folder (skills/fal in ericrisco/rsc-harness) into .agents/skills/fal in your project. Codex loads it when a task matches its description.

Can I use Fal in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ericrisco/rsc-harness --skill fal -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fal, .gemini/skills/fal, .github/skills/fal and .opencode/skills/fal in your project.

What does Fal need to run?

Going by SKILL.md and its folder, Fal needs a shell for the scripts in its folder, the command-line tools its instructions call (npm and pip) and credentials named FAL_KEY. Our summary lists: Python 3; Node.js; A Bash shell; A credential in FAL_KEY.

Does Fal access the network?

SKILL.md names 1 domain. In commands or code: rest.fal.ai; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Fal safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Fal use?

Fal is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fal use?

About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.2k tokens, read only when the agent opens those files.

What are the alternatives to Fal?

Skills that share tags, products or a category with Fal: Adobe App Builder Action Scaffolder (adobe/skills, 197 stars), 2D Map and Scene Generator (0x0funky/agent-sprite-forge, 4.4k stars), 2D Sprite Generator (0x0funky/agent-sprite-forge, 4.4k stars) and Image Generation Gateways (calesthio/generative-media-skills, 193 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fal?

ericrisco (a GitHub user) maintains it in ericrisco/rsc-harness, which has 174 GitHub stars. The repository holds 233 skills in this directory. The repository was last updated on October 7, 2026.

Source: ericrisco/rsc-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.