/nexity-marketing-skills:blog-post-updatefrom nexity-marketing-skills
Guides the user through a structured workflow to review, diagnose, and propose updates to a published blog post using analytics data and editorial gates. Use when asked to refresh or analyze a specific article.
Ships in nexity-marketing-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
You drive scripts/blog-post-update.mjs. It owns the snapshot, the data pulls, the gates, the
checks and the change list; you do the reading, the diagnosis, the writing and the talking
between its commands. The skill works on any site: it reads the published page and Google's
read-only APIs, and writes only to its run folder. It never touches the CMS. The editor
makes the approved changes in their CMS and publishes them.
TBD markers: leave them visible rather than filling them with something
plausible. unknown and unavailable are real answers.The script is plain Node 20.12+, no packages. Run it from the folder where the run folders
should live (usually the project root); it reads settings from the shell, or from
.env.local / .env in that folder. <skill> is the folder this SKILL.md was loaded
from (.agents/skills/blog-post-update in a clone of the repository, elsewhere when
installed as a plugin or with npx skills; use the absolute path):
BPU="<skill>/scripts/blog-post-update.mjs"
node $BPU setup
The post needs nothing: start reads its public URL. A post that cannot be read
(a staging site behind a login, an article rendered by JavaScript) starts from a file: the
article as HTML or Markdown, exported from the CMS or saved from a browser.
Search Console and GA4 are optional, and the user picks how. Present the options, say what each costs, recommend, and let them choose; set up only what they choose:
| Option | What the user does once | Good for |
|---|---|---|
| A. MCP servers (recommended when the agent already uses MCP) | GA4: Google's official server (googleanalytics/google-analytics-mcp, runs with pipx, Application Default Credentials with the analytics.readonly scope). Search Console: Google ships none; a community server such as mcp-server-gsc (npx, a service account key). Registered in the agent's MCP config | Asking ad-hoc questions about the data in any session, beyond this skill |
| B. The script's own access (recommended for teams and repeatable runs) | One Google Cloud project with the Search Console API and the Google Analytics Data + Admin APIs enabled, then either a service account key (GOOGLE_SERVICE_ACCOUNT_FILE=/path/key.json; add its email as a user on the Search Console property and as Viewer on the GA4 property) or an OAuth client of type Desktop app (GOOGLE_OAUTH_CLIENT_FILE=/path/client.json, then node $BPU google-auth once; the token is saved in ~/.config/blog-post-update/). Plus GSC_SITE (sc-domain:example.com or https://example.com/) and GA4_PROPERTY (properties/123456789) | Same numbers every run, no agent config, works in any agent and in CI |
| C. Exports | Nothing. Per run, the user exports from Search Console (Performance → filter by this page → last 3 months, compare to previous period) and GA4 (Engagement → Landing page) and gives you the files | One-off runs, no Cloud project |
| D. None | Nothing | Factual corrections, or a post that is not search-led. The diagnosis says "unknown" |
Rules for the setup conversation: key files and tokens live outside the repo and are never
pasted into the chat; never read or print an .env file or a key. Env names go into the
shell profile or a gitignored .env.local in the folder the script runs from. After the
user has set something up, run setup again: it signs in, lists the Search Console properties and GA4 properties the credentials can read, and
says what is still missing. Stop at the first failure and tell the user exactly what to fix
(a 403 names the missing permission or API).
With A or C, you write the data files yourself in the shape the script writes (below),
and record where each number came from in source.
node $BPU candidates [--months=3] [--limit=20] [--prefix=/blog/] # needs option B
Ranks the site's pages under --prefix (default /blog/; --prefix=/news/,/guides/ for
other sections) on clicks lost against the previous window, position 5–15 with real clicks,
and age (from the sitemap's lastmod, when the site has one). With an MCP server, pull the same two
property-wide page reports and rank the same way. It is a suggestion list, not a queue:
present it with the reason on every row and let the user pick. Their reason for picking goes
into scope.md in their words.
node $BPU start --url=https://www.example.com/blog/<slug>
node $BPU start --url=<public URL> --file=<export.html|.md> # when the page cannot be read
Prints --run=<dir>; every later command takes it. The run folder is
.blog-updates/<slug>/<date>/ (add /.blog-updates/ to .gitignore: it holds analytics and
unpublished text). start writes:
| File | What it is |
|---|---|
before.json, before.md | The snapshot: the page as read (title, description, dates, blocks), and its body as Markdown |
candidate.md | Starts as a copy of before.md. The version you edit |
metadata.json | title (the <h1>), seoTitle (the <title>), description (the meta description): edit to change them |
scope.md | Who picked it, why, the target query (or "unresolved"), the decision wanted. Fill it with the user |
recommendations.md | The Gate 1 checklist |
protected.md | Passages that must survive word for word |
The body is read from the page's <article> (else <main>), without navigation, sidebars,
"related posts" and footers, and without the <h1> (that is the title). Compare
before.md with the page in a browser before anything else: if a section is missing or
a menu got in, run start --content=<selector> --replace with the element that holds the
article (a tag, .class, #id). The Markdown has headings ##, lists, **bold**,
_italic_, `code`, links (site paths for the site's own pages, full URLs elsewhere),
images as , tables and code blocks. It is a faithful view of the text, not of the
CMS's blocks: an embed, a form or a custom component the page renders without text is not in
it. List changes to those for the editor in the recommendations. Template parts the site
renders inside the article (tags, author line, a newsletter box, a CTA, share buttons) are
read too when no --content selector leaves them out: leave them as they are in
candidate.md, so they stay out of the change list, and do not judge them as the article.
Target query. Only confirmed when the user gives it or the data shows it beyond doubt.
Guessing it is the most damaging mistake in a run: the whole diagnosis then chases a query the
page never owned.
Only pull what the decision needs. A factual correction does not need four windows.
node $BPU gsc --run=<dir> --window=current [--months=3]
node $BPU gsc --run=<dir> --window=previous
node $BPU gsc --run=<dir> --window=year-ago # seasonality
node $BPU ga4 --run=<dir> --window=current # and previous, if useful
node $BPU diagnose --run=<dir>
Windows end three days back by default (Search Console finalises late); --end=YYYY-MM-DD
overrides. gsc filters to the post's URL exactly as start read it (after redirects); if
Search Console reports it differently (www, a trailing slash), pass --page=<url>. Data files, if you write them yourself from an
MCP server or an export:
// data/gsc-current.json (also gsc-previous.json, gsc-year-ago.json)
{ "range": { "start": "2026-07-01", "end": "2026-09-30" },
"source": { "kind": "mcp | export", "detail": "which tool or file" },
"totals": { "clicks": 120, "impressions": 4000, "ctr": 0.03, "position": 7.4 },
"queries": [{ "key": "headless cms", "clicks": 40, "impressions": 900, "ctr": 0.044, "position": 5.1 }] }
// data/ga4-current.json
{ "range": { … }, "source": { … }, "totals": { "sessions": 0, "views": 0, "users": 0, "engagement_rate": 0, "avg_session_seconds": 0, "key_events": 0 } }
diagnose writes data/decline.md: decline observed / not-observed / unknown, and when
observed, which of the three causes the data can see: lost positions, lost CTR at a held
position (something on the results page takes the click), lost impressions (demand or the
results page shrank). Hold on to:
Write diagnosis.md: what moved, the evidence, what is unknown and why, what success would
look like and when to measure it.
The diagnosis says why the page moved, not what is wrong with the article. Read before.md as
a reader and write editorial-audit.md, using the blog-post-quality-review skill's rubric
(its folder sits next to this skill's folder) for the score:
source-review skill finds a source or flags itBefore you judge a fact as stale, check the primary source (release notes, the product's docs, the study's latest edition) and quote it. A wrong "this is outdated" deletes a true sentence; "I did not see it this time" is not evidence that something is gone.
Every finding becomes a row in recommendations.md: apply / retain / not applicable,
and for apply, exactly what changes. The editor may retain any of them, but every one is put
in front of them. Fill protected.md with the passages that already earn something (a featured
snippet, a passage an AI answer cites, the section the top query lands on), the text itself,
one fenced block each, with the evidence above it; "nothing protected" is a valid answer.
Open recommendations.md with the refresh thesis — "We update [URL] to help [reader] do
[job] for [intent], because [diagnosis]; protected: [passages]; success = [metric] by
[date]" — and walk the editor through it. They trim it; the file must have no TBD left.
node $BPU gate --run=<dir> --name=gate1 --by="<their name>" --route=content-light # or content-deep, technical, consolidation
Choosing the route. content-light: the article is sound and something in it went stale.
content-deep: it scores below 6/10 or two or more sections fail the swap test; bounded edits
would give a bounded result. technical / consolidation: the problem is not the text (an
indexing issue, two posts competing for one query); write the action list for its owner in
action-package.md (the defect, the URLs, who owns it, how to verify) and the run ends there.
No change. If the diagnosis says leave it, say so plainly and stop pushing. If the editor agrees:
node $BPU gate --run=<dir> --name=no-change --by="<name>" --rationale="<why, from the diagnosis>" --revisit=YYYY-MM-DD
content-deep first gets an outline.md approved: gate --name=gate2. A light edit that
touches a protected passage also needs gate2, naming the passage, why it is protected, the
exact change and the decision. Never reclassify a light edit as deep to reach the gate.
Edit candidate.md and metadata.json. Apply only the approved rows. Rules for the text,
each one a defect editors found in refreshed articles:
node $BPU mentions --run=<dir> --term="<thing>"
and fix every other sentence about the same thing.BRAND.md, the site's case studies, or the
user). No source, no claim; a retained first-person claim needs one too.BRAND.md; the work-humanizer skill catches AI tells./blog/other-post); the editor makes them the
CMS's internal links. A CTA URL comes from the approved scope, never invented.Keep changelog.md as you go: every change with its reason and, for a fact, its source.
Describe first, then render from the description. Write visual-plan.md in the run folder
as a brief a designer could work from: for each image, where it goes, what it must show, its
alt text and caption. Under each item put one fenced visual block, the same brief in the form
the script renders:
```visual
{"id": "checklist", "kind": "html", "source": "visuals/checklist.html", "file": "champion-checklist.png", "alt": "…", "caption": "…"}
```
screenshot captures a live page (url) at 1440×900 (override with width/height;
wait in ms for late pages, lang, hide CSS selectors, hide_text for a floating panel
with no stable selector).html renders a page you write into visuals/ in the run folder: a diagram, an annotated
checklist, a comparison card. Take its colours and type from the site's DESIGN.md or
BRAND.md when the project has them, else from the live site. The brief is the spec; the
HTML only executes it.node $BPU visuals --run=<dir> [--only=id,id] [--browser=<path>] # -> images/*.png, images/visuals.json
It drives the Chrome or Edge already installed (CHROME_PATH or --browser to override; Node
22+), refuses optional cookies the way a privacy-minded visitor would and hides consent and
"update your location" prompts. Look at every image before you call it done: read each
PNG. Four things the script cannot fix, and you must not work around:
en-US does not stop a site serving its local storefront
to a local IP. Prefer the site's own international URL; when there is none, it is a capture
by hand.wait and render that one again with --only.hide, or its text to
hide_text.Put each image in candidate.md where it goes, as ; validate
accepts these run-local paths. Close the plan with a render-status section: what was rendered
and checked, and what a person still captures, with the reason. Every image is a draft until a
person uploads it to the CMS. An existing image with no alt, a dead src or a screenshot of a
UI that no longer exists is a finding for the recommendations, not something to quietly leave.
node $BPU validate --run=<dir> [--links]
Writes comparison.md (every changed passage, before beside after, grouped by section, an
added passage with the passage it goes after, formatting-or-links-only changes apart, plus the
metadata diff) and checks.json.
Blockers (handoff refuses): a protected passage missing or changed, TBD/TODO left in the
text, an empty title, a broken link. Findings (the editor decides): heading level jumps, an
H1 in the body, title or description length, redirecting links. Links to the site's own pages
are always requested; --links requests external URLs too. A link that could not be checked
is flagged for a person, never reported as broken.
Then have the result judged in a fresh context (a subagent, or a new session), not by you:
it reads candidate.md cold, first, then before.md, and scores both with the
blog-post-quality-review rubric. Grading your own draft is a self-report. A score going
down is an acceptable answer. Below 7/10, say so as the headline.
Build the review page and walk the editor through it, with the judge's scores and the changelog:
node $BPU review --run=<dir> # -> review.html
review.html is one self-contained page in the run folder: the counts, the open blockers,
the metadata before and after, the new images with their alt text and caption, every changed
passage before beside after (unchanged runs folded), the findings and the links nobody could
check. Run validate first: without a current validation the page carries no checks and says
so. Reading the page is not approving it, and the page says that too. Ask for an explicit
yes with their name:
node $BPU gate --run=<dir> --name=gate3 --by="<name>"
node $BPU handoff --run=<dir>
Gates bind to file hashes: an edit to candidate.md, metadata.json or the approved
recommendations after a gate makes it stale, and handoff refuses until it is approved again.
handoff also refuses when validation is missing or stale or found blockers, and when the
live article changed since the snapshot (someone published an edit while the run was open):
never hand over a change list written against an old text; reconcile with the editor and
start a new run (--accept-drift only after the editor has checked that the list still applies).
handoff.md is the editor's work order: the metadata changes, every text change in reading
order (before / after, where an added passage goes), and the new images to upload with their
alt text and caption, with candidate.md as the whole approved text, changelog.md as the
reasons and review.html to see it side by side. The editor makes the changes in a draft in
their CMS, fixes what only the CMS can (images, embeds, tables), and publishes through their
usual review. If the CMS has an MCP server or an API the user wants to use for this, that is
their call and their tool: this skill does not write.
After they have published:
node $BPU verify --run=<dir>
Reads the live page and reports which approved changes are on it and whether the title and description match. Plain text is compared, so the CMS's formatting does not count; a change the editor reworded shows as not live and is checked by eye. A cached page can lag behind a publish: re-run before calling something missing.
node $BPU status --run=<dir> prints the route, every gate and whether it is still current,
which data and notes exist, the validation state and the next step. Run it whenever you
resume: nothing lives in the conversation.
At the date in the measurement plan (usually 4–8 weeks after publishing), in the same run:
node $BPU gsc --run=<dir> --window=current --months=1 --as=after
node $BPU gsc --run=<dir> --window=current --months=1 --end=<day before publishing> --as=before-publish
node $BPU diagnose --run=<dir> --current=after --baseline=before-publish
Verdicts: promising / inconclusive / negative / not measurable. Use the last one honestly: a post with no baseline cannot show uplift. A signed no-change is revisited on its date as a review, not a measurement.
run.json by hand; the script is its only writer.TBD with a guess, or record a gate without the person's name and yes.After editing scripts/lib.mjs or scripts/html.mjs, run node --test scripts/lib.test.mjs
from the skill folder. html.mjs is the same file in internal-links: change both.
What SKILL.md sets; muted values are Claude Code's defaults
8 skills in this plugin
/blog-post-quality-reviewA critical, read-only quality review of one blog post or draft. Checks whether the body delivers what the title promises, the logic, every heading against its section, a technical and a marketing read, and ends with a weighted 0-10 scorecard and the three fixes with the most impact, always in the same format so posts can be compared. Use when the user asks to "review this post", "score this article", "is this draft good", "check the quality of the blog post", or gives a post URL, file or pasted text to judge. Never edits the post./brand-kitUse when asked to build, generate, refresh or reverse-engineer a brand kit, a `BRAND.md`, brand foundations or a brand voice profile for a company from its website URL — "zrób brand kit", "brand kit for <company>", "fill in BRAND.md", "what does our site actually say about us", or when preparing a company's site for AI content production. Reads the public site and its listings, writes a short `BRAND.md` that people and AI agents work from, and a report of what the site contradicts or cannot prove. Written for the team that owns the site; works on any company's site. Needs only a public URL to start.npx claudepluginhub pagepro/nexity --plugin nexity-marketing-skillsOther plugins' skills for the same job