跳到正文
DEV Community· MRwilliam·· 1 小時前AI 評分49

DSH:我總是找不到真正會重用的提示詞

I kept losing the prompts I actually reuse

AI 導讀

作者為 DSH 編寫提示詞收納工具,可用 Ctrl+Shift+S 儲存選取文字或整份草稿,並一鍵插入遊標位置。提示詞按工作區分為「This project」和「General」,每部主機以 JSON 檔案儲存,最多保留 500 條。工具亦可用預設模型將筆記整理成提示詞,保留變數、路徑、URL 和程式碼,不添加原文沒有的內容。

正文

I keep reusing the same five prompts and losing them. Not the good ones — those live in notes. The half-written ones: a line I typed at midnight, a reply that finally explained a thing, a checklist I rewrote four times.

I tried a prompt library plugin. It wanted a title, tags, a folder, and a panel. By the time I filled that in, I had forgotten what I was doing.

The prompt pocket open over a session: a search box, two drawers, three saved prompts and a faint 24px dot in the corner

So I wrote the opposite: a 24px dot in the corner of DSH. Ctrl+Shift+S keeps whatever I was typing — the selection if there is one, the whole draft otherwise — and a click puts it back at the caret. Nothing new appears in the layout: no sidebar entry, no chip row above the composer, no panel that shifts the conversation.

Two things surprised me while building it.

The first: insert is not “append text”. The composer has a revision-guarded insert, so a quote chip or attachment you already had stays where it is, the whole thing is one undo step, and focus comes back to the input afterwards. Every DIY version I wrote before that just concatenated strings and quietly broke the draft.

The second: turning a note into a proper prompt is not polish. My first version asked the model to “clean up” the text, and it swapped synonyms and called it a day. What actually helps is asking for a prompt: the goal, the context, the steps, the output shape — with {{variables}}, paths, URLs and code blocks kept byte-for-byte, and nothing invented. If the note is already good, it should come back unchanged, not rewritten.

What it does

  • Saving never opens a dialog. No title prompt, no tags, no “where should this go”. A two-second line beside the dot says where it landed and offers a one-click move; the confirmation shows even while the panel is closed.
  • Two drawers, split by workspace rather than session. “This project” is visible to every session in the same workspace, “General” everywhere. Sessions get archived and forked; a prompt pinned to one session loses its home the moment that session moves. A bare session falls back to General instead of showing an empty drawer.
  • Rows are one line, the rest is on hover. 60 characters of the prompt with the lead-in (Goal:, Task:) stripped, and the first 300 characters on hover. ↑ ↓ walk the list with wrap-around, Enter inserts, Alt+Enter replaces the draft, Esc closes.
  • ✦ writes a DSH prompt; it does not paraphrase. The ✦ button and the button on the save confirmation use your current default model to produce a prompt: goal, context, ordered steps, output shape. Nothing gets invented: no tools, files, numbers or requirements that were not in the note, and no “be careful / ensure quality” filler.
  • A failed or empty generation never overwrites anything. You get the original and the result side by side, and accepting keeps the old text in a prior field, one click to go back.
  • One click on an assistant reply keeps it as source material, verbatim Markdown, read from the session log — only text blocks, so tool calls never leak into a prompt.
  • The agent uses the same pocket. A prompt_stash tool reads and writes the same file, and it respects the drawers, so one project’s prompts never show up in another project’s answer.
  • 500 prompts, least recently used dropped, one JSON file per host, atomic writes, no runtime dependencies, no account. Nothing leaves the machine except the one model call you explicitly ask for.

What it deliberately doesn’t do: tags, folders, an import wizard, a recycle bin, cloud sync. Each of those needs a panel, and a panel needs a decision every time you save — this tool exists so there is nothing to decide.

Source, both screenshots and the install line: https://www.dshtoolbox.com/plugins/dsh-prompt-stash/

Chinese page: https://www.dshtoolbox.com/zh/plugins/dsh-prompt-stash/

Repo: https://github.com/FindSomeSkills/dsh-prompt-stash

Not affiliated with the project, just a user.

來源:DEV Community · dev.to