计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
hashnode【效率与协作】Publish, draft and read blog posts on the user's Hashnode blog using their own login cookies (BYOC) — no Hashnode Pro plan required. Use when the user mentions Hashnode, publishing/cross-posting an article to their Hashnode blog, saving a Hashnode draft, or listing their Hashnode publications.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Hashnode moved its public GraphQL API behind a paid Pro plan (2026-05-13), so
a Personal Access Token can no longer publish for free. This skill instead drives
the same first-party REST API the Hashnode web editor uses
(https://hashnode.com/api/...), authenticated by the user's login session
cookie — which is free and needs no Pro plan.
The connector injects the cookie jar as HASHNODE_COOKIES (a JSON array; the
session cookie is hashnode-session). Secret — full account access. Never echo
or print it.
E2E-verified 2026-07-12 on a real connected blog: list publications, create + save draft (title / subtitle / cover / tags / Markdown), publish, and delete — all via cookie auth, no Pro.
# $SKILL_DIR can point at another skill loaded this turn — anchor on our script.
H="$SKILL_DIR/scripts/hashnode.py"; [ -f "$H" ] || H=$(find /tmp -maxdepth 8 -path '*/skills/*/hashnode/scripts/hashnode.py' 2>/dev/null | head -1)
[ -f "$H" ] || { echo "hashnode script not found (SKILL_DIR=$SKILL_DIR)" >&2; exit 1; }
python3 "$H" publications # list the user's blogs (verifies the cookie)
On an auth error the cookie is expired — have the user reconnect at https://studio.acedata.cloud/console/connectors. Do not loop-retry.
This is the single most important rule. A non-Pro publication is subject to Hashnode automoderation: an overtly promotional post (hypey language, "free credits!!", the same CTA link repeated 3–4 times) is auto-removed within seconds — the publish call still returns success, but the live URL then 404s. (Pro's one benefit here is "protection from automoderation removal".)
To stay live, write a genuinely useful how-to / guide that happens to feature the product:
publish re-fetches the live URL after publishing and returns a warning if the
post was moderated away — if you see that, rewrite it editorially and republish.
python3 "$H" publications # {publications:[{id,title,url}]}
python3 "$H" draft \
--title "My Title" \
--subtitle "Optional subtitle" \
--content-file article.md \
--cover "https://cdn.example.com/cover.jpg" \
--tags ai,apis
# → {draft_id, editor_url}. Nothing is public yet.
--content-file is the Markdown body (use a file for long posts; --content
for a short inline string). Inline images and links are just Markdown.--cover sets the header/cover image (also used as the OG image).--tags are comma-separated slugs (ai,apis,web-development); they're resolved
to real Hashnode tag ids automatically (up to 5).--publication <id> is only needed if the account has more than one blog.--confirm)python3 "$H" publish --title "My Title" --content-file article.md --cover "https://…" --tags ai,apis # dry-run
python3 "$H" publish --title "My Title" --content-file article.md --cover "https://…" --tags ai,apis --confirm # LIVE
# → {ok, url} (or {ok:false, warning:"…automoderation removed…"} — rewrite editorially)
A confirmed publish is immediately public on the user's real blog. Always
show the final title + body, get an explicit "yes", then run with --confirm as
the last argument.
python3 "$H" delete --id <draftOrPostId> # dry-run
python3 "$H" delete --id <draftOrPostId> --confirm # delete
hashnode.com/api/* editor API,
not gql-beta.hashnode.com (which requires a paid Pro plan).HASHNODE_COOKIES — it is full account access.After you successfully publish and obtain the live result URL, call the built-in
publish_artifact tool ONCE so the user can track this deliverable in My Outputs:
publish_artifact(kind="article", channel="hashnode", title="<title>", url="<the REAL returned URL>", status="delivered")
Use the real returned URL — never fabricate one. Call it once per published item,
only after delivery is confirmed; skip it (or use status="failed") if publishing failed.
See _shared/artifacts.md.