/save-prompt
Generalize the current discussion into a reusable prompt and save it as a file
$ npx -y skills add NikiforovAll/claude-code-rules --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/save-prompt
Context preview
What this command does when you run it.
Generalize the current discussion into a reusable prompt and save it as a file
Command definition
save-prompt.mddescription: 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}Read more
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}A collection of Claude Code recommendations and practices. Learn practical techniques to enhance your AI-assisted development workflow with Claude Code.
Other commands on claude-code-rules.
- /update-component-reference
description: Add plugin components to the website docs, including component reference pages, plugin index entries, and plugin READMEs argument-hint: Component or plugin to document (e.g., "skill glab", "agent code-reviewer", "plugin handbook-reflect") allowed-tools:
Open command - /version-bump
Bump versions across the monorepo during release process
Open command - /explain
Provide clear explanations of code, concepts, and system behavior with educational clarity
Open command - /five-whys
Use the "Five Whys" root cause analysis technique to deeply understand problems.
Open command - /prompt-generator
Generate effective prompts for Claude 4.5 Sonnet to achieve user-defined outcomes
Open command - /reflect
Create a reflective analysis of the current Claude Code session, focusing on techniques, patterns, lessons learned, and workflow improvements.
Open command

