Skip to lesson
Exit
Attach known context with @1 / 2

2 min lesson

Build a focused Agent prompt

Build one Agent prompt with only relevant context. Check the answer against the attached evidence.

Step 1 of 2

Write one real bug prompt. Attach the known file and the terminal output that shows the failure. State the expected result, then check the answer against the attached evidence. If you do not know the file, leave it unattached and let Agent search.

Attach the file, get the real answer

0:37 · narrated
Read this demo as text
  1. Search returns everything for two-letter queries. Before you ask, decide what rides with the question: the file the behavior lives in.
  2. Type @. The context menu opens. Pick the file searchFilter.ts. It lands as a teal pill inside the prompt and travels with the question.
  3. Now the answer cites the mechanism by line — trim on seven, the early-return on eight. Same model, same question. The attached context made it specific.
Attach the file that defines done — the answer cites exact lines because the context scoped it.

Practice next: Now run the walkthrough: attach searchFilter.ts, send the bug question, and check that the answer cites code.

Simulated Cursor 3.12 (macOS, light) — beta educational reconstruction, not the real product.