Back to library
AI
best practice

Convert Successful Workflows into Custom Slash Commands

Press 's' after a workflow to convert it into a reusable slash command.

Turn temporary AI workflows into permanent shortcuts by saving them as slash commands. This allows you to invoke complex, multi-step automated tasks with a single forward-slash command in future sessions.

Qwen

The Scenario

You have just perfected a complex multi-step workflow for generating documentation or running a specific test suite and want to reuse it daily.

Before & after

The old way

You copy-paste successful prompts into a 'notes' file and manually re-run them or re-configure the settings every time you start a new session. This takes 3–5 minutes to set up each time.

With AI

After a successful run, press 's' to save the logic. Next time, just run /[YOUR_COMMAND_NAME] to execute the entire workflow in 2 seconds.

The Prompt

[EXECUTE_WORKFLOW]
s
[ASSIGN_SLASH_COMMAND_NAME]

Dynamic Workflows allow you to turn any successful interaction into a permanent shortcut. This is especially useful for recurring maintenance tasks or boilerplate generation.

Source

Qwen Code Blog: AI Coding Updates and Guides | Qwen Code Docs
"after a run, press s to save the script as a slash command — next time just type / to invoke it."