agentleFS
PicsArtPicsArt/gen-ai-skills/skills/generate-media/SKILL.md

generate-media

Skill7 starsChanged 20 days agoMITView on GitHub

Make an image, a video, a voice line, a sound or a song from a prompt, or edit a picture or product photo - remove or replace its background, enhance or upscale it, or turn it into a vector - with a model that fits, its settings checked and its price quoted before anything is charged. Also answers questions about models, prices, credits and Drive. Use when the user asks to generate, make or create an image, a video or audio, to edit a picture, to browse the models, or about a price, their credits or their Drive files. Load it first, before any tool, when they say not to ask, to work unattended, or set a spend limit. Load it before calling any Picsart model, generation or image tool.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

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

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

    When you read picsart_scene_capabilities or the recipe index (picsart_scene_recipe without name), pass useCase: "generate-media": the …

    line 15
  2. Distinctive:

    Read picsart-video-rules first.

    line 17
  3. Distinctive:

    Before acting on a stage, load the skills in its row that apply to this job, also when the work resumes there.

    line 22
  4. Distinctive:

    Read the request before you ask (picsart-video-rules's Asking).

    line 39
  5. Very specific:

    Every input is a URL: image on the edit tools, imageUrls and videoUrl on picsart_generate.

    line 58
  6. Very specific:

    A file on disk, and you can run shell commands: call picsart_upload_local_files with each file's name and bytes, run each command it …

    line 62
  7. Very specific:

    A file you cannot reach: call picsart_drive_upload_ask and end the turn.

    line 66
  8. Very specific:

    The model: When the user named one, use it.

    line 81
  9. Very specific:

    ASK with picsart_model_choose where the host draws it, otherwise in text as the host notes say: three candidates from picsart_model_catalog …

    line 82
  10. Distinctive:

    Never name the model to the user unless they asked about models (picsart-video-rules's Tools).

    line 97
  11. Very specific:

    Never take a setting from a model with a similar name.

    line 102
  12. Very specific:

    When the balance from picsart_credits is short of the quote, say by how much, and offer what costs less: fewer outputs (count), a lower …

    line 121
  13. Distinctive:

    When the result carries a link to top up, give it exactly as returned.

    line 123
  14. Distinctive:

    All of these are free. Answer in a few lines.

    line 148
  15. Very specific:

    What a model can do: read picsart_model_params and say the gist: what it takes and its limits.

    line 153
  16. Very specific:

    Not enough credits: read picsart_credits, give the balance and what the call needed, and offer what costs less (stage 4).

    line 164
  17. Distinctive:

    Never send the same settings again.

    line 170

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Make or edit an image, a video or audio

When you read picsart_scene_capabilities or the recipe index (picsart_scene_recipe without name), pass useCase: "generate-media": the answer leads with what this job reads and names the rest in one line.

Read picsart-video-rules first. One job: the user asks for one piece of media, or one edit of a picture, and gets it with no failed call and no surprise charge. A whole video project is another use case: when the user wants their footage cut, a screen recording turned into a video, a film or an animated design, start that use case instead.

Before acting on a stage, load the skills in its row that apply to this job, also when the work resumes there.

StageGateSkills
1. What to make, and from whatASK—
2. The user's files, as URLs——
3. The model and its settingsASKfilm-shot-generation, sd2-pe, sd25-pe
4. The quoteSPEND—
5. Run it—film-shot-generation
6. Show itSHOW—

A question that makes nothing (which models there are, a model's settings, a price, the balance, a Drive folder) skips the stages: answer it as Questions that make nothing says, and charge nothing.

1. What to make, and from what

Read the request before you ask (picsart-video-rules's Asking). Most say all of it: the medium, the subject, and any picture or clip to start from. Say back what follows from it in one line ("a 9:16 image for a story"). ASK (with your host's own question tool, such as AskUserQuestion, so the options are buttons the user taps, the recommended one first; only where the host has none, the options numbered in one message; in unattended pace, never ask: write it to the project record's openDecisions with the answer you assumed, as picsart-video-rules says) only for what is open and changes the result: the medium when it is not said, the frame when the destination does not set it, a voice or a song when "audio" is not said.

An edit names its tool by what it does to the picture:

The user wantsToolIts input
The background removed, the subject cut outpicsart_image_remove_bgimage
The background replaced ("put it on a beach")picsart_image_change_bgimage, and prompt for the new background
Sharper, cleaner or bigger ("make it 4k")picsart_image_enhanceimage, and scaleFactor when they gave one
A vector, an SVGpicsart_image_vectorizeimage

Each picks its own model. Before a vector of a photo, say once that photos vectorize poorly and logos, icons and simple graphics well. Anything else is made with picsart_generate.

2. The user's files, as URLs

Every input is a URL: image on the edit tools, imageUrls and videoUrl on picsart_generate. A URL a Picsart tool returned in this conversation is passed as it is, except a HEIC photo's (picsart-video-rules's Asset URLs). Otherwise:

  • A file on disk, and you can run shell commands: call picsart_upload_local_files with each file's name and bytes, run each command it returns with the path in place of {path}, and read the URL from what the command prints, where the tool's description says it is. The copy is temporary: to keep the file, save it with picsart_drive_upload (url, name).
  • A file you cannot reach: call picsart_drive_upload_ask and end the turn. The URL arrives with the user's next message.
  • An attachment the host hands you as a file object (download_url, file_id): pass it as file to picsart_drive_upload, and use the url in its result.
  • A file in their Picsart Drive: find it as Their Drive says, and use its url, never its downloadUrl.

Upload a file once, and reuse its URL for the rest of the conversation. Never pass a local path to a tool: when one is refused (local_source_not_supported, "Only https:// URLs or data: URIs"), get a URL as above and call again.

3. The model and its settings

An edit skips this stage. For picsart_generate:

  1. The model. When the user named one, use it. When they want to pick, ASK with picsart_model_choose where the host draws it, otherwise in text as the host notes say: three candidates from picsart_model_catalog (concise: false), each with what it is best for here, one marked recommended. When they want to look through all of them, open picsart_model_show with the mode and purpose: "generate". Otherwise choose it yourself:

    • an image: gpt-image-2.6-sunburst, as picsart-video-rules's Image generation and supplied photos says. Use a supported generation ratio and frame/crop to a wider canvas; never silently switch models. Its quality is max, xhigh, high, medium or low, complexity is high, medium or low, and resolution is 1K, 2K or 4K. It takes up to 16 imageUrls and ratios 1:1, 3:2, 2:3, 16:9, 9:16, 4:3, 3:4 and auto. Recheck the live schema; send neither reasoningEffort nor negativePrompt;
    • anything else: picsart_model_catalog with the mode, purpose: "generate", the inputType (t2v or i2v for a video, tts for a voice line, sfx for a sound, music for a song) and acceptsImage or acceptsVideo when the user brought one. Take the first row that holds the frame, the length and the inputs the request needs.

    Never name the model to the user unless they asked about models (picsart-video-rules's Tools).

  2. Its settings. For anything beyond prompt, read picsart_model_params for that model, and set only the settings it lists, with values it allows. A model's own settings, such as a start frame or a voice, go in extra. Correct a value whose meaning is clear without asking ("1920x1080" is aspectRatio: "16:9"); ASK (with your host's own question tool, such as AskUserQuestion, so the options are buttons the user taps, the recommended one first; only where the host has none, the options numbered in one message; in unattended pace, never ask: write it to the project record's openDecisions with the answer you assumed, as picsart-video-rules says) when two readings give different results. Never take a setting from a model with a similar name. A start or end frame goes first in imageUrls, and the prompt names it: "IMAGE 1 - START FRAME". On a Seedance model (seedance-…), read the film-shot-generation skill's Seedance reference first: it says when a frame may use the model's own start frame field instead, and how its edit and extend prompts are written. Then write the prompt with the sd25-pe skill (Seedance 2.5) or sd2-pe (Seedance 2.0).
  3. A video is drafted and prompted as picsart-video-rules's SPEND says (rules 5, 8 and 9): its key frames first, as stills, and every prompt compiled and verified, as the film-shot-generation skill says under Key frames and Compile and verify.

4. The quote

Every generation and every edit charges credits. Quote it, then SPEND (quote it in one line, then get the yes with your host's own question tool, such as AskUserQuestion, "Yes, go ahead" / "Yes, up to N credits for this task" / "No", never as a typed question; only where the host has no such tool, those options numbered in one message; unless a spend limit the user stated covers it: N credits or an explicit no-limit ("as much as needed"), never inferred from words like "go ahead". Within it, ask nothing: quote it in one line ("About 8 credits; 12 of 20 left after this"), call it, then say what it spent and what remains, keeping a running total that includes failed calls, and stop to ask before the first call that would cross it. A money amount is asked once to restate it in credits; in unattended pace, never ask: call only with a consent or a stated spend limit already recorded, otherwise write the quote to pendingSpends and stop, as picsart-video-rules says), as picsart-video-rules's SPEND says. picsart_preflight takes the model and the planned picsart_generate inputs as params, prompt included: it checks them against the model and estimates the price. Fix everything it reports before you quote. credits: null means the price is not known, never that it is free. The edit tools give no quote of their own: to price one, preflight the model id you will pass as its model (the default may pick a different model). If that gives no number, say it charges credits and the amount is not known in advance.

When the balance from picsart_credits is short of the quote, say by how much, and offer what costs less: fewer outputs (count), a lower resolution or a shorter length, or a cheaper model. When the result carries a link to top up, give it exactly as returned.

5. Run it

  • Several outputs of one prompt are count on one call; several different prompts on one model are items on one call (picsart-video-rules's SPEND, rule 4). Never loop calls: each call draws its own progress card.
  • A generation answers with a job. Follow it with picsart_job_status, passing the job and the model, and wait on it as picsart-video-rules's Tools says. With count or items the top-level job is only the first: pass each handle in jobs (an items entry's are in its own jobs) as job, one call each. Where the host draws widgets, the generation's card follows its jobs and posts the results back, so never ask the user to wait. Never send a generation again because it seems slow or the host timed out: it has usually finished and charged. Check the job, and for an async: false call look in their Drive first.
  • A result belongs to their Drive only when it says so (drive). With folderUid, a sync result is filed there before it returns (drive.uid); save an async one there with picsart_drive_upload once it completes.

6. Show it

SHOW each result, with one line on what it is: what was made, not how. Then offer one next step in a sentence (another take, a different frame, an edit), and do it only on a yes.

Questions that make nothing

All of these are free. Answer in a few lines; never paste a whole list or table.

  • Which models there are: open picsart_model_show with the mode they asked about, so they can look through them. When you only need the list yourself, read picsart_model_catalog instead.
  • What a model can do: read picsart_model_params and say the gist: what it takes and its limits.
  • What something would cost: picsart_preflight for the price, picsart_credits for the balance. Give both, and make nothing until they say yes (stage 4).
  • Their balance: picsart_credits. Give it exactly as returned.
  • Their Drive: picsart_drive_list with no folderUid lists the top level. To open a folder, read its uid from folders in that result and pass it as folderUid, with type to keep one kind of file: folderUid takes a uid, never a folder name.

When a call fails

  • Not enough credits: read picsart_credits, give the balance and what the call needed, and offer what costs less (stage 4). Never call it again until the user says they are ready.
  • Not signed in: making and editing need a signed-in Picsart account. Say so in one line and stop; the host asks them to sign in. Never retry.
  • A setting refused ("Invalid parameter", "Unsupported value", a length past the model's limit): read picsart_model_params, correct the value, and quote again if the price changed. Never send the same settings again.
  • The model is not found: find its id with picsart_model_catalog (provider with the part of the name you have), then call again with the id it lists.
  • A local path or a file refused: get a URL (stage 2), then call again.
  • The model is busy or the service errors: say it is busy right now, and offer to try again in a moment or with another model. Never loop the retry yourself.
  • A link from earlier stopped working: find the file in their Drive (picsart_drive_list), or offer to make it again.

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.