Practical Examples
Three progressive tasks that reuse this course: onboard an unfamiliar repo, ship a multi-file feature with Plan Mode, and install a team workflow with rules + MCP. Paste the prompts into Agent; adapt commands to your repo. Do not run these on production with review turned off.
Example 1: Onboard an unfamiliar repo
Goal: In two hours, name the entry points, the test command, and one safe small change—without guessing.
Setup: Clone any mid-size open-source repo you do not know. Open the repo root in Cursor.
Ctrl+I / Cmd+I, then send in order:
Run the install and test commands it quoted (examples):
If tests fail for missing secrets, paste the error back: These tests failed on a clean clone. Which env vars are required? Do not weaken tests.
Then ask for three small improvements and approve one (see Quick Start). Review the diff and rerun the same tests.
Done when:
Example 2: Multi-file feature with Plan Mode
Goal: Add a read-only /health (or equivalent) endpoint that does not touch auth, plus a test in the repo’s style.
Setup: Pick an app that already has an HTTP layer (Express, FastAPI, Rails, Go net/http, …). Create a branch:
Shift+Tab into Plan Mode and send:
Review the plan:
- Files are only the route + test (plus whatever register the framework requires)?
- The test command already exists?
- No “refactor while we are here”?
Save to workspace, e.g. docs/plans/health-endpoint.md. Approve the build. Afterward:
Run them yourself too. If the implementation drifted: restore a checkpoint or git restore ., tighten the plan, build again (see Plan Mode).
Done when:
PowerShell probe (change the port):
Example 3: Team workflow with MCP + rules
Goal: A new teammate (or future you) clones the repo and Agent already follows the same norms, plus one MCP server they can call safely.
3a. Check in rules and shared instructions
At the repo root:
.cursor/rules/team.mdc:
Root AGENTS.md:
Commit those files. Start a new Agent chat and say: Add lodash for a one-liner. A well-ruled agent should refuse or ask first.
3b. Project MCP (no secrets in Git)
Commit a secret-free server in .cursor/mcp.json. Tokens go through ${env:NAME}. Shape only—replace with a real, reviewed server:
Interpolation and transports: MCP. Protocol depth: MCP course.
Enable the server in Customize; confirm Output → MCP Logs. Then:
3c. Team contract
Done when: