fashn-logo

FASHNAI

Terug naar blog

Introducing the FASHN Skill for Coding Agents

The new FASHN skill helps Claude Code, Codex, Cursor, and other coding agents integrate FASHN into real projects with less documentation handoff. Learn how to install it, use it for project integration, and review the secure server-side pieces it adds.

Renan FerreiraAuteur
11 juni 2026
Introducing the FASHN Skill for Coding Agents omslagafbeelding

We are launching the FASHN agent skill, a new way to help coding agents understand how to integrate FASHN into your own projects.

Instead of pasting API docs into every chat, you can install the skill once and ask your agent to add FASHN features directly to your codebase. The skill teaches agents how to use the FASHN REST API, the official TypeScript SDK, and the Python SDK, including the prediction lifecycle, polling, response formats, errors, webhooks, and endpoint inputs.

It works with Claude Code, Codex, Cursor, and other coding agents that support skills.


Install the skill

Install the skill with skills.sh:

npx skills add fashn-ai/fashn-skill

Having trouble? Ask your coding agent to help you install the skill. It can check whether Node.js, npm, or npx is available on your machine and suggest the right setup steps for your environment.

The CLI auto-detects supported coding agents on your machine and configures the skill for each one.

The skill reads your FASHN API key from FASHN_API_KEY. If the variable is not set, the skill can ask for your key and help configure it for future runs. You can generate a key from the FASHN API setup page.

For project integrations, we recommend adding the key to your local environment file:

FASHN_API_KEY=your_api_key_here

Keep it server-side. Do not expose it with public environment variable prefixes such as NEXT_PUBLIC_.

If Claude Code or Codex is already open when you install the skill, restart the session so the agent can load the new instructions.


Why this matters for project integration

FASHN integrations usually touch more than one file. A production-ready virtual try-on or product-to-model feature often needs:

  • A secure server-side place to call the FASHN API
  • A FASHN_API_KEY environment variable that never reaches the browser
  • Input handling for model, product, pose, or reference images
  • A polling or subscription flow for long-running generations
  • Error handling that maps API failures to useful UI states
  • Optional webhooks, scripts, or background jobs for automated workflows

That is exactly the kind of work coding agents are good at, but only if they have the right context. The FASHN skill gives them that context before they start editing your app.

For example, you can point Claude Code or Codex at a Next.js, React Router, Django, FastAPI, Laravel, or custom backend project and ask for a specific feature:

Use FASHN to add a virtual try-on flow to this project.
Accept a model image and a product image, call FASHN server-side,
and return the generated result URL to the UI.

The agent can inspect the project structure, choose the right integration path, install the SDK when appropriate, add the backend call, and connect it to the existing UI conventions.


Using the skill in Claude Code and Codex

After installation, open Claude Code or Codex in your project and mention FASHN in your request. Be specific about the product behavior you want, not just the endpoint name.

Both agents can inspect your repository, identify the framework, and choose between REST, the TypeScript SDK, or the Python SDK based on what the project already uses. In a TypeScript app, that often means installing fashn and using client.subscribe(...) so the server-side code submits the job and waits for the final result. In other backends, REST may be the better fit.

For a Next.js app:

Use the FASHN skill to add product-to-model generation to this Next.js app.
Create a server action that accepts a product image URL and returns the generated on-model image URL.

For a Python worker:

Use the FASHN skill to add a Python script.
Read product images from ./input-products, generate on-model images with FASHN,
and write the results to ./output-results.

Claude Code and Codex can also run quick one-off generations by invoking the skill directly:

/fashn generate three on-model shots of this product for our product page
/fashn do a try-on with this model photo and this jacket

For one-off generations, make sure the agent can actually access the image inputs. In Codex Desktop, you can drag and drop images into the thread and reference them in your /fashn request. In Claude Code, point the agent to a local file path instead, for example:

/fashn do a try-on with ./images/model.jpg and ./images/jacket.png

One-off runs are great for testing prompts or assets, but persistent integrations are where the skill saves the most time: adding real FASHN-powered features into an app you already maintain.


What to ask the agent to build

The best prompts describe the user workflow and the project constraints. Here are a few good starting points.

Virtual try-on

Use FASHN to add virtual try-on to this app.
Users should upload a model photo and a product image.
Call FASHN only from server-side code, poll until the generation is complete,
and display the result image in the existing UI.

Product-to-model

Use FASHN to add product-to-model generation for our catalog workflow.
Accept a product image, generate multiple on-model outputs,
and store the returned image URLs using the existing database pattern.

Bulk Product to Model script

Use FASHN to build a bulk product-to-model script.
Read input image URLs from a CSV, submit jobs with FASHN,
handle failures, and write output URLs plus credit usage to a results file.

Review checklist for generated integrations

Even with a good skill, you should review the generated code before merging. For FASHN integrations, check that:

  • FASHN_API_KEY is read only from server-side code
  • The key is not logged, returned to the client, or committed to source control
  • The integration uses the same framework conventions as the rest of the project
  • Long-running jobs use subscribe or a clear run plus status polling flow
  • User-facing errors are helpful without exposing internal API details
  • Image inputs are validated before sending requests
  • Scripts include retry and failure handling if they run unattended
  • Credit usage and generated output URLs are stored where your product needs them

The skill can get you most of the way there. Your project knowledge still matters for permissions, billing rules, storage, and the exact user experience.


Start building

Install the skill:

npx skills add fashn-ai/fashn-skill

Then open Claude Code or Codex in your project and ask for the feature you want to ship.

For more details, read the FASHN coding agents documentation or explore the skill repository.

FASHN Blog | Introducing the FASHN Skill for Coding Agents