VSCode Agent (GitHub Copilot) — NES Next-Edit Tab Completion Prompt

Agent Prompt ✦ Curated & attributed Intermediate

Copilot's 'Next Edit Suggestion' (NES) tab-completion prompt that predicts the developer's next change inside <|code_to_edit|> tags. It enumerates the structured context channels it receives (recently_viewed_code_snippets, current_file_content, edit_diff_history, area_around_code_to_edit, and a <|cursor|> marker) and constrains output to only the revised in-tags code, stripping line-number markers.

What makes this prompt notable

  • Operates on sentinel tokens (<|code_to_edit|>, <|cursor|>, #| line markers) rather than tool calls
  • Output contract: return only the revised between-tags code, never the tags, never duplicate code outside them, never the #| numbers
  • Explicit guardrail: 'Avoid undoing or reverting the developer's last change unless there are obvious typos or errors'
  • Describes a fill-in-the-middle prediction task driven by edit_diff_history and cursor position to 'keep the developer on the path they're following'

Discussion (0)

Sign in to join the discussion.
Related

More in IDE & Coding Assistants

VSCode Agent
agent prompt

VSCode Agent (GitHub Copilot) — GPT-5 Agent Prompt

The most elaborate Copilot VS Code agent prompt, for GPT-5. It combines the Copilot identity and refusals with a detailed communication-style guide, m…

role definition tool-use protocol structured diff format specification
239 5.6k 3.7k words
KI
Kiro
system prompt

Kiro — Intent Mode Classifier

A lightweight intent-classification prompt that routes a user message into chat/do/spec modes and returns a JSON object of confidence scores summing t…

classification rubric constraint setting few-shot
226 5.3k 600 words
CU
Cursor
agent prompt

Cursor — Agent Prompt v1.0 (Claude Sonnet 4)

An earlier, leaner Cursor agent prompt (Claude Sonnet 4) focused on tool-calling rules, aggressive parallel tool execution, search-and-reading bias to…

role definition tool-use protocol parallel tool-call maximization
225 7.3k 1.5k words