Skip to content

Write a reconstruction prompt

Turn something you built into one block of text that lets anyone rebuild a close cousin of it — no repo, no account, no invite. They paste it into their own agent and get a working version back. It rebuilds the recipe, not the exact files, so it won't carry your data or guarantee a byte-for-byte copy.

Time: ~5–10 min to draft with your agent, ~2 min to eyeball before sending. You'll need: the thing you built (a folder, a file, or a chat where you made it), and Claude Code set up (~10 min once) to write the prompt for you. Last verified: 2026-06-07

Before you begin

A reconstruction prompt is just a spec written so an agent can act on it. You don't write it by hand — you ask your agent to read what you built and describe how to rebuild it. Your only real job is to check what comes out: that it's complete enough to work, and that it doesn't leak anything private.

New to asking an agent? Read How to ask your agent first (2 min) — the "say the outcome, name the thing" habit is the whole skill here.

The one sentence to say

In the folder (or chat) where you built the thing, run claude and say:

Read this project and write a self-contained prompt that someone else could paste into their own agent to rebuild a close version of it from scratch. Describe what it does, the tech, the features, and how it should look and behave — but leave out my API keys, passwords, and any real data. Hand it to me as one copy-pasteable block.

The agent reads your files, then writes the spec for you. You review it (next section), then send the block to whoever you want — in a message, an email, a doc. There's nothing to host and nothing for them to log into.

What a good reconstruction prompt contains

A spec the receiving agent can act on, the way you'd brief a sharp new colleague who's never seen your work. Make sure these are in it:

  • What it is and who it's for — one or two lines. "A single-page donor-report viewer for a small nonprofit's board" beats "a web app".
  • The features, as a list — every thing it does, in plain language. "Upload a CSV, show totals per campaign, export to PDF." If a feature isn't named, it won't come back.
  • The tech and the shape — the language/framework, single file vs. folder, what it runs on. The agent usually fills this from your files; check it's right.
  • Look and behaviour — layout, key interactions, anything load-bearing ("works on a phone", "no login screen"). The one part a fresh agent can't guess.
  • A placeholder for anything you stripped — where your data, keys, or accounts would go, named but empty: "expects a DONORS_API_KEY env var" — so the receiver knows what to plug in.

A 5-point checklist before you send

Read the block once against this. If any line fails, ask the agent to fix just that line.

  1. Self-contained — it stands alone. No "see the file above", no reference only you'd understand.
  2. Complete — every feature you care about is named. Skim for the one you'd miss most.
  3. Tech is right — the language/framework matches what you actually built, not a guess.
  4. No secrets — see the next section; this is the one you can't undo.
  5. It's one block — copy-pasteable as-is, not split across your chat with the agent.

The round-trip test (do this once)

The only way to know it works is to run it the way your recipient will. Open a fresh agent session — /clear, or a new terminal — so it has none of your context, paste the block in, and let it build. Anthropic's own golden rule is the same idea: "Show your prompt to a colleague with minimal context… If they'd be confused, Claude will be too."

  • It builds something close → ship it.
  • It stalls or asks questions → those gaps are what your recipient will hit. Feed the questions back to your drafting agent and tighten the spec.

Expect a close cousin, not your exact app — different wording, maybe a different colour. That's the deal with a reconstruction prompt: same recipe, freshly cooked.

Eyeball for real secrets before sending

The prompt is plain text you're about to hand someone — once sent, you can't pull it back. The agent is told to leave secrets out, but you do the final check, because this is the one mistake with no undo. Skim for:

  • Keys and tokens — long random strings, anything starting sk-, ghp_, AKIA, AIza. None should be in the block.
  • Passwords or connection stringspassword=, postgres://user:pass@…. Replace with a named placeholder.
  • Real data — actual names, emails, donor or patient records baked into examples. Swap for fake samples.
  • Internal URLs — staging links, private endpoints only your org can reach.

When in doubt, ask: "list anything in this prompt that looks like a secret or real data, and replace each with a clearly-labelled placeholder." Then re-read it yourself anyway.

If it doesn't work

  • The rebuild came out missing a feature → that feature wasn't named in the spec. Add it explicitly ("it also exports to PDF") and re-run the round-trip test.
  • The recipient's agent asks a pile of questions → the spec is too thin. The questions are the fix-list — paste them back to your drafting agent and have it answer each in the prompt.
  • The rebuild looks nothing like yours → you under-specified look and behaviour. Add the load-bearing bits ("two-column layout", "dark theme", "no sign-in"). Exact pixels won't come back; the important behaviour should.
  • A secret slipped through → if you've already sent it, treat that key as exposed: rotate/revoke it now, then resend a cleaned block. This is why the eyeball step is non-optional.
  • The agent wrote a description, not a runnable spec → it explained the project instead of instructing a builder. Re-ask: "rewrite this as instructions to an agent that has never seen the project — what to build, not what mine is."
  • It's huge and unwieldy → a giant app doesn't reconstruct cleanly from one prompt. Share that one as a GitHub repo instead; reconstruction prompts shine for single-file and small tools.

Watch / read

Best written intro: Anthropic's Prompting best practices — Be clear and direct is the authoritative source for what makes a spec an agent can act on — "think of Claude as a brilliant but new employee who lacks context," plus the golden-rule round-trip test this page is built on. Primary docs.

Video: No short video squarely covers writing a prompt that reconstructs your own build — the topic is niche, and the close matches (general "build an app from a prompt" tutorials) teach the opposite direction (prompt → app, not your-app → prompt). On 2026-06-07, YouTube transcripts also couldn't be pulled from this machine to verify any candidate end-to-end. Skip the video; the Anthropic page above plus the round-trip test are the reliable path. If you want the adjacent skill (writing a clear build prompt at all), see How to ask your agent.

Sources