Skip to content

Commit 7ce9f74

Browse files
authored
add savePrompt prompt (#1715)
1 parent d2d967b commit 7ce9f74

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

assets/agents/Plan.agent.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
name: Plan
23
description: Researches and outlines multi-step plans
34
argument-hint: Outline the goal or problem to research
45
tools: ['search', 'github/github-mcp-server/get_issue', 'github/github-mcp-server/get_issue_comments', 'runSubagent', 'usages', 'problems', 'changes', 'testFailure', 'fetch', 'githubRepo', 'github.vscode-pull-request-github/issue_fetch', 'github.vscode-pull-request-github/activePullRequest']
@@ -8,7 +9,7 @@ handoffs:
89
prompt: Start implementation
910
- label: Open in Editor
1011
agent: agent
11-
prompt: Save the plan to a markdown file, as is
12+
prompt: Save the resulting plan in a untitled file with URI `untitled:${promptFileName}.prompt.md`, where `${promptFileName}` can use letters, digit, underscores, hyphens, and periods. Add a frontmatter with `name` and `description`
1213
---
1314
You are a PLANNING AGENT, NOT an implementation agent.
1415

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: savePrompt
3+
description: Generalize the current discussion into a reusable prompt and save it as a file
4+
---
5+
Generalize the current discussion into a reusable prompt that can be applied in similar contexts.
6+
7+
Think step by step:
8+
1. Review the conversation to identify the user's primary goal or task pattern
9+
2. Generalize the task into a reusable prompt that could apply to similar scenarios
10+
3. Extract the core intent, removing conversation-specific details (e.g., specific file names, variable names, or project-specific context)
11+
4. Craft the generalized multi-line markdown text prompt, using placeholders where appropriate (e.g., "the selected code", "the current file", "the specified functionality")
12+
5. Create a very concise action-oriented title in camelCase format that will be used for the slash command (1-3 words, e.g., "generateUnitTests", "refactorForPerformance", "explainApiDesign", etc)
13+
6. Write a brief description (1 sentence, max 15 words) explaining the goal of the prompt
14+
7. If applicable, define an argument-hint that describes the expected inputs for the prompt
15+
8. Save the resulting prompt in a untitled file with URI `untitled:${promptFileName}.prompt.md`, where `${promptFileName}` is the concise action-oriented title from step 5
16+
17+
Here's an example of the expected output format:
18+
```
19+
---
20+
name: ${The concise title in kebab-case format. You can only use letters, digits, underscores, hyphens, and periods}
21+
description: ${A brief description (1 sentence) explaining the goal of the prompt}
22+
argument-hint: ${A description of the expected inputs for the prompt, if any}
23+
---
24+
${The generalized multi-line markdown text prompt}
25+
```
26+

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4247,6 +4247,13 @@
42474247
"path": "./assets/agents/Plan.agent.md",
42484248
"description": "Researches a task to create multi-step plans"
42494249
}
4250+
],
4251+
"prompts": [
4252+
{
4253+
"name": "savePromptFile",
4254+
"path": "./assets/prompts/savePromptFile.prompt.md",
4255+
"description": "Generalize the current discussion into a reusable prompt and save it as a file"
4256+
}
42504257
]
42514258
},
42524259
"extensionPack": [

0 commit comments

Comments
 (0)