# Saving prompts for cmd/ctrl +k instructions

**URL:** <https://forum.cursor.com/t/saving-prompts-for-cmd-ctrl-k-instructions/2546>\
**Category:** Feature Requests\
**Created:** [January 25, 2024, 7:36pm UTC](https://forum.cursor.com/t/saving-prompts-for-cmd-ctrl-k-instructions/2546 "2024-01-25T19:36:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![pjsandwich](https://avatars.discourse-cdn.com/v4/letter/p/ed655f/32.png) [@pjsandwich](https://forum.cursor.com/u/pjsandwich)\
**Post date:** [January 25, 2024, 7:36pm UTC](https://forum.cursor.com/t/saving-prompts-for-cmd-ctrl-k-instructions/2546/1 "2024-01-25T19:36:39Z")

</div>

I typically use the cmd/ctrl + k to create styles for a file or to edit code using simple instructions. I typically use the same prompts like “Create a stylesheet for this component and place the styles at the bottom of the file.” and it works wonderfully, but I’m wondering if we could save prompts somewhere and possibly reference them so that it could save some time and reduce small inconsistencies in applying instructions.

Basic outline of requested behavior:  
When using cmd/ctrl + k, you should be able to reference saved instructions.  
The instructions could either be saved in editor settings or the project, but preferably the editor settings.

---

<div class="post-metadata">

**Author:** ![iraklisg](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/iraklisg/32/4252_2.png) [@iraklisg](https://forum.cursor.com/u/iraklisg)\
**Post date:** [September 7, 2024, 6:10pm UTC](https://forum.cursor.com/t/saving-prompts-for-cmd-ctrl-k-instructions/2546/2 "2024-09-07T18:10:10Z")

</div>

This could be a great addition to Cursor. This is nicely implemented in Continue with [prompt files (experimental)](https://docs.continue.dev/features/prompt-files) and [custom slash commands](https://docs.continue.dev/customization/slash-commands#custom-commands-use-natural-language). I think this feature is missing in Cursor and I would love to add the ability to reuse commonly used prompts

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [September 7, 2024, 7:01pm UTC](https://forum.cursor.com/t/saving-prompts-for-cmd-ctrl-k-instructions/2546/3 "2024-09-07T19:01:46Z")

</div>

You can save prompts, for example, in a folder called “prompts” and refer to them when interacting with the AI.

---

<div class="post-metadata">

**Author:** ![iraklisg](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/iraklisg/32/4252_2.png) [@iraklisg](https://forum.cursor.com/u/iraklisg)\
**Post date:** [September 14, 2024, 9:33am UTC](https://forum.cursor.com/t/saving-prompts-for-cmd-ctrl-k-instructions/2546/4 "2024-09-14T09:33:41Z")

</div>

By “refer to them” you mean copy-pasting the contents from the file to the IDE prompt? Or you propose a more streamlined way?

EDIT: Perhaps something like [this](https://forum.cursor.com/t/context-groups-defining-collections-of-files-as-a-single-context-for-prompting/7405)?

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [September 14, 2024, 9:46am UTC](https://forum.cursor.com/t/saving-prompts-for-cmd-ctrl-k-instructions/2546/5 "2024-09-14T09:46:32Z")

</div>

It should be as a mention of a file, not as copy and paste.

 ![image](https://us1.discourse-cdn.com/cursor1/original/2X/0/07214ac604a95303838c51da20ff5da58ef78669.png)

---

<div class="post-metadata">

**Author:** ![tangjun](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/tangjun/32/16356_2.png) [@tangjun](https://forum.cursor.com/u/tangjun)\
**Post date:** [September 14, 2024, 4:24pm UTC](https://forum.cursor.com/t/saving-prompts-for-cmd-ctrl-k-instructions/2546/6 "2024-09-14T16:24:19Z")

</div>

This is really a good method. But I didn’t think of it.

---

<div class="post-metadata">

**Author:** ![gokcin](https://avatars.discourse-cdn.com/v4/letter/g/45deac/32.png) [@gokcin](https://forum.cursor.com/u/gokcin)\
**Post date:** [September 14, 2024, 8:15pm UTC](https://forum.cursor.com/t/saving-prompts-for-cmd-ctrl-k-instructions/2546/7 "2024-09-14T20:15:44Z")

</div>

I recommend using a gist or a github repo for storing your prompts. Than you can use the doc crawling feature in cursor to mention those prompts with @ symbol. This way, you don’t have to keep your propmpts locally.

---

<div class="post-metadata">

**Author:** ![jparkerweb](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jparkerweb/32/3680_2.png) [@jparkerweb](https://forum.cursor.com/u/jparkerweb)\
**Post date:** [September 14, 2024, 10:35pm UTC](https://forum.cursor.com/t/saving-prompts-for-cmd-ctrl-k-instructions/2546/8 "2024-09-14T22:35:43Z")

</div>

Why not just use Espanso?

---

<div class="post-metadata">

**Author:** ![ssmits](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@ssmits](https://forum.cursor.com/u/ssmits)\
**Post date:** [October 23, 2024, 7:03pm UTC](https://forum.cursor.com/t/saving-prompts-for-cmd-ctrl-k-instructions/2546/9 "2024-10-23T19:03:52Z")

</div>

Made a guide, default integration would be awesome [Smart customized Prompts on top of main System Prompt with espanso: A Practical Guide](https://forum.cursor.com/t/smart-customized-prompts-on-top-of-main-system-prompt-with-espanso-a-practical-guide/24374)

---

<div class="post-metadata">

**Author:** ![iraklisg](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/iraklisg/32/4252_2.png) [@iraklisg](https://forum.cursor.com/u/iraklisg)\
**Post date:** [March 26, 2025, 6:59am UTC](https://forum.cursor.com/t/saving-prompts-for-cmd-ctrl-k-instructions/2546/10 "2025-03-26T06:59:28Z")

</div>

Although Espanso provides a possible workaround, it is not a streamlined solution. I’ve proposed an approach for using sharable, configurable, reusable, and per-project-defined prompt files—see my comment [here](https://forum.cursor.com/t/use-prompts-in-chat-for-custom-prompts/357/9).

---

<div class="post-metadata">

**Author:** ![olejorgenb](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/olejorgenb/32/94761_2.png) [@olejorgenb](https://forum.cursor.com/u/olejorgenb)\
**Post date:** [June 21, 2025, 9:23am UTC](https://forum.cursor.com/t/saving-prompts-for-cmd-ctrl-k-instructions/2546/11 "2025-06-21T09:23:39Z")

</div>

It’s baffling to me that I’ve yet to see[1] an AI assistant system with a **composable** prompt language!

The suggestion of saving the prompt as text in a file is not a complete solution. The special constructs like @-syntax are not serializable to text (by the user).

I get that this would pose escaping issues - you would essentially need to define a new small mini language. Still - when you already have created the rich text editor for editing the prompt in the chat view - how hard can it possibly be to allow this to be used as a editor mode? Simplest solution: define the prompt language format to be the serialization of the document nodes (I’m sure Monaco allow serializing a document to json…). Use .cursor-prompt as an extension and use the already exsiting prompt editor to edit these json documents in a user friendly way.

Why is no-one doing this? I would allow much more powerful prompt libraries.

Also - such a prompt system should support optional parameters to be interpolated into the prompt template.

And people using these tools know how to code right, editing the raw prompt as, say, XML would be perfectly fine for composing a reusable prompt library…

[1] Well - I suppose Souregraph’s Cody implements something like this - at least it’s possible to add some @ constructs to their saved prompts. But the prompt format is not open, so it’s not possible generate them for instance. And last I checked the prompt editor was only available online.

I also see now that Zed support this, but only in the (legacy?) “text-thread” system
