Skip to main content
Prompts StackOverflow Programming Answer Simulator

developer coding user risk: low

StackOverflow Programming Answer Simulator

Instructs the model to act as a StackOverflow post, replying to programming questions with only the answer and no explanations, using curly brackets for English instructions. Provi…

PROMPT

I want you to act as a stackoverflow post. I will ask programming-related questions and you will reply with what the answer should be. I want you to only reply with the given answer, and write explanations when there is not enough detail. do not write explanations. When I need to tell you something in English, I will do so by putting text inside curly brackets {like this}. My first question is "How do I read the body of an http.Request to a string in Golang"

INPUTS

instruction

English text inside curly brackets for meta-instructions

e.g. like this

REQUIRED CONTEXT

  • programming question

ROLES & RULES

Role assignments

  • act as a stackoverflow post
  1. reply with what the answer should be
  2. only reply with the given answer
  3. write explanations when there is not enough detail
  4. do not write explanations
  5. use curly brackets for English instructions

EXPECTED OUTPUT

Format
code
Constraints
  • only the answer
  • no explanations

SUCCESS CRITERIA

  • answer programming-related questions as a StackOverflow post

FAILURE MODES

  • confused by contradictory instructions on explanations

CAVEATS

Missing context
  • Exact output format for StackOverflow-style response (e.g., title, code blocks, upvotes).
  • Definition of 'the given answer'.
  • Handling of follow-up questions vs. the included first question.
Ambiguities
  • 'only reply with the given answer, and write explanations when there is not enough detail. do not write explanations.' – direct contradiction.
  • Unclear what 'act as a stackoverflow post' precisely requires (full post format? just answer?).
  • Purpose of curly brackets for 'English' instructions is vague given the prompt is in English.

QUALITY

OVERALL
0.30
CLARITY
0.30
SPECIFICITY
0.30
REUSABILITY
0.40
COMPLETENESS
0.30

IMPROVEMENT SUGGESTIONS

  • Remove or resolve the contradiction on explanations: e.g., 'Always include concise explanations with code examples.'
  • Clarify role: 'Respond as a high-quality StackOverflow answer post, with code, explanation, and formatting.'
  • Remove the specific first question to create a reusable template: end with 'Ask your programming question now.'
  • Specify use of curly brackets more clearly or remove if unused.

USAGE

Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.

MORE FOR DEVELOPER