[FEATURE] Plugin API: let plugins provide prompt suggestions via a provides_prompt_suggestions component

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 20, 2026

Problem

Claude Code's prompt suggestion system (ghost-text in the TUI input, accepted via Tab/Right-arrow) is hardwired to LLM-generated predictions. There is no way for plugins to feed suggestions into this renderer.

The rendering infrastructure already exists. The history data exists (~/.claude/history.jsonl). The plugin manifest already supports component types like provides_hooks, provides_commands, provides_skills. The missing piece is a provides_prompt_suggestions component that lets a plugin supply candidate suggestions to the existing ghost-text renderer.

Use case

A plugin that does history-based fuzzy matching — as the user types, it matches against history.jsonl entries (scoped by project, session, or global) and surfaces the best match as ghost text. This is the exact UX that zsh-autosuggestions provides for the shell, applied to the Claude Code prompt input.

Other plugin use cases this would unlock:

  • Skill-aware suggestions — suggest installed slash commands contextually
  • Template expansion — suggest full prompt templates from partial typing
  • Team shared prompts — suggest from a shared prompt library

Proposal

Add a provides_prompt_suggestions component type to the plugin manifest. When the user is typing (or on each keystroke/debounced interval), the harness calls into registered suggestion providers with the current input text + context (project, session, recent conversation), and each provider returns 0–N ranked candidates. The harness merges these with the existing LLM suggestion (if enabled) and renders the top pick as ghost text.

Minimal contract:

# plugin.yaml
provides_prompt_suggestions:
  - name: history-fuzzy
    priority: 100  # higher = checked first, before LLM suggestion
// suggestion provider interface (conceptual)
interface PromptSuggestionProvider {
  suggest(input: string, context: SuggestionContext): SuggestionCandidate[];
}

interface SuggestionContext {
  project: string;
  sessionId: string;
  recentMessages: Message[];  // last N turns
}

interface SuggestionCandidate {
  text: string;
  source: string;  // e.g. "history", "template", "skill"
  score: number;
}

Why this is distinct from #83903

\#83903 asks to steer the LLM-generated suggestion content via CLAUDE.md/output styles/hooks. This request is about letting plugins provide their own suggestions that bypass the LLM entirely — history matching, template lookup, etc. The two are complementary: #83903 makes the LLM suggestion smarter, this one opens the suggestion slot to non-LLM sources.

Related issues

  • #83903 — steer LLM suggestion content
  • #77870 — cycle through multiple suggestion candidates
  • #74826 — frequency/always-on mode for suggestions
  • #21525 — extensible prompt suggestions (closed as dup)

View original on GitHub ↗