Use /save-prompt
Generalize the current discussion into a reusable prompt and save it as a file.
This command analyzes your conversation with Claude to extract the core intent and patterns, then creates a reusable prompt template that can be applied to similar scenarios in the future. It's perfect for capturing workflows you find yourself repeating.
When to Use​
Use /save-prompt when you want to:
- Capture a successful workflow - Turn a productive session into a reusable template
- Create custom prompts - Build your own prompt library from real interactions
- Standardize patterns - Extract repeatable task patterns for team use
Command Specification​
---
description: Generalize the current discussion into a reusable prompt and save it as a file
---
Generalize the current discussion into a reusable prompt that can be applied in similar contexts.
Think step by step:
1. Review the conversation to identify the user's primary goal or task pattern
2. If there is no conversation present, reply to the user that the `/save-prompt` prompt expects an active discussion to generalize. Keep the reply concise.
3. Generalize the task into a reusable prompt that could apply to similar scenarios
4. Extract the core intent, removing conversation-specific details (e.g., specific file names, variable names, or project-specific context)
5. Craft the generalized multi-line markdown text prompt, using placeholders where appropriate (e.g., "the selected code", "the current file", "the specified functionality")
6. Write a brief description (1 sentence, max 15 words) explaining the goal of the prompt
7. If applicable, define an argument-hint that describes the expected inputs for the prompt
8. Save the resulting prompt in a file`${promptFileName}.prompt.md`, where `${promptFileName}` is the concise action-oriented title in kebab-case format (e.g., `explain-code`, `generate-tests`, `refactor-functionality`)
Here's an example of the expected output format:
```
---
name: ${The concise title in kebab-case format. You can only use letters, digits, underscores, hyphens, and periods}
description: ${A brief description (1 sentence) explaining the goal of the prompt}
argument-hint: ${A description of the expected inputs for the prompt, if any}
---
${The generalized multi-line markdown text prompt}
```
Output Format​
The command generates a .prompt.md file with frontmatter:
---
name: action-oriented-name
description: Brief description of the prompt's goal
argument-hint: Expected inputs description
---
The generalized prompt content with placeholders...
Example Use Cases​
- After debugging a complex issue, save the troubleshooting approach
- After implementing a feature pattern, capture it as a template
- After a code review session, save the review methodology