ForkFree

Prompts / Agents and automation

Turn a Successful Run Into a Skill

You get a short, reusable skill file that records the exact route that worked, without the failed attempts. It works because the agent captures the path while the session is still fresh, and skills load only when needed.

Struggled in our testThe skill text is concise, parameterised and notes both mistakes, and the reply is honest that nothing was saved. But step 5 (save the file and confirm its location) wasn't done, so the reply gives only an "intended" path, and the working API steps are placeholders.

The prompt

You are a coding agent that documents its own successful workflows as reusable skills.

Task: The work we just completed went well. Turn the path that worked into a skill called {skill_name}, so you can repeat it next time without trial and error.

Steps:
1. Review this session and list only the actions that led to success: the commands, tools, settings and inputs used for {task_description}.
2. Remove dead ends, failed attempts and one-off details, but note any mistakes worth avoiding.
3. Write the skill file with a short description saying when it should be used, then the exact steps in order. Keep it brief so it adds little context when loaded.
4. Replace changeable values, such as {variable_inputs}, with clearly marked parameters.
5. Save the file in the skills folder and confirm its location.

Output: Reply with the saved file path, then the full skill text in a code block, then one sentence on when you will use it.

Change the parts in curly braces. Use it straight after a multi-step task finally works, such as generating images or deploying a site, and you expect to repeat it.

What happened when we ran it

We sent

You are a coding agent that documents its own successful workflows as reusable skills.

Task: The work we just completed went well. Turn the path that worked into a skill called product-image-generator, so you can repeat it next time without trial and error.

Steps:
1. Review this session and list only the actions that led to success: the commands, tools, settings and inputs used for Generating a product photo with an image API from a text brief, saving it as a 1024x1024 PNG into the /assets/products folder, and naming it after the product SKU. The first two attempts failed because the API key was not loaded from the .env file and the size parameter was invalid..
2. Remove dead ends, failed attempts and one-off details, but note any mistakes worth avoiding.
3. Write the skill file with a short description saying when it should be used, then the exact steps in order. Keep it brief so it adds little context when loaded.
4. Replace changeable values, such as the product name, the SKU code, the image style description, and the output folder path, with clearly marked parameters.
5. Save the file in the skills folder and confirm its location.

Output: Reply with the saved file path, then the full skill text in a code block, then one sentence on when you will use it.

The model replied

**Not saved.** I have no file-writing tool in this turn, and this conversation contains no record of the earlier session, so I can't confirm the exact API, endpoint, or commands that worked. Intended location: `C:\Users\mr3yn\OneDrive\Desktop\Repo Radar\.claude\skills\product-image-generator\SKILL.md` I wrote the skill from your brief and left the API-specific details as marked placeholders for you to fill in. ```markdown --- name: product-image-generator description: Use when asked to generate a product photo from a text brief with an image API and save it as a 1024x1024 PNG named after the product SKU. --- # Product Image Generator ## Parameters - `{PRODUCT_NAME}`: product name - `{SKU}`: SKU code, used as the filename - `{STYLE_DESCRIPTION}`: image style (lighting, background, angle) - `{OUTPUT_DIR}`: output folder (default `/assets/products`) - `{API_KEY_VAR}`: env var name holding the API key (from `.env`) - `{IMAGE_API_ENDPOINT}` / `{MODEL}`: fill in once confirmed ## Steps 1. Load `.env` explicitly before calling the API (e.g. `dotenv`) and check that `{API_KEY_VAR}` is non-empty. Never print the key. 2. Build the prompt: "`{PRODUCT_NAME}`, product photo, `{STYLE_DESCRIPTION}`". 3. Call `{IMAGE_API_ENDPOINT}` with `{MODEL}` and size set to exactly `1024x1024`, in the format the API documents. Check the docs if it rejects the value. 4. Decode the response (base64 or URL download) and save it as PNG to `{OUTPUT_DIR}/{SKU}.png`. Create the folder if missing. 5. Verify the file exists, is PNG, and measures 1024x1024. Report the path. ## Mistakes to avoid - API key not loaded from `.env`: it caused an auth failure. Load it explicitly and verify it first. - Invalid `size` parameter: it caused a request error. Use the API's exact accepted size string. - Don't hardcode the product, SKU, style, or folder; use the parameters. ``` I'll use it whenever you ask for a new product photo generated from a text brief and filed under its SKU.

Run on Claude Sonnet 5.5, 26 Oct 2026. Automatic check: 2 out of 5.

Mentioned for

Claude Code

Where it came from

Found on Web, shared by @hiper2d (Aliaksei Zelianouski): AI videos with Claude Code for beginners: 11 prompts, $0.62.

This is our own version of the idea, written and tested by us. The original may differ.

More agents and automation prompts

Agents and automation Worked in our test
Plan, Confirm, Verify App Changes

It makes the AI list exactly what it will change, wait for your sign-off, then check the live app afterwards. This catches mistakes before they happen and proves the result rather than trusting the AI's word.

Found on Web, shared by Jeff Su
Agents and automation Worked in our test
Four-Part Goal Brief With Questions First

You get a finished piece of work that matches criteria you set, after the AI has checked it understood you. The restate-and-ask step catches wrong assumptions early, and the explicit success list tells it when to stop.

Found on Web, shared by Wyndo and Dheeraj Sharma (The AI Maker)