diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-12 22:23:45 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-12 22:23:45 +0200 |
| commit | 61e3f0be5f13d4bde1344fb46cca606354a233cd (patch) | |
| tree | a9e547cca1796c48dac445c351539de2329ab8ac | |
| parent | 76ea4208c520879c4a89d74483783b6cfb3af3ed (diff) | |
feat: add design_prompt meta-prompt for implementation planningv0.21.0
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
| -rw-r--r-- | docs/mcp-prompts.md | 55 | ||||
| -rw-r--r-- | internal/promptstore/default_prompts.go | 31 | ||||
| -rw-r--r-- | internal/promptstore/store_test.go | 6 |
3 files changed, 87 insertions, 5 deletions
diff --git a/docs/mcp-prompts.md b/docs/mcp-prompts.md index 777af5b..260760b 100644 --- a/docs/mcp-prompts.md +++ b/docs/mcp-prompts.md @@ -203,6 +203,61 @@ Claude: (Updates the prompt using MCP prompts/update) **Tags**: meta, prompt-management, interactive +### design_prompt +Interactively design a brand new prompt template from scratch with minimal questions. + +**How it works**: +1) Claude asks what the prompt should do (1-2 sentences) +2) Claude asks what arguments it needs (if any) +3) Claude asks for metadata (name, title, tags) +4) Claude shows a preview of the complete prompt +5) After you approve, Claude saves it using the MCP prompts/create method + +**Arguments**: None (fully interactive) + +**Usage Example**: +``` +You: /design_prompt + +Claude: What should this prompt do? + +You: Review database schemas and suggest optimizations for performance and best practices + +Claude: What arguments does it need? + +You: schema (required), db_type (optional) + +Claude: Prompt name, title, and tags? + +You: Name: review_db_schema + Title: Database Schema Review + Tags: database, schema, review + +Claude: Here's your prompt: + + ```json + { + "name": "review_db_schema", + "title": "Database Schema Review", + "description": "Review database schemas and suggest optimizations for performance and best practices", + "arguments": [ + {"name": "schema", "required": true}, + {"name": "db_type", "required": false} + ], + "messages": [...], + "tags": ["database", "schema", "review"] + } + ``` + + Should I save this? + +You: Yes + +Claude: (Saves the prompt using MCP prompts/create) +``` + +**Tags**: meta, prompt-management, interactive, creation + **Note**: Built-in prompts (including these meta-prompts) cannot be modified or deleted. If you need to customize a built-in, create a new prompt with a different name. ## Creating Custom Prompts diff --git a/internal/promptstore/default_prompts.go b/internal/promptstore/default_prompts.go index acfbe9a..f8edefc 100644 --- a/internal/promptstore/default_prompts.go +++ b/internal/promptstore/default_prompts.go @@ -6,8 +6,8 @@ import ( ) // DefaultPrompts returns the built-in meta-prompts for prompt management. -// These prompts help users create and update prompts interactively using Claude's -// access to conversation context. +// These prompts help users create, update, delete, and design prompts interactively +// using Claude's access to conversation context. func DefaultPrompts() []Prompt { now := time.Now() @@ -181,5 +181,32 @@ Ask me to confirm the deletion of '{{prompt_name}}'.`, Created: now, Updated: now, }, + { + Name: "design_prompt", + Title: "Design New Prompt from Scratch", + Description: "Interactively design a brand new prompt template through guided questions. Claude will help you define the purpose, arguments, message flow, and metadata step by step, show a preview, and wait for approval before saving.", + Arguments: []PromptArgument{}, + Messages: []PromptMessage{ + { + Role: "user", + Content: MessageContent{ + Type: "text", + Text: `I want to design a brand new prompt template from scratch. + +Please ask me: +1) What should this prompt do? (describe the task/purpose in 1-2 sentences) +2) What arguments does it need? (if any - use {{argument}} syntax) +3) Prompt name (lowercase, underscores only), title, and tags + +Then show me a preview and save it after I approve. + +Keep questions brief and focused.`, + }, + }, + }, + Tags: []string{"meta", "prompt-management", "interactive", "creation"}, + Created: now, + Updated: now, + }, } } diff --git a/internal/promptstore/store_test.go b/internal/promptstore/store_test.go index 2c95ad7..1ec784a 100644 --- a/internal/promptstore/store_test.go +++ b/internal/promptstore/store_test.go @@ -84,9 +84,9 @@ func TestJSONLStore_List(t *testing.T) { t.Fatalf("List() error = %v", err) } - // Should have all prompts (7 user + 3 built-ins) - if len(prompts) != 10 { - t.Errorf("List() got %d prompts, want 10 (7 user + 3 built-ins)", len(prompts)) + // Should have all prompts (7 user + 4 built-ins) + if len(prompts) != 11 { + t.Errorf("List() got %d prompts, want 11 (7 user + 4 built-ins)", len(prompts)) } // No cursor for full list |
