Custom Prompt Template Guide

Step-by-step tutorial for using {text} in custom prompts.

{text} is a template placeholder used in Custom Prompt Templates. At runtime, it is replaced with the exact text the user highlights.

1

Runtime behavior

  • Template: Please summarize the following content: {text}
  • Selected text: React is a JavaScript library...
  • Final prompt: Please summarize the following content: React is a JavaScript library...
2

How to use

  • Open extension settings and create or edit a custom prompt.
  • Put {text} where selected content should be inserted.
  • Highlight text on any webpage and run the prompt.
3

Ready-to-use templates

  • Summary: Please extract key points in bullets: {text}
  • Translation: Translate to Traditional Chinese in a professional tone: {text}
  • Code explanation: Explain the logic and purpose of this code: {text}
  • Rewrite: Rewrite this into a clear technical document: {text}
4

Advanced template

  • You are a senior software engineer. Analyze the following content and return key points, potential issues, and improvements: {text}
5

Common mistakes

  • Missing {text}: your selected content is never passed to the model.
  • Wrong variable name: only exact {text} works ({Text} and {texts} fail).
6

Recommended interview template

  • You are a software interview coach. Question: {text}. Return intent, best concise answer, and bonus points.