AI อะไรเนี่ย

YouTube Summary

Cursor Agent: 10 Pro Tips!

CursorAgentProductivityDeveloper Tools
  1. Start with Plan Mode (Shift + Tab): Use Plan Mode to let the Agent explore the codebase and propose a step-by-step plan before you edit anything, reducing design mistakes and hidden coupling issues.

  2. Use @branch for full-branch reviews: Type @branch in the chat to have the Agent review all changes in your current branch and point out potential bugs, smells, or risky refactors you may have missed.

  3. Create Custom Commands in .cursor/commands: Define Markdown-based commands as reusable workflows—for example, a command that writes commit messages and triggers GitHub CLI to open a Pull Request automatically.

  4. Send UI screenshots to generate layout and CSS: Paste a UI mockup or screenshot and ask the Agent to implement the layout and styling in JSX/TSX + Tailwind so you can match the design quickly without manual trial-and-error.

  5. Duplicate Chat to explore alternative solutions: Use Duplicate Chat on a good-context conversation to branch into multiple solution experiments without polluting your main thread or losing the original reasoning.

  6. Control context size with /summarize when tokens are high: Watch the context gauge; when it gets close to full, run /summarize so the Agent compresses the conversation into a focused summary while keeping the key technical details.

  7. Turn on Usage Summary (Always): In Settings, set Usage Summary to “Always” so you can track model quota (e.g. Claude 3.5 Sonnet) and reset dates, and plan heavy tasks around your remaining budget.

  8. Master keyboard shortcuts Command + I and Command + /: Use Command + I to open the Agent and Command + / to switch models quickly, so you stay in flow without reaching for the mouse.

  9. Start a fresh New Chat for new features: Press New Chat (Command + N) whenever you begin a new feature or major task to avoid dragging in irrelevant context that can confuse the Agent.

  10. Use Checkpoints to safely roll back: Create Checkpoints at stable moments so you can jump back when a sequence of AI edits or experiments goes wrong—making it safe to try bold refactors.

  11. Enable the completion sound: Turn on the completion sound so you can switch to other work while the Agent runs, and get an audio cue when the result is ready instead of staring at the screen.

  12. Ask the Agent to generate Mermaid diagrams: Have the Agent convert complex flows or auth logic into Mermaid diagrams (sequence or flowcharts) that you can paste into docs, PRs, or architecture reviews.

  13. Use polite prompts like “Please” and “Thank you”: In practice, adding polite phrasing often nudges the model toward more thoughtful, thorough, and user-friendly answers—even if it’s “just” an AI.

  14. Try the new three-column Agent Layout: Experiment with the beta Agent layout that splits the screen into Agent List, Chat, and Diff panes, making it easier to manage multiple tasks and review code changes side by side.

  15. Paste error logs directly for self-healing fixes: When you hit browser or terminal errors, paste the logs straight into the Agent and ask for root-cause analysis plus a concrete patch, turning debugging into a guided, semi-automatic process.