prompt-deck
Bu projede sık gönderdiğiniz kısa prompt'ları öğrenen ve onları, elle sabitlediklerinizle birlikte, prompt'un üstündeki bantta çizen bir Claude Code Mod'u. Bir rakam tuşu birini anında gönderir.
Ne yapar
- Yazdığınız ya da Remote Control üzerinden gönderdiğiniz her prompt sayılır: trim edilmiş, tek satır, 1 ile 80 karakter arası, bir slash komutu değil. Bir notification, bir peer mesajı, bir schedule ya da başka bir plugin'in prompt'u sayılmaz.
/prompt-deck add <text>bir prompt'u elle sabitler. Sabitlenmiş bir prompt ilk sırada, eklendiği düzende çizilir ve sayımlar onu banttan itemez. Uzunluk limiti yoktur ve sayımlar gibi proje başına tutulur. En fazla 5 prompt sabitlenir, çünkü bant 5 tane tutar./prompt-deck remove <n>birini çözer.- Bir prompt 3 kullanımdan sonra banda ulaşır. Bant en çok kullanılan 5 tanesini çizer, eşitlikte en yenisi önce,
1: commitle 2: devam et ...biçiminde, her etiket genişlikten payına kesilir. - Prompt kutusu boşken bir rakam tuşu o prompt'u anında gönderir. Bir tıklama ya da ctrl+x tab ve Enter da gönderir. Bir basış bir kullanım daha sayılır.
- Bir anket bandı tutarken, bir tur çalışırken ya da bir agent'ın transcript'i görüntüdeyken bant çizilmez.
- Sayımlar ve sabitlenmiş prompt'lar plugin store'da yaşar, proje başına bir deck, o projenin her session'ı tarafından paylaşılır. Proje, session'ın git top level adıdır; yoksa çalışma dizininin adı. Proje başına en fazla 200 prompt tutulur; en az kullanılan ve en eski olan önce gider.
- 0.2.0 öncesi bir sürümün deck'i her projeyi tek bir yerde sayıyordu. 0.2.0'ı yükleyen ilk proje o sayımları bir kere alır ve bunu bir satırda söyler; diğer her proje boş başlar.
Engine basılan bir prompt'u The prompt-deck plugin sent a message: olarak ve altında prompt ile gösterir; model onu bir user turn olarak cevaplar (2.1.278 üzerinde ölçüldü). Bir plugin'in kendi $.prompt.submit çağrısı, çağıran plugin dışındaki her hook'a ulaşır, bu yüzden mod plugin adını dışarıda bırakamaz.
Canlı kontrolde üç kere gönderilen bir prompt 1: reply with the single word ok olarak göründü, 1 tuşu onu gönderdi, model cevapladı ve /prompt-deck 4 kullanım gösterdi.
Komut
/prompt-deck on ya da off, proje ve kullanımlarıyla prompt'ları
/prompt-deck list aynısı
/prompt-deck add <text> kendi prompt'unuzu sabitler, sayılanlardan önce çizilir
/prompt-deck remove <n> listenin n. sırasındaki prompt'u unutur, sabitlenmiş ya da sayılan
/prompt-deck clear her prompt'u unutur
/prompt-deck on | off varsayılan on; off sayımları korur
Kurulum
claude plugin marketplace add KilimcininKorOglu/claude-code-mods
claude plugin install prompt-deck@kilimcininkoroglu-mods
Function hook'lar early access. Flag olmadan hiçbir şey yüklenmez. Flag'i kalıcı yapmak için ~/.claude/settings.json dosyasına ekleyin:
{ "env": { "CLAUDE_CODE_ENABLE_FUNCTION_HOOKS": "1" } }
Kurulumdan sonra
- Claude Code'u yeniden başlatın.
Nereye uzanır
Claude Code 2.1.278 üzerinde claude plugin validate ile doğrulandı:
❯ ./register.tsx hooks: session.start, command.run{command=deck}, prompt.submit, ui.render{component=AbovePrompt}
❯ ./register.tsx calls: $.clock.now (via countUse), $.command.register, $.process.run (via resolveProject), $.prompt.submit (via sendPressed), $.session.cwd (via resolveProject), $.store.delete (via adoptLegacy), $.store.get (via adoptLegacy, countUse, loadDeck), $.store.set (via saveCounts, savePins, setEnabled), $.ui.invalidate, $.ui.log (via adoptLegacy), $.ui.resolve
Reach L2, git çalıştırır ve Claude'u sürer: bir basış bir prompt gönderir.
1. Okur: gönderilen her prompt'un metnini ve origin'ini; session'ın çalışma dizinini
2. Çalıştırır: git rev-parse --show-toplevel, session başına bir kere, projeyi adlandırmak için
3. Gönderir: saklanmış bir prompt'u user turn olarak, yalnız kişinin basışıyla; makineden hiçbir şey çıkmaz
4. Saklar: $.store içinde, proje başına, kullanım sayıları ve son kullanım zamanıyla en fazla 200 kısa prompt, en fazla 5 sabitlenmiş prompt ve on/off ayarı
5. Düşman girdi: yalnız composer ya da Remote Control'den gelen prompt'lar sayılır ve yalnız yazılmış bir /prompt-deck add bir prompt'u sabitler; yani bir notification, bir peer ya da bir plugin banda prompt koyamaz
Sınırlar
- 80 karakterden uzun ya da birkaç satırlı bir prompt hiçbir zaman sayılmaz.
/prompt-deck addtek satırda her uzunluğu alır. - Bant yalnız terminal'de çizilir, çünkü engine
AbovePromptolayını yalnız orada raise eder. - Yalnız büyük küçük harf ya da noktalama ile ayrılan iki prompt ayrı sayılır.
- Aynı dizin adına sahip iki proje tek bir deck paylaşır, çünkü proje yalnız addır, path değil.
- On/off ayarı her proje için tek bir ayardır.
Geliştirme
make install # eslint, typescript-eslint, typescript
make lint # complexity limiti 10, üstünde build'i düşürür
make typecheck # /plugin-types ile üretilen .claude/types/ gerekir
make validate
make test # claude plugin test
prompt-deck
A Claude Code Mod that learns the short prompts you send often in this project, and draws them, with the ones you pin by hand, in the band above the prompt. A digit key sends one at once.
What it does
- Each prompt you type, or send through Remote Control, is counted: trimmed, one line, 1 to 80 characters, not a slash command. A notification, a peer message, a schedule or another plugin's prompt is not counted.
/prompt-deck add <text>pins a prompt by hand. A pinned prompt is drawn first, in the order it was added, and the counts never push it off the band. It has no length limit and is kept per project, like the counts. Up to 5 prompts are pinned, because the band holds 5./prompt-deck remove <n>unpins one.- A prompt reaches the band after 3 uses. The band draws the 5 most used, the latest first on a tie, as
1: commitle 2: devam et ..., each label cut to its share of the width. - With the prompt box empty, a digit key sends that prompt at once. A click, or ctrl+x tab and Enter, sends it too. A press counts as one more use.
- The band is not drawn while a survey holds it, while a turn runs, or while an agent's transcript is in view.
- The counts and the pinned prompts live in the plugin store, one deck per project, shared by every session of it. The project is the name of the session's git top level, else of its working directory. At most 200 prompts are kept per project; the least used and oldest go first.
- The deck of a version before 0.2.0 counted every project into one. The first project that loads 0.2.0 takes those counts, once, and says so in one line; every other project starts empty.
The engine shows a pressed prompt as The prompt-deck plugin sent a message: with the prompt under it, and the model answers it as a user turn (measured on 2.1.278). A plugin's own $.prompt.submit passes every hook but the calling plugin's, so the mod cannot leave the plugin name out.
In the live check a prompt sent three times appeared as 1: reply with the single word ok, the 1 key sent it, the model answered, and /prompt-deck showed 4 uses.
Command
/prompt-deck on or off, the project, and its prompts with their uses
/prompt-deck list the same
/prompt-deck add <text> pin a prompt of your own, drawn before the counted ones
/prompt-deck remove <n> forget the prompt at place n of the list, pinned or counted
/prompt-deck clear forget every prompt
/prompt-deck on | off on by default; off keeps the counts
Install
claude plugin marketplace add KilimcininKorOglu/claude-code-mods
claude plugin install prompt-deck@kilimcininkoroglu-mods
Function hooks are early access. Nothing loads without the flag. To keep it on, add this to ~/.claude/settings.json:
{ "env": { "CLAUDE_CODE_ENABLE_FUNCTION_HOOKS": "1" } }
After installing
- Restart Claude Code.
What it can reach
Validated with claude plugin validate on Claude Code 2.1.278:
❯ ./register.tsx hooks: session.start, command.run{command=deck}, prompt.submit, ui.render{component=AbovePrompt}
❯ ./register.tsx calls: $.clock.now (via countUse), $.command.register, $.process.run (via resolveProject), $.prompt.submit (via sendPressed), $.session.cwd (via resolveProject), $.store.delete (via adoptLegacy), $.store.get (via adoptLegacy, countUse, loadDeck), $.store.set (via saveCounts, savePins, setEnabled), $.ui.invalidate, $.ui.log (via adoptLegacy), $.ui.resolve
Reach L2, runs git and drives Claude: a press submits a prompt.
1. Reads: the text and origin of each submitted prompt; the session's working directory
2. Runs: git rev-parse --show-toplevel, once per session, to name the project
3. Sends: a stored prompt as a user turn, only on the person's press; nothing leaves the machine
4. Persists: in $.store, per project, up to 200 short prompts with their use counts and last use time, up to 5 pinned prompts, and the on/off setting
5. Hostile input: only prompts from the composer or Remote Control are counted, and only a typed /prompt-deck add pins one, so a notification, a peer or a plugin cannot put a prompt on the band
Limits
- A prompt longer than 80 characters or over several lines is never counted.
/prompt-deck addtakes any length on one line. - The band is drawn on the terminal only, because the engine raises
AbovePromptthere only. - Two prompts that differ only in case or punctuation count apart.
- Two projects with the same directory name share one deck, because the project is the name only, not the path.
- The on/off setting is one setting for every project.
Development
make install # eslint, typescript-eslint, typescript
make lint # complexity limit 10, fails the build above it
make typecheck # needs .claude/types/ from /plugin-types
make validate
make test # claude plugin test