# 5x Your Cursor AI Coding Quality With These Pro Tips
<!--
ref: @content/youtube/yifan-bth/5x-your-cursor-ai-coding-quality-with-these-pro-tips
tags: [Cursor, Composer, AI-assisted coding, task decomposition, rules files, notepads, Playwright, git workflow]
version: 2
updated_at: 2026-11-24T07:21:05.340Z
-->

**[Watch on YouTube](https://www.youtube.com/watch?v=h_2eS01a1e0)**

# 5x Your Cursor AI Coding Quality With These Pro Tips

*Synthesized from Yifan on Beyond the Hype, 2024-10-11.*

Yifan demonstrates his Cursor workflow on a weekend project, a podcast transcript editor of about 2,700 lines of TypeScript, while adding per-user permissions and transcript sharing. The transcript is a rough automatic transcription.

## Core Thesis
Yifan argues that Cursor's Composer is most reliable when the work is split into small, testable steps, planned before it is implemented, and checked after each step. He treats the AI as an intern and the developer as the architect, and he uses project rules, selectively attached notepads, commits and end-to-end tests to keep each change verifiable.

## Key Insights
- **Decompose first.** A planning prompt with codebase context turned the sharing feature into about ten smaller tasks, such as schema update, transcript fetching, sharing API, sharing UI, invitation acceptance, access control and error handling. The larger the single instruction, the more likely the AI is to make mistakes, and the harder the result is to debug.
- **Model choice.** He uses the o1-preview model for the planning step, which he says costs 40 cents per invocation, and Sonnet for routine implementation.
- **Review each diff.** In one migration the generated type left a JSONB column typed as a string array, and the model needed an explicit instruction to fix it, so each generated change still needs checking before it is accepted.
- **Commit tested steps.** After each step passes, he commits the edited files, so the working state stays clean and a failed step is easy to undo.
- **Rules file.** A Cursor rules file at the repository root is prepended to every chat, Composer session and inline edit, which keeps the project context consistent.
- **Save all, not accept all.** Keeping changes as pending lets closing the composer revert them, so accepting waits until the change has been tested.
- **Notepads for tests.** A notepad holding Playwright conventions is attached only to test-writing tasks. The generated test checks the transcript list page, and the tests run in Playwright's UI mode (`npx playwright test --ui`) so the developer can watch them execute.

## Actionable Takeaways
1. Ask the AI to plan a large feature and split it into testable steps before any code is written.
2. Use a stronger planning model for the planning step once per large feature, and a cheaper model for routine edits.
3. Read every generated migration and type change, and ask for fixes explicitly when they are wrong.
4. Commit after each step is verified, and use save-all in Composer until the change is tested.
5. Keep project conventions in a rules file and test-specific conventions in notepads that you attach only when needed.

## Notable Quotes
> "You are the architect driving the design for the product." — Yifan

> "the bigger step you ask AI to take, the more likely it is to make mistakes" — Yifan

---

*Related: `@content/youtube/yifan-bth/getting-cursor-ai-to-review-its-own-code` · `@content/youtube/yifan-bth/unlocking-cursor-ai-top-8-hidden-features` · `@content/youtube/yifan-bth/how-i-use-ai-git-to-code-3x-faster-real-dev-workflow-with-cursor` · `@content/youtube/yifan-bth/how-to-build-robust-applications-with-cursor-ai-playwright` · `@content/youtube/yifan-bth/the-ultimate-prototyping-workflow-cursor-ai-replit`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*