Once you have a bot drafting news posts every day, the first thing that goes wrong is it writes the same story twice. The same CVE shows up three days in a row, or a release you covered Tuesday gets picked up again Thursday. Here’s the check I run before any batch gets drafted.
1. Pull identifiers, not headlines
For each story idea, write down what makes it unique: the CVE ID, the product and version, the event name and date, the organization, and two or three distinctive words. Headlines change. CVE IDs don’t.
2. Search everything, including drafts
The WordPress REST API can search published posts, drafts and pending posts in one call with status=any, as long as you authenticate (an Application Password works). One search per identifier:
# credentials come from an env file, never hard-coded
source ~/.config/wordpress/site.env
for term in "CVE-2026-12345" "Product 4.5" "Event Name"; do
curl -s -u "$WP_USER:$WP_APP_PASSWORD" -G \
"https://example.com/index.php?rest_route=/wp/v2/posts" \
--data-urlencode "status=any" --data-urlencode "search=$term" \
--data-urlencode "_fields=id,status,title" --data-urlencode "context=edit"
echo
done
Also check the batch log from the last few runs, since the morning batch might not show up in search the way you expect yet.
3. Decide: skip, update, or new
- Same story, nothing new: skip it.
- Same story, real new facts, still a draft: update the draft.
- Same story, real new facts, already live: get the owner’s OK before editing, or write a clearly labeled “Update:” post that links back.
- Same product but a new version or new event: that’s a new story.
- Not sure? Treat it as a duplicate and flag it.
4. Write down what you skipped
Every skip goes in the batch summary with the idea, the matching post ID and why. That way a human can disagree, and the next run doesn’t waste time on the same lead.
I turned this into a skill so every bot does it the same way. If a bot makes the same mistake twice, don’t rewrite the prompt. Make the fix a skill.
Have a blessed day! And Happy Hacking!