Ir para o conteúdo

Tutorial de Cursor (Grok Build)

Cursor, now called Grok Build: AI code editor tutorial on setup, tab completion, inline edits, agent mode, giving context, rules, reviewing changes, team safety and projects.

Getting Started

  1. 1 What Is Cursor? The AI Code Editor Learn what the Cursor AI code editor is, why it is now called Grok Build, who this tutorial is for, what you need, what runs here and how the course works.
  2. 2 Install and Set Up Cursor Install the Cursor editor on Windows, macOS or Linux, sign in, import your VS Code settings, pick safe first settings and prepare a practice project.
  3. 3 Your First Cursor Session Walk through a first Cursor session: explore a project, make one small change, read the diff, run the checks and learn the habits that keep you in control.

Completions and Inline Edits

  1. 4 Cursor Tab Completion Use Cursor Tab: accept, reject and partly accept suggestions, follow jumps to your next edit, control where Tab runs, and write code that guides it.
  2. 5 Editing Selected Code with AI Edit a selected block of code with Cursor, learn what happened to the old Ctrl+K inline edit, write tight edit requests and verify that behavior stays the same.

Chat and Codebase Context

  1. 6 Ask Mode and Codebase Questions Use Cursor Ask mode to explore an unfamiliar codebase without edits, ask questions that demand evidence, and check the answers against the real files.
  2. 7 Adding Context with @ Mentions Give Cursor the right information with @ mentions, images and pasted code, watch the context window, trim noisy logs and decide when to start a fresh chat.
  3. 8 Codebase Search and Ignore Files How Cursor finds code, how .cursorignore and default ignores work, how negation patterns behave, and why ignore files are not a complete security barrier.

Agent Mode

  1. 9 How the Cursor Agent Works Understand Cursor Agent: its tools and loop, how to write tasks with clear limits, and how checkpoints, queued messages and stopping keep you in control.
  2. 10 Plan Mode in Cursor Use Cursor Plan mode to research, answer questions and review a written plan before any code changes, and learn how to critique that plan properly.
  3. 11 Debug Mode in Cursor Use Cursor Debug mode to collect runtime evidence, test hypotheses with logs, fix the root cause of hard bugs and remove the added logging afterward.
  4. 12 Worktrees and Cloud Agents Run Cursor agents in isolated Git worktrees or on cloud machines, set up worktree scripts, compare results safely and avoid losing uncommitted work.

Rules and Configuration

  1. 13 Project Rules and AGENTS.md Write effective Cursor rules: .mdc files in .cursor/rules, the four rule types, AGENTS.md, user and team rules, precedence and mistakes to avoid.
  2. 14 Skills and Subagents Package repeatable know-how as Cursor skills, delegate focused work to subagents, use custom modes and decide whether a rule, skill or subagent fits.
  3. 15 Models, Plans and Usage Choose models in Cursor, understand Auto, the individual plans as of December 2026, usage pools and API-priced models, and habits that control your costs.

Tools, Terminal and MCP

  1. 16 Terminal Commands and Run Modes Control what the Cursor agent runs: Auto-review, Allowlist and Run Everything modes, the terminal sandbox, permissions.json and commands that need care.
  2. 17 Connecting MCP Servers Connect tools to Cursor with the Model Context Protocol: configure mcp.json for local and remote servers, keep secrets safe, and manage approvals and risk.
  3. 18 Hooks: Automate and Guard the Agent Use Cursor hooks to run your own scripts before and after agent actions: hooks.json, events, JSON input and output, exit codes and fail-closed settings.

Reviewing and Testing AI Code

  1. 19 Reviewing AI-Written Changes A practical method to review Cursor agent diffs: check scope, behavior, security, tests and dependencies, spot common AI mistakes and undo changes safely.
  2. 20 Testing AI-Written Code Use tests to check Cursor's code: write tests first, cover boundaries and bad input, find weak tests with a mutation check and give the agent a clear target.
  3. 21 Agent Review and Bugbot Add AI review with Cursor Agent Review for local changes and Bugbot for pull requests, configure them, triage findings and keep a human approval step.

Privacy and Team Use

  1. 22 Privacy Mode and Protecting Data Understand what Cursor sends to AI providers, what Privacy Mode does and does not do, how to protect secrets and personal data, and what to check at work.
  2. 23 Using Cursor as a Team Roll out Cursor in a team: shared rules and configuration, team controls, a short AI coding policy, pull request norms, fair measures and a careful pilot.

Projects and Reference

  1. 24 Project: Add a Feature with Cursor Build a CSV export for a small expense tracker with Cursor: set up rules, write a specification, plan, test first, build in steps, review and verify.
  2. 25 Project: Fix a Bug with Cursor Practice debugging with Cursor: reproduce a billing date bug, write a failing test, find the root cause, fix it, check for similar bugs and prevent a return.
  3. 26 Cursor Glossary and Cheat Sheet A quick Cursor reference: main shortcuts, modes, slash commands, configuration files, a task prompt template, a safety checklist and a glossary of terms.