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.
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
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.