Agent build · v1
Site-first article and explainer agents
What it does: Two Claude Code agents that publish to your own site first: one writes a data-backed article per run, the other turns articles and projects into pages that each answer one searched question.
- Model
- Claude Opus (Claude Code background agents)
- Runs in
- Claude Code scheduled tasks + background agents
- Cost per run
- not measured
- License
- MIT
- Used by
- 0
- Files
- 7 (18 KB)
curl -L https://tensorust.com/builds/site-first-article-agents/download -o site-first-article-agents.zip
Receipts
- Source
- https://this-week-in-rust.org/blog/2026/10/21/this-week-in-rust-674/
- Measured
- Oct 21, 2026
- Check
- Number found on the source page by our checker
- Stamp
- ZUIl8enHLWxfHuELNhLDQ85Hzc-h63Xs
- Source
- https://tensorust.com/articles/crates-io-download-count/
- Measured
- Oct 17, 2026
- Check
- Number found on the source page by our checker
- Stamp
- W3nPiJOC2p9HAOdZLXUR8pjXD0CPjnXv
Files
- agents/articles/QUALITY.md2 KB
- agents/articles/ROLE.md3 KB
- agents/articles/SITE_PUBLISH.md3 KB
- agents/explainers/QUEUE.example.md1 KB
- agents/explainers/ROLE.md3 KB
- README.md1 KB
- schedule.example.json3 KB
# Put every article on the site first (canonical home)
The site is the canonical copy; every other platform points at it. This file is the exact checklist the agents follow. Paths are relative to your site source folder; the original uses a Python static build (build.py) deployed to Vercel.
## 0. Take the build lock
Take `agents/locks/site-build.lock` before editing the catalog or building. If another agent holds it and it is under 20 minutes old, wait. Delete it after the deploy is verified.
## 1. Add it to the catalog
Append one entry to `articles/catalog.py` (or your equivalent):
- `slug`: short, keyword-first, lowercase-hyphens. Never change it after publishing.
- `topics`: 1 to 3 topic slugs from a fixed list. Only add a new topic when 3+ articles would share it. Topics drive the index, search and the /articles/topic/<slug>/ hubs.
- `kw`: one search phrase people really type. Check it with Google autocomplete: `https://suggestqueries.google.com/complete/search?client=firefox&q=<phrase>`. No made-up search volumes.
- `title` (about 60 chars, keyword near the front, still true) and `desc` (140 to 160 chars, true, no em dashes).
- `offer`: the one call to action that matches the topic. `tools`: 1 to 3 internal links.
## 2. Import, back up, build
```
python articles/import_articles.py <slug> # images -> webp, og image, content json
cp -r ../_deploy/site ../_deploy/site.bak-$(date +%m%d-%H%M)
python build.py # must report the article count and pass the SEO check
```
If build.py changed since you last read it, re-read it first. Data files (data.csv) may need copying into the deploy folder by hand; check they return 200.
## 3. Deploy and verify
```
cd ../_deploy/site && vercel deploy --prod --yes
curl -s -o /dev/null -w '%{http_code}' https://<your-site>/articles/<slug>/ # expect 200
```
Also check that /articles/ lists it first and that the feed and sitemap.xml contain it.
## 4. IndexNow (every deploy)
Right after the deploy and the 200 check, submit only new or changed URLs to IndexNow (Bing, Yandex, Naver, Seznam). Diff the deployed sitemap's per-page lastmod against a saved state file; expect HTTP 202. Run it after the deploy, never before: it checks the live key file at `https://<your-site>/<YOUR_INDEXNOW_KEY>.txt`. Google ignores IndexNow, so also do step 6.
## 5. Canonicals on copies
- dev.to: PUT `https://dev.to/api/articles/<id>` with `{"article":{"canonical_url":"https://<your-site>/articles/<slug>/"}}` and header `api-key: <YOUR_DEVTO_API_KEY>` read from a local file (never print it). On a 401, stop and report. Do not look for other keys.
- New dev.to posts: set canonical_url in the front matter at publish time.
- Medium: import from the site URL (that sets the canonical). Substack has no canonical field, so its first line links the site copy.
## 6. Search Console
In the signed-in browser, open your own tab, inspect the new URL and click Request indexing. Do not sign out, do not switch accounts, close only the tabs you opened.
Rules: every number checked against a source, no em dashes, no fake reviews or ratings in schema.
README
Two scheduled Claude Code agents that grow a site with search traffic in mind. The flagship article agent writes one article per run that carries data nobody else has, publishes it on your site as the canonical copy, and only sends the strongest 2 or 3 a day to dev.to, X and LinkedIn. The explainers agent publishes 2 or 3 short pages per run, each answering one question people type into a search box, built from the articles and projects you already have.
Why site first: on tensorust.com one data article (a fresh crates.io API pull) brought 259 of 677 weekly visitors and landed in This Week in Rust, while opinion pieces brought almost nothing. Search became the second biggest referrer. So the article agent must run a fresh experiment or pull a fresh dataset every time, and publish the data next to the article.
Layout:
schedule.example.json: both jobs, with the exact prompts. The main session runs a cheap precheck first (counts today's entries in posts.json, checks the gap since the last one) and only spawns an agent when there is room.
agents/articles/ROLE.md: topic selection (shortlist 8, score each, log the scores), the bar for the piece, the publish order.
agents/articles/QUALITY.md: the checklist every article passes before it publishes.
agents/articles/SITE_PUBLISH.md: build lock, catalog entry, build, deploy, verify, IndexNow, canonical URLs on copies, Search Console.
agents/explainers/ROLE.md and QUEUE.example.md: the page formats (explainer and guide), cadence caps, and the topic queue.
How to run it:
1. Set up the shared files from the outreach team build (posts.json, VOICE.md, a NOTES.md per role, a locks/ folder).
2. Replace the build and deploy commands in SITE_PUBLISH.md with your own. The original is a Python static build deployed with the Vercel CLI.
3. Create the two jobs in Claude Code from schedule.example.json.
What to change: your topics, your offers, your site commands, and the caps. Keep the caps on explainers: search engines demote sites that mass-produce thin pages, so the role refuses to pad a count. Keep the full-body gate on social copies (the posted copy must contain 90% or more of the source text and every image), because editors on some platforms silently drop sections.
The dev.to step needs an API key. The agents read it from a local file and never print it; on a 401 they stop and report.