Adding a downloadable file to a post is fiddly to do well by hand: you upload the file, copy its URL, drop in a button, write a label, maybe add a cover thumbnail, and get the whole thing sitting in the right spot without breaking the layout. It is five minutes of clicking for something that should take one.
This prompt does the wiring. You put the file in the Media Library yourself, hand the agent its URL, and the agent reads the post, uploads a preview image if you want one, and drops in a clean, labelled download. Nothing saves until you approve it.
I want to add a download for [the 2026 price list PDF] to [the Pricing post,id 88]. The file is already in my Media Library at [https://example.com/...].
Read the post first and find a sensible spot near the top for the download.I am giving you a preview image at [path/to/cover.png], upload that into theMedia Library and use it as a clickable thumbnail that links to the file URL,with a clear "Download the price list" label beside it.
Show me the block before you save anything. Once I approve, update the postand hand it back so I can check how the download looks.Why this is safe to run
Reading the post comes first and changes nothing, so the agent knows where the download belongs before it touches the body. One honest limit sits at the center of this recipe: the upload ability handles images only, so the agent cannot upload the PDF or file itself. You add that to your Media Library, and the agent works from the URL you give it. The only thing it uploads is the preview image you hand over.
The write half edits the post body through the normal editor path, so the change is reversible. WordPress saves a revision on update, which means a download block in the wrong place is one restore away. On top of that, the write abilities stay off until you enable them, every call is checked against the capability of the user you bound the agent to, and the edit is shown to you before it saves and logged in the Activity Log after.
Already connected? Skip the paste. Ask your agent for the “embed a PDF or downloadable file” recipe, give it the file URL and the post, and it wires up the download on your own site.