Productive— faster every day
For your professionTeachersStudentsManagersMarketingDevelopersFreelancersParents

Prompt library · AI · 7 prompts

Prompts from the guide

What loops are: the agentic cycles said to replace prompting

7 prompts from this guide. Fill in whatever sits in [square brackets] — your own context, the document text or the name of your tool. That context is exactly what separates a generic answer from a usable one.

Read the full guide →

Example 1: fixing data with a checksum (no coding required)

I'm uploading a payments export [file.csv]. It's a mess: some
amounts use a comma, others a period, some rows are missing a
currency, and dates come in three different formats.

Goal: standardize amounts to the format 1234.56, fill in the
currency CZK wherever it's missing and the amount is in koruna, and
convert every date to YYYY-MM-DD.

Work in a loop: after each batch of fixes, recompute two check
values — the total of the amount column and the row count — and
compare them against the starting values: total [742,315.20], rows
[1,480]. If they don't match, find where it broke, fix it, and
recompute. Stop once both values match and the formats are
consistent.

Limits: never delete rows or change amount values, only how they're
written. Anything you can't fix with confidence, flag in a “needs
review” column and leave alone.
At the end, report: how many rows you changed, both check values,
and the list of rows flagged for review.

Example 2: Claude Code and a task with tests

The order import in this project is broken — the tests in
[tests/import] are failing. Goal: every test in the project green.

Work in a loop: run the tests, read the first failure, fix the
cause (not the test), run the tests again. Repeat until the whole
suite passes.

Rules:
- Don't change or delete the tests themselves. If you're convinced
  a test itself is wrong, stop and tell me, with your reasoning.
- Stay within [src/import] — if the fix requires touching anything
  else, stop and ask.
- Limit: 15 iterations. If the tests still aren't green by then,
  stop and summarize what you tried, what you know about the cause,
  and what you'd suggest next.
At the end, list the files you changed and, for each, one sentence
on why.

Example 2: Claude Code and a task with tests

Before I set an agent loose on [module/function], I need a
yardstick. Write a test suite that captures its current correct
behavior:

1. Go through [src/module] and list what it does — inputs, outputs,
   edge cases. Don't write any code yet, just the list of
   behaviors.
2. Wait for my confirmation on which of those behaviors are
   intentional and which are accidental or actual bugs.
3. Only then write tests for the confirmed behaviors — including
   edge cases and at least one test per bug that a later change is
   meant to fix (that one should be red for now).

The tests need to run with a single command and must not depend on
network access or on the order they run in.

Example 3: an overnight run with a morning review

Overnight, run a migration: convert all [214] articles in the
[old-site/] folder from [HTML] to [Markdown] following the rules in
[migration-rules.md].

Work in batches of 10 files. After each batch, run the check
[script check.py]: valid output, no lost images, character count
within 5 percent of the source. If a file fails the check, try to
fix it; if it still fails on the third attempt, move it to
[needs-review/] and continue with the next batch.

Limits: work only in the [migration] branch, never delete source
files, don't install anything new. If the check script itself
crashes, stop the entire run — don't work around it.

Keep a running file called LOG.md throughout: one line per batch
(time, number OK, number of fixes, number deferred). At the end,
append a summary: what's finished, what's in needs-review/ and why,
anything you noticed in the data, anything I should know about.

When to loop, and when to just prompt

I want to run AI on this task and I'm deciding between a one-shot
brief and a loop (the agent iterates until it's done): [task
description].

1. Propose a done criterion for this task that can be checked
   mechanically or numerically — no human judgment involved. If no
   such criterion exists, say so plainly rather than inventing a
   pseudo-criterion.
2. If one only exists for part of the task, split the task into a
   verifiable part (suited to a loop) and a part I need to judge
   myself.
3. Propose sensible loop limits: iteration count, scope (what it
   must not touch), and what to do if it gets stuck.

When to loop, and when to just prompt

Here's a prompt I use repeatedly: [paste prompt].

Rewrite it from "step-by-step instructions" style into a brief for
an agentic loop. The result must have four blocks:
1. Goal — the target state in one sentence, not a procedure.
2. Done criteria — how you'll know it's done, verifiably.
3. Rules and bans — what must not be touched, what must not be
   changed (including the criteria themselves), when to stop and
   ask.
4. Limits and reporting — max iteration count, what to do if it
   gets stuck, what belongs in the closing summary.
If the original prompt doesn't allow for any verifiable criterion,
say so and recommend sticking with a conversation.

Pro tip

You just finished a run using this brief: [paste loop brief].
Here's the run's log: [paste log].

Evaluate the brief, not the result:
1. Which done criteria worked, and which turned out to be leaky
   (satisfiable without the work actually being done)?
2. Where did you lose the most iterations, and what sentence in the
   brief would have prevented that next time?
3. Which limits were unnecessarily tight, and which were missing?
Based on that, write an improved version of the brief for the next
run.
Mark the changes and give a one-sentence reason for each.

All prompts