GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - unDemian/claude-prompt-pin

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
.claude-plugin
.claude-plugin
 
 
hooks
hooks
 
 
skills/prompt-pin-setup
skills/prompt-pin-setup
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
install.sh
install.sh
 
 
screenshot.png
screenshot.png
 
 
statusline.sh
statusline.sh
 
 
uninstall.sh
uninstall.sh
 
 

Repository files navigation

claude-prompt-pin

Tired of scrolling back to remember what you asked Claude to do? This pins your last prompt as a persistent line above the statusline, always visible, no matter how deep the rabbit hole goes.

Open five sessions, lose track of none!

claude-prompt-pin in action

Requirements

  • Claude Code CLI
  • bash
  • jq — brew install jq (macOS) or apt install jq (Linux)

Optional: claude-hud — if installed, the statusline delegates to it after showing the prompt pin. Degrades gracefully without it.

Installation (Plugin)

Register the marketplace and install:

claude /plugin install claude-prompt-pin --marketplace github:unDemian/claude-prompt-pin

Then inside Claude Code, run:

/prompt-pin-setup

This configures the statusline. The prompt-saving hook is registered automatically by the plugin.

Installation (Manual)

If you prefer not to use the plugin system:

bash install.sh

Then start a new Claude Code session.

Manual steps

  1. Copy hooks/prompt-title.sh to ~/.claude/hooks/prompt-title.sh and chmod +x it.
  2. Copy statusline.sh to ~/.claude/statusline.sh and chmod +x it.
  3. Add to ~/.claude/settings.json:
{
  "statusLine": {
    "type": "command",
    "command": "bash ~/.claude/statusline.sh"
  },
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "bash ~/.claude/hooks/prompt-title.sh"
          }
        ]
      }
    ]
  }
}

Uninstallation

Plugin: run claude /plugin uninstall claude-prompt-pin and remove the statusLine entry from ~/.claude/settings.json.

Manual: run bash uninstall.sh.

Customization

Edit statusline.sh (in the plugin cache or ~/.claude/ for manual installs):

  • Change the icon: Replace ↳ with any character or emoji.
  • Change colors: Modify the ANSI escape codes in the printf line.
    • \033[1;33m = bold yellow (arrow)
    • \033[1m = bold white (prompt text)
  • Change truncation length: Adjust MAX=120 to whatever character count you prefer.

How It Works

  1. You submit a prompt → the UserPromptSubmit hook fires, saving it alongside the session transcript, then writing the terminal title escape to /dev/tty.
  2. Claude Code refreshes its statusLine → statusline.sh reads the session's prompt file, prints the styled prompt line, then delegates to claude-hud (if present).

Prompt storage

Each session's last prompt is stored as a sidecar file next to its transcript:

~/.claude/projects/<project>/<id>.last-prompt

Claude Code passes transcript_path in the JSON payload to both the hook and the statusline — the same stable per-session identifier used by claude-hud. The hook writes <transcript_path minus .jsonl>.last-prompt; the statusline reads it. A new session has no sidecar file yet, so it shows nothing until the first prompt is submitted.

uninstall.sh removes these files automatically. To remove them manually:

find ~/.claude/projects -name "*.last-prompt" -delete

The hook writes to /dev/tty directly to avoid injecting escape sequences into Claude's context. The plugin hook uses ${CLAUDE_PLUGIN_ROOT} for portable path resolution. The statusline auto-discovers the latest plugin version at runtime, so it survives plugin updates without needing to re-run /prompt-pin-setup.

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.