agentleFS
cookiedclawcookiedclaw/cookiedclaw-claude-code/skills/fal-setup/SKILL.md

fal-setup

Skill4 starsChanged 7 months agoMITView on GitHub

Wires up fal.ai for image / video generation in cookiedclaw. Saves FAL_KEY to ./.cookiedclaw/keys.env and registers fal's hosted HTTP MCP server in Claude Code's user-scope config. Invoke when the user explicitly asks to set up / install / enable fal.ai in their cookiedclaw workspace.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 3 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run pwd and confirm we're in a cookiedclaw workspace.

    line 15
  2. Very specific:

    If both are present, ask the user with AskUserQuestion:

    line 24
  3. Distinctive:

    If they pick cancel, exit cleanly.

    line 31
  4. Very specific:

    Wait for the key. Validate format — fal keys typically look like <id>:<secret> or start with fal_.

    line 39
  5. Very specific:

    If file already has a FAL_KEY= line, replace it.

    line 44
  6. Distinctive:

    Don't echo the key value back.

    line 47
  7. Very specific:

    If fal-ai is already registered, run claude mcp remove fal-ai -s user first, then re-add with the new key.

    line 69
  8. Very specific:

    Don't run claude mcp add without confirming the exact command first.

    line 82
  9. Distinctive:

    Don't echo the API key back in confirmations.

    line 83
  10. Very specific:

    Don't try to add fal-ai to a project-scope (.mcp.json) — user-scope is correct so non-cookiedclaw sessions also benefit.

    line 84

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “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

fal.ai integration

Standalone setup for the fal.ai integration. The user runs this when they want image / video generation (text-to-image, image editing, lipsync, video, etc.) available to the agent.

This skill is independent from /cookiedclaw:setup — call it when the user asks for "set up fal", "add image generation", or similar. It assumes the cookiedclaw workspace already exists (./.cookiedclaw/ directory). If it doesn't, point the user at /cookiedclaw:setup first.

Step 1 — Check workspace + existing config

Run pwd and confirm we're in a cookiedclaw workspace. A workspace has ./.cookiedclaw/keys.env (or at least the ./.cookiedclaw/ directory). If not:

"This doesn't look like a cookiedclaw workspace yet. Run /cookiedclaw:setup first to bootstrap one, then come back here."

Then check for existing config:

  • ./.cookiedclaw/keys.env — does it already have FAL_KEY?
  • claude mcp list — is fal-ai already registered?

If both are present, ask the user with AskUserQuestion:

  • Question: "fal.ai already looks set up. What now?"
  • Options:
    • Re-do — replace the key with a new one
    • Cancel — leave it as is

If they pick cancel, exit cleanly.

Step 2 — Get the fal key

Tell the user:

"Open https://fal.ai/dashboard/keys, create a new key, and paste it here."

Wait for the key. Validate format — fal keys typically look like <id>:<secret> or start with fal_. If it doesn't match, ask them to double-check.

Save to ./.cookiedclaw/keys.env:

  • mkdir -p ./.cookiedclaw first if needed
  • If file already has a FAL_KEY= line, replace it; otherwise append
  • chmod 600 ./.cookiedclaw/keys.env

Don't echo the key value back. Just say "saved".

Step 3 — Register the fal-ai MCP server

Use AskUserQuestion:

  • Question: "Register the fal.ai MCP server in Claude Code now? (Stores your token in CC's user-scope config so every session can use it.)"
  • Options:
    • Yes, register it
    • No, I'll do it manually later

On yes, run:

claude mcp add --transport http fal-ai \
  https://mcp.fal.ai/mcp \
  -s user \
  --header "Authorization: Bearer <value>"

-s user makes it available in every CC session, not just this workspace.

If fal-ai is already registered, run claude mcp remove fal-ai -s user first, then re-add with the new key.

Step 4 — Wrap up

Confirm: "fal.ai set up. After you restart Claude Code, both this Telegram session and any other CC session can call mcp__fal-ai__* tools (run_model, submit_job, recommend_model, etc.) for image / video generation."

Mention briefly:

  • The agent can now respond to "generate an image of …" by calling run_model and embedding the result with [embed:<url>].
  • For long jobs, use submit_job + check_job so the bot doesn't block on the wait.
  • ~/.cookiedclaw/keys.env (the OLD location) is not read anymore — keys live in the workspace's ./.cookiedclaw/keys.env.

Don'ts

  • Don't run claude mcp add without confirming the exact command first.
  • Don't echo the API key back in confirmations.
  • Don't try to add fal-ai to a project-scope (.mcp.json) — user-scope is correct so non-cookiedclaw sessions also benefit.

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.