Copy an existing module’s structure into a new one
A commenter used Cursor to scaffold a second module, but it missed the pattern because it did not load the source module’s files.
- What they did
- They first set up the project foundation by hand, then asked Cursor to build a new module based on an already-existing one. The reference pattern was spread across 4–5 files, but Cursor did not pull that context in and failed to follow the structure closely enough.
- How it went
- The agent could not produce a matching scaffold from the original module’s layout. The commenter said it acted as if it was too lazy to read the needed files, and replies agreed that less context led to worse, more error-prone output.
- Tips
- When a pattern lives across several files, make the agent inspect them before it writes anything. If the task could affect code structure, ask it to summarize the conventions first and wait for your approval.
Try it yourself with Cursor
Inspect [existing module path] in [repo name] before creating anything new. Open every file that belongs to that module, summarize its folder layout, file roles, naming style, and repeated patterns, then pause and ask me to confirm your understanding. After I approve, create [new module name] in the same style. When the scaffold is complete, compare it against the original and tell me whether the structure, exports, and file naming match. Do not send, submit, delete, or overwrite anything without asking first.
Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.
Get 3 agent uses like this every morning
With the day's top AI news. Free, and one click to unsubscribe.
Related agent uses
Use an agent to find missing database indexes
A developer had Cursor inspect a slow NestJS page and suggest database indexes to fix a production-only slowdown.
Hand small repo fixes to Cursor agents
A developer used Cursor agents to chip away at a daily batch of repo maintenance, bug fixes, and minor features.
Turn a short ticket into a landing page
Cursor’s background agent made a pricing page from a brief spec, opened a PR, and let the developer review it before shipping.
Let a background agent watch tasks and open PRs
A team keeps a server-based agent running so Cursor can monitor work and turn finished tasks into pull requests.
Triage upgrades and move major ones in stages
Kent C. Dodds used Cursor to organize site dependency work, then carried out a Remix v2 to React Router v7 migration and related updates.
Use Cursor to inspect pod logs and fix compose files
A DevOps engineer used Cursor to read production pod logs through Kubernetes MCP and to repair a broken Docker Compose setup.