Work articles
Articles written for searchers and the AI that answers them
Small businesses rarely get articles written, and when they do, the articles are generic or get the prices wrong. This tool writes them from the business's own Sanity content, so every price, address and service comes from the live site. A second Claude pass grades each draft and names its problems, and publishing puts the article on the site about ten seconds later. Every article is written for two readers: the person searching, and the AI assistant that answers the same question by quoting a page.
$ art write w247 "What to Expect at a Keycard Gym…"Reading workout247fitness.com...Writing (about a minute)...Grading...1361 words, 59sScore 9/10 10 Links only to the allowed pages 8 No invented statistics or amenities $ art publish w247 what-to --liveLive in a few seconds: …/blog/what-to-expect-keycard-gym-no-staff
- Role
- Sole author, for two client sites I build and run
- Stack
- TypeScript · Node 22 · Claude API · Zod · Sanity · Next.js
- Links
- Live site · Source on GitHub
Every fact comes from the live site
Before drafting, the tool pulls the business's own content from Sanity: membership prices and joining fees, addresses and phones, services, team bios and the FAQ. The prompt says these are the only facts the article may state about the business, and lists the only pages it may link to.
When a draft gets something wrong, the source gets fixed. The gym's FAQ said members could sign up online, which wasn't true yet, and drafts repeated it as fact. Correcting the FAQ fixed the website and every future article at the same time.
A second pass grades every draft
A separate request scores each article from 0 to 10 on eight criteria: it answers the question up front, it's specific to this business, every fact matches the site, nothing is invented, the links are real, an AI assistant could quote it, it reads well, and it covers new ground. The grader also returns concrete fixes that quote the problem text, and a draft under 8 is revised once automatically.
On the clinic article, the grader caught an unsourced claim that "research has found" virtual care works as well as in-person care, and a service the clinic doesn't offer. One revision took the score from 8.8 to 9.5.
Written to be quoted by AI assistants
People increasingly ask ChatGPT, Perplexity or Google's AI Overviews instead of clicking through results, and those answers quote pages. So the answer comes in the first sentence, headings are phrased the way people ask, every section opens with a sentence that stands on its own, and facts name the business and town instead of saying "we". On the gym site, the article's FAQ also becomes FAQPage structured data.
Clinical claims need a clinician
On the physical therapy site, every sentence about what a treatment does, who it helps or what the risks are gets copied word for word into a review list. One command prints that list as a numbered message for the clinic's DPT, and the tool won't publish live until a clinician's name is given.
A markdown file instead of an admin panel
It started as a hosted Next.js admin with Postgres, a login and sign-off links. For two sites and one editor, that was more to maintain than it was worth, so it became a command-line tool. Each article is a markdown file you can read and edit in any editor, kept in git.
Publishing converts the file to Sanity's Portable Text, refuses a URL that another article already uses, and keeps any photo added in the CMS. A signed webhook then refreshes only the pages that changed.
What it moved
- From a topic to a graded draft
- ~1 min
- Grader scores of the first two live articles
- 9.5+
- From publish to live on the site
- ~10s