Establish Your Code Guardrails
Start from a clean commit and make the project feedback explicit: strict types where supported, a linter, deterministic formatting checks, focused tests, and documented commands that both humans and agents can run.
Give Cursor reliable feedback loops before asking it to repair code: establish types, linting, formatting, and focused tests, let the agent reproduce a failure, then inspect the diff and rerun the same checks plus a reusable branch review.
Download the skill for this workflow. Version 1.0.1.


with Claire Vo
Lee explains how types, linting, formatting, and tests give Cursor feedback it can act on, demonstrates an agent fixing lint errors and rerunning the command, and shows a reusable branch-review command.
A small, explained code change that fixes the reproduced failure, passes the relevant checks, and survives a branch-level review for behavior the narrow command may miss.
AI-first code editor
Follow the sequence once, then adapt the prompts, checks, and handoffs to your own setup.
3 steps
Start from a clean commit and make the project feedback explicit: strict types where supported, a linter, deterministic formatting checks, focused tests, and documented commands that both humans and agents can run.
Give Cursor the failing command and a narrow repair boundary. Require it to reproduce the issue, explain the cause, show the planned files, make the smallest fix, and rerun the checks.
Run [failing command] and reproduce the issue. Explain the root cause and list the files you expect to change. Make the smallest fix within [scope]. Do not disable rules, weaken types, delete tests, or change unrelated behavior. Rerun [focused checks] and summarize the diff.
Create a reusable review command for the branch diff. Check loading and offline states, error handling, security-sensitive code, data changes, test coverage, and accidental scope, then inspect each finding before making another edit.
Review the current branch diff against [base]. Look for correctness regressions, unsafe type or lint suppressions, missing error and loading states, offline or retry issues, security and privacy risks, data migration concerns, and missing tests. Cite files and lines. Do not modify code until I select a finding.
Treat every review finding as a hypothesis. Confirm it in the referenced code or with a focused test before changing the branch.
Turn an idea into a PRD, user stories, and a plan.
How to recover when the loop fails and where human judgment helps.

Build a voice-first language practice app that forces immersion by refusing to switch to the user's native language. The AI tutor provides corrections in real-time, within the flow of the conversation, to simulate an authentic learning environment.

Organize your business operations by creating a 'fellowship' of specialized AI agents. This workflow shows how to silo responsibilities into projects and assign distinct roles to AI assistants to automate administrative tasks and context retrieval.

Use Codex to help build a native mobile app, then guide the design and review the resulting code. William brought web-development and product experience to the project.
Join 250,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.