[NTTP]

Claude Code Prompt Improver

Dump your rough notes or half-formed idea. Get back a clean, structured prompt ready to paste into Claude Code, Codex, or any coding agent.

No need to be tidy. Bullet points, stream of consciousness, incomplete sentences, all fine.

Optional

Optional. A sentence about your stack or codebase. Helps the output be more specific.

Free to try, no sign-up needed

Your text isn't stored. It's sent to Anthropic to generate your result, then discarded. Privacy

Prefer to write it yourself? Use the free prompt.

New to this? Read the guide.

What it produces

Real output from this tool, not a mock-up.

What went in

Your rough notes or idea
need to add rate limiting to the api route that runs the tools. right now anyone signed in can just hammer it. thinking per user not per ip since they have to be signed in for the paid ones. but guests use it too and they are per ip already for the daily limit. maybe reuse that? not sure if it should be in the route or middleware. also do not want to break the existing guest quota thing which uses a supabase rpc. should probably return a 429 with something useful rather than just failing
Project context
Next.js 16 app router, Supabase for auth and postgres, the route is src/app/api/tools/run/route.ts. There is an existing consume_guest_quota RPC that does IP based daily limits for logged out users. No redis, trying to avoid adding infrastructure.

The prompt

Add rate limiting to src/app/api/tools/run/route.ts for signed-in users. Right now any authenticated user can hammer this route with no limit. Requirements: - Rate limit signed-in users per user ID, not per IP. Guests already go through the existing consume_guest_quota RPC for IP-based daily limits; leave that path untouched. - Implement the limit check inside the route handler itself, not in middleware, so it can use the authenticated user's ID and stay close to the existing guest quota logic. - Use Postgres/Supabase for tracking the limit (a table plus an RPC, similar in spirit to consume_guest_quota). Do not introduce Redis or other new infrastructure. - When a user exceeds the limit, return a 429 with a JSON body that tells the caller why (for example the limit, how many requests remain, and when it resets), not just a bare error. - Confirm the guest flow through consume_guest_quota still works unchanged after this change. Open questions: - What should the per-user limit be (requests per minute, per hour, per day)? - Should the limit vary by plan/tier, or is it the same for every signed-in user?

What it changed and why

Turned a stream-of-consciousness brain dump into a scoped task with explicit requirements and flagged the two decisions (limit window, per-tier vs flat) the notes left unresolved instead of guessing at them.

When to use it

Use this before handing a task to a coding agent, when you know what you want but have only half-formed notes. It turns them into a structured prompt with the context, the constraints and the things not to break stated explicitly, which is where most agent tasks go wrong.

Common questions

Why not just paste my notes into the agent?
You can, and for a small change you should. This helps when the task has constraints that are obvious to you and invisible to the agent: the thing that must not break, the infrastructure you are refusing to add, the decision you have not made yet. Those are what turn into wasted work.
Does it decide the approach for me?
No, and it is careful not to. Where your notes contain an open question, as with route versus middleware in the example, it keeps it as an open question rather than quietly choosing. An agent given a false certainty will build on it.
What is the note for?
It tells you what it added or made explicit, so you can check it did not smuggle in an assumption you disagree with. Worth reading before you paste.
Does it only work with Claude Code?
No. The output is a structured prompt that works with any coding agent, including Codex, Cursor or a plain chat window. Nothing in it is specific to one tool.

Similar tools

All Developers