Skip to main content
prompt GP ChatGPT

StackOverflow Post — ChatGPT & Claude.ai prompt: what it does

A prompt that makes the model answer programming questions the way a Stack Overflow post would: straight to the point, with explanations only when you ask.

Open on GitHub

What StackOverflow Post does

The prompt puts the model in the role of a Stack Overflow post. You ask a programming question, and the reply is what the body of that post should be — the answer, nothing else. Explanations show up only when the question lacks detail.

Curly braces are the other half of it. When you need to tell the model something, you wrap it in {like this}, and it treats that as your instruction rather than part of the question. The original example opens with reading the body of an http.Request into a string in Golang.

The prompt lives in the f/prompts.chat repository under CC0-1.0. In Claude it installs as a slash command from .claude/commands/prompts.csv.md. On ChatGPT and Claude.ai it is plain text you paste at the top of a conversation. One thing to watch: the instruction to skip explanations can come back as bare code with no word on why it looks that way. Ask for the reasoning separately when you want it.

What it helps with

  • get a short answer to a coding question with no preamble
  • keep your own instructions separate from the question text
  • set a Stack Overflow tone for the reply
  • get code with explanation only where detail is missing
  • reuse one prompt across a series of questions

Example prompts for the agent

  • Act as a Stack Overflow post. {Reply with code only, no explanations} How do I read the body of an http.Request to a string in Golang?
  • How do I sort a dict by value in Python? {Give a minimal example}
  • Why does git rebase conflict after git pull? {Keep the explanation short}

How to install StackOverflow Post

How to use

Paste the text at the start of a chat or into project instructions

Questions about StackOverflow Post

How do I install StackOverflow Post in Claude?

Copy .claude/commands/prompts.csv.md into the .claude/commands/ directory of your project. The prompt is then available as a slash command.

What does the StackOverflow Post prompt do?

It makes the model answer programming questions the way a Stack Overflow answer would look: to the point, with explanations only when detail is missing.

How do I pass an instruction without mixing it into the question?

Put it inside curly braces, for example {code only}. The model reads that as your instruction, not as part of the question.

Source text

prompts.csv · CC0-1.0
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"

© 5ht2 · CC0-1.0 · f/prompts.chat

Similar prompts

All prompts for Programming languages →

From the same set77

The whole set →
Code Reviewer A prompt that turns a chat model into an experienced developer who reviews your code and explains every suggestion. GP ChatGPT ★ 174,597repo stars Senior Frontend Developer A prompt that makes ChatGPT write frontend code as one index.js file on a fixed stack. Handy when you need a working component fast, without explanations. GP ChatGPT ★ 174,597repo stars Password Generator This prompt creates a complex password from length, letter case, number, and special-character settings. It works in ChatGPT and Claude.ai. GP ChatGPT ★ 174,597repo stars Software Quality Assurance Tester Turns a chat into a QA tester: checks functionality and performance, writes bug reports and suggests fixes. GP ChatGPT ★ 174,597repo stars Fullstack Software Developer A prompt that turns the chat into a developer: describe your web app requirements and get back an architecture plus code in Golang and Angular. GP ChatGPT ★ 174,597repo stars IT Expert This prompt turns a chat into an IT specialist: it diagnoses technical problems and walks through the fix step by step. Handy when you need to know what to do about an error. GP ChatGPT ★ 174,597repo stars Machine Learning Engineer A prompt that turns the chat into a machine learning engineer: it explains ML concepts in plain terms, walks through model building and points to further reading. GP ChatGPT ★ 174,597repo stars Tech Writer Turns your rough list of app steps into a readable how-to article. Handy when the actions are clear but the write-up isn't. GP ChatGPT ★ 174,597repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor