The one idea
Weak prompt: “Fix my auth bug.” Strong prompt: “Read these files, explain the bug, suggest the smallest change, and list checks I should run.”
AI coding assistants work better when you give real project context. You still own the code and the final decision.
Why context matters
Copilot Chat can use extra context like your current file and chat history. That helps, but it does not know your full intent unless you say it.
Unclear prompts often produce code that looks correct but does not fit your app. In a hackathon, that wastes time during demo prep.
What to include
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done
Do not ask blindly
Do not ask the assistant to guess your codebase. If it has not opened or read the relevant files, tell it not to speculate.
This matters when you use ChatGPT, Gemini, Claude, Copilot, or any editor assistant. A confident wrong answer is still wrong.
Prompt template
Use this when you are stuck on a feature or bug. Replace the bracketed parts with your project details.
If your tool can read files from the repo, ask it to inspect them. If not, paste only the small relevant snippet, not secrets or full private files.
Goal: [what I want to build or fix]
Project context:
- Stack: [React + Express + MongoDB, Flutter + Firebase, etc.]
- Relevant files: [src/pages/Login.jsx, server/routes/auth.js]
- Current behavior: [what happens now]
- Expected behavior: [what should happen]
Constraints:
- Do not change [database schema / public API / existing UI]
- Keep the solution simple for a hackathon demo
- Do not add a new dependency unless needed
Before answering:
- Read the relevant files if you can access them
- If you cannot see a file, ask me for it
- Do not invent APIs or functions that are not in the code
Output I want:
1. Short explanation of the cause
2. Minimal code change
3. Tests or manual checks I should run
4. Risks I should review before acceptingAdd checks early
Ask for tests or verification notes in the same prompt. AI can suggest checks, but you must still run them and review the code for issues like injection flaws or hardcoded secrets.
For example, give one valid UPI ID and one invalid UPI ID if you are building a payment form validator. Concrete examples reduce guesswork.
Better bug prompt
Here is a realistic prompt for a college project repo. It asks for a small fix, not a full rewrite.
Goal: Fix login redirect in my MERN hackathon app.
Context:
- Relevant files: client/src/pages/Login.jsx and server/routes/auth.js
- Current behavior: after correct login, the page stays on /login
- Expected behavior: redirect to /dashboard
- Constraint: do not change the backend response shape unless necessary
Please inspect the files before suggesting code. If you cannot see them, ask me to paste the specific parts.
Return:
1. likely cause
2. smallest code change
3. manual checks I should run in the browser
4. any security issue you notice, especially token storage or hardcoded secretsDo this now
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done