“Automating Repetitive Section-by-Section Prompts in Cursor AI

I’m building websites with Cursor AI, and there are some repetitive steps in the design process that I’d like to automate.

Right now I work in this order:

  1. Generate mock-ups for all pages.
  2. Refine the design for each individual page.

If I ask Cursor AI to revise an entire page at once in step 2, the output quality drops a lot, so instead I group three sections at a time and send the request. I keep a prompt template on hand, paste it in, and just swap out the section names. I have to repeat this over and over—so I’m looking for a good way to automate it.

The best idea I’ve thought of so far is to save the list of sections to be processed in a JSON file and write a Node.js script that pulls out three section names at a time and submits the prompt. The problem is I can’t find any way to programmatically send a prompt to Cursor AI, since it doesn’t expose a CLI.

Is there a better solution?